[commit: haddock] wip/T9840: Alternative representation for empty closed type families (c86a8b2)
git at git.haskell.org
git at git.haskell.org
Wed Jul 8 08:38:20 UTC 2015
Repository : ssh://git@git.haskell.org/haddock
On branch : wip/T9840
Link : http://git.haskell.org/haddock.git/commitdiff/c86a8b2ace6a803f67343e8919a71d53a97a3f13
>---------------------------------------------------------------
commit c86a8b2ace6a803f67343e8919a71d53a97a3f13
Author: Adam Gundry <adam at well-typed.com>
Date: Thu Apr 16 11:02:58 2015 +0100
Alternative representation for empty closed type families
>---------------------------------------------------------------
c86a8b2ace6a803f67343e8919a71d53a97a3f13
haddock-api/src/Haddock/Convert.hs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index ac477c8..4da108d 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -168,12 +168,13 @@ synifyTyCon coax tc
Just rhs ->
let info = case rhs of
OpenSynFamilyTyCon -> return OpenTypeFamily
- ClosedSynFamilyTyCon (CoAxiom { co_ax_branches = branches }) ->
- return $ ClosedTypeFamily
- (brListMap (noLoc . synifyAxBranch tc) branches)
+ ClosedSynFamilyTyCon mb -> case mb of
+ Just (CoAxiom { co_ax_branches = branches })
+ -> return $ ClosedTypeFamily $
+ brListMap (noLoc . synifyAxBranch tc) branches
+ Nothing -> return $ ClosedTypeFamily []
BuiltInSynFamTyCon {} -> return $ ClosedTypeFamily []
AbstractClosedSynFamilyTyCon {} -> return $ ClosedTypeFamily []
- EmptyClosedSynFamilyTyCon {} -> return $ ClosedTypeFamily []
in info >>= \i ->
return (FamDecl
(FamilyDecl { fdInfo = i
More information about the ghc-commits
mailing list