Re: DoAndIfThenElse

2018-02-22 Thread Niklas Hambüchen
I've filed https://ghc.haskell.org/trac/ghc/ticket/14842 for it. On 09/02/2018 10.24, Simon Peyton Jones via ghc-devs wrote: > At very least the extension should be documented! Would you like to open > a ticket for that?  And even offer a patch? ___

RE: DoAndIfThenElse

2018-02-09 Thread Simon Peyton Jones via ghc-devs
Simon From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Harendra Kumar Sent: 09 February 2018 02:43 To: Brandon Allbery <allber...@gmail.com> Cc: ghc-devs@haskell.org Devs <ghc-devs@haskell.org> Subject: Re: DoAndIfThenElse Since I started programming in Haske

RE: DoAndIfThenElse

2018-02-09 Thread Simon Peyton Jones via ghc-devs
ber...@gmail.com> Cc: ghc-devs@haskell.org Devs <ghc-devs@haskell.org> Subject: Re: DoAndIfThenElse Since I started programming in Haskell a few years ago I have been using if-then-else in that manner without indentation and I never knew about this extension. I thought this is how it wor

Re: DoAndIfThenElse

2018-02-08 Thread Harendra Kumar
ed 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 multipl

Re: DoAndIfThenElse

2018-02-08 Thread Moritz Angermann
Hi, not sure if this helps. testsuite/tests/parser/should_compile/DoAndIfThenElse.hs gives us ``` {-# LANGUAGE DoAndIfThenElse #-} module DoAndIfThenElse where foo :: IO () foo = do if True then return () else return () ``` and there is some other mention in libraries

Re: DoAndIfThenElse

2018-02-08 Thread Brandon Allbery
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

DoAndIfThenElse

2018-02-08 Thread Harendra Kumar
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