Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell Equivalent of OCaml's Format library

Does Haskell have a library that does the same thing that OCaml's (Format library)? Or, what is the easiest way to pretty-print an abstract syntax tree in Haskell?

Thanks.

like image 987
Gregory Avatar asked Dec 13 '22 17:12

Gregory


2 Answers

I really like using the wl-pprint package. It gives you loads of flexibility in very elegant code. See here for some nice documentation.

like image 170
Jason Reich Avatar answered Jan 03 '23 01:01

Jason Reich


Is Text.PrettyPrint what you are looking for?

http://www.haskell.org/haskellwiki/Applications_and_libraries/Compiler_tools#Pretty_printing

like image 40
Theo Belaire Avatar answered Jan 03 '23 01:01

Theo Belaire