aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorIavor S. Diatchki <iavor.diatchki@gmail.com>2012-03-15 22:43:35 -0700
committerIavor S. Diatchki <iavor.diatchki@gmail.com>2012-03-15 22:43:35 -0700
commitfa5ffbd629ed466f6e1f121b805f2114e6b2bd47 (patch)
treedad49abd27ae78291e19ee5a3087403b81f6d299 /src/Haddock/Convert.hs
parent7b381312437410b3d86ae5e18b951a551213bad8 (diff)
Add support for type-level literals.
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs5
1 files changed, 5 insertions, 0 deletions
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")