[Haskell-cafe] Parse error

Ross Paterson ross at soi.city.ac.uk
Sun Jan 17 05:43:32 EST 2010


On Sun, Jan 17, 2010 at 10:33:45AM +0000, Andrew Coppin wrote:
> Tony Morris wrote:
> >main = do
> > putStrLn "Line 1"
> > putStrLn "Line 2"
> >
> > let xs = do x <- [1..10]
> >             y <- [1..10]
> >             return (x+y)
> >
> > print xs
> 
> Urg, but that's *ugly*. Is there no way I can reduce the amount of
> indentation to something more reasonable?

Sure: start a new line and indentation level after every where, let, do or of.


More information about the Haskell-Cafe mailing list