diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2018-06-07 15:45:22 +0300 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-14 17:06:21 -0400 |
commit | 97c6cb949ffe707865b9c46016f97b441d114e45 (patch) | |
tree | a81623757978b726043bb42cc55e4000d41bcd13 /haddock-api/src/Haddock/Backends/LaTeX.hs | |
parent | 5b25163bad9c28040fdc61555659b4b4b6168032 (diff) |
Handle -XStarIsType
Diffstat (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/LaTeX.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index 3cc4c278..b73a35cc 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -1000,8 +1000,7 @@ ppr_mono_ty ctxt_prec (HsDocTy _ ty _) unicode ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ = char '_' ppr_mono_ty _ (HsTyLit _ t) u = ppr_tylit t u - -ppr_mono_ty _ (HsAppsTy {}) _ = panic "ppr_mono_ty:HsAppsTy" +ppr_mono_ty _ (HsStarTy _ isUni) unicode = starSymbol (isUni || unicode) ppr_tylit :: HsTyLit -> Bool -> LaTeX @@ -1266,12 +1265,12 @@ quote :: LaTeX -> LaTeX quote doc = text "\\begin{quote}" $$ doc $$ text "\\end{quote}" -dcolon, arrow, darrow, forallSymbol :: Bool -> LaTeX +dcolon, arrow, darrow, forallSymbol, starSymbol :: Bool -> LaTeX dcolon unicode = text (if unicode then "∷" else "::") arrow unicode = text (if unicode then "→" else "->") darrow unicode = text (if unicode then "⇒" else "=>") forallSymbol unicode = text (if unicode then "∀" else "forall") - +starSymbol unicode = text (if unicode then "★" else "*") dot :: LaTeX dot = char '.' |