elm/compiler/Type/PrettyPrint.hs
Evan Czaplicki 807076ad57 Add CSaveEnv, optimize CAnd, make it prettier
CSaveEnv is a special constraint that indicates that the current
environment should be saved for later use.

(/\) now optimizes away arguments that are already CTrue.
2013-07-19 17:48:41 +02:00

13 lines
No EOL
250 B
Haskell

module Type.PrettyPrint where
import Text.PrettyPrint
data ParensWhen = Fn | App | Never
class PrettyType a where
pretty :: ParensWhen -> a -> Doc
commaSep docs = sep (punctuate comma docs)
parensIf bool doc = if bool then parens doc else doc