un-layout program

Simon Marlow simonmar@microsoft.com
Thu, 14 Mar 2002 11:22:25 -0000

> does there exist a program that'll take a layed out haskell=20
> program and
> output one that uses braces and semis to delimit?

You can use GHC's hssource package to parse & then pretty-print the
source code - the pretty printer can generate output with explicit
layout tokens if you ask for it.  The documentation is a bit lacking
(well, there isn't any), so grab the source or browse it on the web