[GHC] #13875: ApplicativeDo desugaring is lazier than standard desugaring

GHC ghc-devs at haskell.org
Mon Jun 26 03:01:17 UTC 2017


#13875: ApplicativeDo desugaring is lazier than standard desugaring
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Note that the documentation indicates

 > Applicative do-notation desugaring preserves the original semantics,
 provided that the `Applicative` instance satisfies `<*> = ap` and `pure =
 return` (these are true of all the common monadic types). Thus, you can
 normally turn on `-XApplicativeDo` without fear of breaking your program.
 There is one pitfall to watch out for; see Things to watch out for.

 This is simply not true at the moment. The "Things to watch out for"
 section is unrelated.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13875#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list