diff options
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r-- | src/Haddock/Convert.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index e1f9493a..277b42a4 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -20,7 +20,7 @@ import BasicTypes import TysPrim ( alphaTyVars ) import TysWiredIn ( listTyConName ) import Bag ( emptyBag ) -import SrcLoc ( Located, noLoc ) +import SrcLoc ( Located, noLoc, unLoc ) -- the main function here! yay! tyThingToLHsDecl :: TyThing -> LHsDecl Name @@ -275,3 +275,10 @@ synifyType s forallty@(ForAllTy _tv _ty) = in noLoc $ HsForAllTy forallPlicitness sTvs sCtx sTau +synifyInstHead :: ([TyVar], [PredType], Class, [Type]) -> + ([HsPred Name], Name, [HsType Name]) +synifyInstHead (_, preds, cls, ts) = + ( map (unLoc . synifyPred) preds + , getName cls + , map (unLoc . synifyType WithinType) ts + ) |