[GHC] #15100: `ApplicativeDo` needlessly uses `join` too much

GHC ghc-devs at haskell.org
Mon Apr 30 04:02:36 UTC 2018


#15100: `ApplicativeDo` needlessly uses `join` too much
-------------------------------------+-------------------------------------
        Reporter:  ekmett            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.2
  (CodeGen)                          |
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by dfeuer):

 * cc: dfeuer (added)


Comment:

 Another thing that should work doesn't quite:

 {{{#!hs
 foo a b c = do
   a
   b
   res <- c
   return res
 }}}

 This is even more surprising, because it desugars without `join` (and
 without `>>=`), but with `>>`!

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


More information about the ghc-tickets mailing list