
20 May
2014
20 May
'14
4:42 p.m.
f x | a && (b > 1 || (c && d)) && e = ...
Now if 'c' becomes monadic you have to rewrite the whole expression in an entirely different (and much noisier) style. Not just all the lifting, but you can't use infix operators anymore. It really does feel like there are two languages (or dialects), with different idioms and syntax. You can translate between them without much complicated effort, but it's still a manual translation.
Good example, but i don't think you can have monads in a guard. Also I'd go for the temporary variable instead of lifting.