[Haskell-cafe] Parse error
andrewcoppin at btinternet.com
Sun Jan 17 05:44:39 EST 2010
Daniel Fischer wrote:
> Am Sonntag 17 Januar 2010 11:33:45 schrieb Andrew Coppin:
>> Urg, but that's *ugly*. Is there no way I can reduce the amount of
>> indentation to something more reasonable?
> main = do
> putStrLn "Line 1"
> putStrLn "Line 2"
> let xs = do
> x <- [1..10]
> y <- [1..10]
> return (x+y)
> print xs
> That better?
It's an improvement. It's still not pretty, but I guess that's as good
as it's going to get...
Maybe this is an instance of Haskell trying to tell me "if you need to
write a 20-line do-block in the middle of your function, you're doing it
More information about the Haskell-Cafe