if even 2 then 10 else 11 -- works fine
if even 2 then let t = 10 else let s = 11 -- _:27: parse error on input 'else'
if even 2 then 10 else let s = 11 -- _:34 parse error (possibly incorrect indentation or mismatched brackets)
because let's say I want to code something like this with [[p]]:
[ t | let e = [],
let o = p!!14, r <- [13,12..1],
if even r
then
let o = zipWith (+) (p!!r) (zipWith max e (drop 1 e))
t = o
else
e = zipWith (+) (p!!r) (zipWith max o (drop 1 o))
t = e ]
which at load time reports the error . . . _:33: parse error on input `else'