aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorJan Stolarek <jan.stolarek@p.lodz.pl>2014-11-19 23:00:19 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 07:13:24 +0000
commit79db0e9ef140f88c12d239a2e7dd4eb8bb06d825 (patch)
treef9740be17c9ddf98b03f11d1eda23856c106d670 /haddock-api
parenta197615a032f14f20761a7dec21ea098297eda31 (diff)
Follow changes from #9812
Conflicts: haddock-api/src/Haddock/Convert.hs
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Convert.hs19
1 files changed, 8 insertions, 11 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 3b454feb..8940d935 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -124,7 +124,7 @@ synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
synifyAxiom :: CoAxiom br -> Either ErrMsg (HsDecl Name)
synifyAxiom ax@(CoAxiom { co_ax_tc = tc })
- | isOpenSynFamilyTyCon tc
+ | isOpenTypeFamilyTyCon tc
, Just branch <- coAxiomSingleBranch_maybe ax
= return $ InstD (TyFamInstD
(TyFamInstDecl { tfid_eqn = noLoc $ synifyAxBranch tc branch
@@ -162,8 +162,8 @@ synifyTyCon coax tc
, dd_derivs = Nothing }
, tcdFVs = placeHolderNamesTc }
- | isSynFamilyTyCon tc
- = case synTyConRhs_maybe tc of
+ | isTypeFamilyTyCon tc
+ = case famTyConFlav_maybe tc of
Just rhs ->
let info = case rhs of
OpenSynFamilyTyCon -> return OpenTypeFamily
@@ -190,14 +190,11 @@ synifyTyCon coax tc
FamDecl (FamilyDecl DataFamily (synifyName tc) (synifyTyVars (tyConTyVars tc))
Nothing) --always kind '*'
_ -> Left "synifyTyCon: impossible open data type?"
- | isSynTyCon tc
- = case synTyConRhs_maybe tc of
- Just (SynonymTyCon ty) -> return $
- SynDecl { tcdLName = synifyName tc
- , tcdTyVars = synifyTyVars (tyConTyVars tc)
- , tcdRhs = synifyType WithinType ty
- , tcdFVs = placeHolderNamesTc }
- _ -> Left "synifyTyCon: impossible synTyCon"
+ | Just ty <- synTyConRhs_maybe tc
+ = return $ SynDecl { tcdLName = synifyName tc
+ , tcdTyVars = synifyTyVars (tyConTyVars tc)
+ , tcdRhs = synifyType WithinType ty
+ , tcdFVs = placeHolderNamesTc }
| otherwise =
-- (closed) newtype and data
let