AW: Editor Tab Expansion

Ingo Wechsung iw@contexo.de
Fri, 6 Dec 2002 13:37:04 +0100


Markus wrote:

>Perhaps somebody could come up with a "Haskell indent" (part of a pretty
>printer?)?

Hmmm... while for example "cb" is a comparably simple program, this "Haskell
indent" had to be a full blown parser.
I'd rather like to have a "Haskell brace" that makes

fun (x,y) = case x of
    7 -> case y of				-- one tab
        4 -> "seven four"			-- two tabs
        _ -> "no seven in front"		-- eight spaces

into

fun (x,y) = case x of {
	7 -> case y of {
		4 -> "seven four";
	}
	_ -> "no seven in front";
}

Regards,
Ingo