aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index f8d85f88..a2bdb1b9 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -124,7 +124,7 @@ tyThingToLHsDecl prr t = case t of
vs = tyConVisibleTyVars (classTyCon cl)
in withErrs (lefts atTyClDecls) . TyClD noExtField $ ClassDecl
- { tcdCtxt = synifyCtx (classSCTheta cl)
+ { tcdCtxt = Just $ synifyCtx (classSCTheta cl)
, tcdLName = synifyNameN cl
, tcdTyVars = synifyTyVars vs
, tcdFixity = synifyFixity cl
@@ -209,7 +209,7 @@ synifyTyCon prr _coax tc
, tcdFixity = synifyFixity tc
- , tcdDataDefn = HsDataDefn { dd_ext = noAnn
+ , tcdDataDefn = HsDataDefn { dd_ext = noExtField
, dd_ND = DataType -- arbitrary lie, they are neither
-- algebraic data nor newtype:
, dd_ctxt = Nothing
@@ -300,9 +300,9 @@ synifyTyCon _prr coax tc
cons = rights consRaw
-- "deriving" doesn't affect the signature, no need to specify any.
alg_deriv = []
- defn = HsDataDefn { dd_ext = noAnn
+ defn = HsDataDefn { dd_ext = noExtField
, dd_ND = alg_nd
- , dd_ctxt = alg_ctx
+ , dd_ctxt = Just alg_ctx
, dd_cType = Nothing
, dd_kindSig = kindSig
, dd_cons = cons
@@ -375,7 +375,7 @@ synifyDataCon use_gadt_syntax dc =
-- skip any EqTheta, use 'orig'inal syntax
ctx | null theta = Nothing
- | otherwise = synifyCtx theta
+ | otherwise = Just $ synifyCtx theta
linear_tys =
zipWith (\ty bang ->
@@ -462,8 +462,8 @@ synifyTcIdSig vs (i, dm) =
mainSig t = synifySigType DeleteTopLevelQuantification vs t
defSig t = synifySigType ImplicitizeForAll vs t
-synifyCtx :: [PredType] -> Maybe (LHsContext GhcRn)
-synifyCtx ts = Just (noLocA ( map (synifyType WithinType []) ts))
+synifyCtx :: [PredType] -> LHsContext GhcRn
+synifyCtx ts = noLocA ( map (synifyType WithinType []) ts)
synifyTyVars :: [TyVar] -> LHsQTyVars GhcRn