From fa5ffbd629ed466f6e1f121b805f2114e6b2bd47 Mon Sep 17 00:00:00 2001 From: "Iavor S. Diatchki" Date: Thu, 15 Mar 2012 22:43:35 -0700 Subject: Add support for type-level literals. --- src/Haddock/Convert.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Haddock/Convert.hs') diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 480e5728..54845787 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -308,6 +308,11 @@ synifyType s forallty@(ForAllTy _tv _ty) = sTau = synifyType WithinType tau in noLoc $ HsForAllTy forallPlicitness sTvs sCtx sTau +synifyType _ (LitTy t) = noLoc $ HsTyLit $ synifyTyLit t + +synifyTyLit :: TyLit -> HsTyLit +synifyTyLit (NumTyLit n) = HsNumTy n +synifyTyLit (StrTyLit s) = HsStrTy s synifyKind :: Kind -> LHsKind Name synifyKind = synifyType (error "synifyKind") -- cgit v1.2.3