on 727d708 help sign in
elk/compiler/Type/PrettyPrint.hs
13 lines 250 B history raw
2module Type.PrettyPrint where
4import Text.PrettyPrint
6data ParensWhen = Fn | App | Never
8class PrettyType a where
9 pretty :: ParensWhen -> a -> Doc
11commaSep docs = sep (punctuate comma docs)
13parensIf bool doc = if bool then parens doc else doc