Gregory
Gregory

Reputation: 1245

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.

Upvotes: 4

Views: 438

Answers (3)

Theo Belaire
Theo Belaire

Reputation: 3020

Is Text.PrettyPrint what you are looking for?

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

Upvotes: 3

Jason Reich
Jason Reich

Reputation: 1168

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

Upvotes: 9

barti_ddu
barti_ddu

Reputation: 10309

Text.Printf, i guess.

Upvotes: 1

Related Questions