
10 Mar
2015
10 Mar
'15
12:04 p.m.
What you state is true within a `do` expression. What you wrote is a
single if_then_else_ expression on the rhs of the function definition.
Cheers,
Thu
2015-03-10 17:01 GMT+01:00 Alan & Kim Zimmerman
I am working on ghc-exactprint, and need to flag points where layout must be preserved, and considering the `if` statement.
My understanding of the layout rules for if then else is that the `then` has to start more to the right than the `if`.
Using GHC 7.10 RC2, ghci cheerfully loads the following
``` f = if True then 1 else 2
```
Is this valid? Have the rules been relaxed?
Alan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe