diff options
author | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2012-03-15 22:43:35 -0700 |
---|---|---|
committer | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2012-03-15 22:43:35 -0700 |
commit | fa5ffbd629ed466f6e1f121b805f2114e6b2bd47 (patch) | |
tree | dad49abd27ae78291e19ee5a3087403b81f6d299 /src/Haddock/Backends/LaTeX.hs | |
parent | 7b381312437410b3d86ae5e18b951a551213bad8 (diff) |
Add support for type-level literals.
Diffstat (limited to 'src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | src/Haddock/Backends/LaTeX.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index deb224a8..e5f85b92 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -903,6 +903,15 @@ ppr_mono_ty ctxt_prec (HsParTy ty) unicode ppr_mono_ty ctxt_prec (HsDocTy ty _) unicode = ppr_mono_lty ctxt_prec ty unicode +ppr_mono_ty _ (HsTyLit t) u = ppr_tylit t u + + +ppr_tylit :: HsTyLit -> Bool -> LaTeX +ppr_tylit (HsNumTy n) _ = integer n +ppr_tylit (HsStrTy s) _ = text (show s) + -- XXX: Ok in verbatim, but not otherwise + -- XXX: Do something with Unicode parameter? + ppr_fun_ty :: Int -> LHsType DocName -> LHsType DocName -> Bool -> LaTeX ppr_fun_ty ctxt_prec ty1 ty2 unicode |