Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common.Pretty
Description
Helpers for pretty-printing sslang, including common ASCII tokens.
Documentation
typeAnn :: Dumpy t => t -> Doc ann -> Doc ann Source #
typeAnn t d
annotates document d
with type annotation t
.
Only used by spaghetti so constrained by Dumpy instead of Pretty for now.
spaghetti :: Dumpy t => t -> String Source #
Format with a document of infinite width, preventing wraparound.
Dumpy Typeclass: print an ugly but parseable representation of the AST
- Translates from IR to Doc representation in one-to-one fashion
- No simplifications
- No whitespace formatting
- Type annotates everything