[commit: ghc] wip/T9858-typeable-ben2: Fix data family constructor (9fbc69b)
git at git.haskell.org
git at git.haskell.org
Sun Sep 13 04:20:05 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9858-typeable-ben2
Link : http://ghc.haskell.org/trac/ghc/changeset/9fbc69b25f670a2573baf0311658825846c728b6/ghc
>---------------------------------------------------------------
commit 9fbc69b25f670a2573baf0311658825846c728b6
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Aug 28 10:47:40 2015 +0100
Fix data family constructor
>---------------------------------------------------------------
9fbc69b25f670a2573baf0311658825846c728b6
compiler/typecheck/TcSplice.hs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs
index a018e4a..91f79d4 100644
--- a/compiler/typecheck/TcSplice.hs
+++ b/compiler/typecheck/TcSplice.hs
@@ -1338,10 +1338,9 @@ reifyFunDep (xs, ys) = TH.FunDep (map reifyName xs) (map reifyName ys)
reifyFamFlavour :: TyCon -> TcM (Either TH.FamFlavour [TH.TySynEqn])
reifyFamFlavour tc
- | isOpenTypeFamilyTyCon tc = return $ Left TH.TypeFam
- | isDataFamilyTyCon tc = return $ Left TH.DataFam
| Just flav <- famTyConFlav_maybe tc = case flav of
OpenSynFamilyTyCon -> return $ Left TH.TypeFam
+ DataFamilyTyCon {} -> return $ Left TH.TypeFam
AbstractClosedSynFamilyTyCon -> return $ Right []
BuiltInSynFamTyCon _ -> return $ Right []
ClosedSynFamilyTyCon Nothing -> return $ Right []
@@ -1349,7 +1348,7 @@ reifyFamFlavour tc
-> do { eqns <- brListMapM reifyAxBranch $ coAxiomBranches ax
; return $ Right eqns }
| otherwise
- = panic "TcSplice.reifyFamFlavour: not a type family"
+ = pprPanic "TcSplice.reifyFamFlavour: not a type family" (ppr tc)
reifyTyVars :: [TyVar]
-> TcM [TH.TyVarBndr]
More information about the ghc-commits
mailing list