DoAndIfThenElse

Brandon Allbery allbery.b at gmail.com
Fri Feb 9 02:38:59 UTC 2018


Huh. I wonder if a section went missing; seems like none of the extensions
that alter or relax layout are documented currently.
(AlternativeLayoutRule, AlternativeLayoutRuleTransitional, DoAndIfThenElse,
NondecreasingIndentation, RelaxedLayout)

IIRC DoAndIfThenElse relaxes a condition implied by layout but that
normally only matters in "do": that if you break it into multiple lines,
the "then" and "else" must be indented farther than the "if" or layout will
consider them distinct new expressions (and thereby syntax errors).

On Thu, Feb 8, 2018 at 9:24 PM, Harendra Kumar <harendra.kumar at gmail.com>
wrote:

> Hi,
>
> I recently found a mention of DoAndIfThenElse extension somewhere. I
> looked inside the ghc user guide and could not find any such extension.
> Then I looked in the ghc man page, no mention. I googled and found a very
> sparse references to it here and there. Then I tried using the extension
> with ghc and ghc seems to accept it. What's the story behind this, why is
> it not documented but accepted?
>
> thanks,
> harendra
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180208/422b6be9/attachment.html>


More information about the ghc-devs mailing list