[GHC] #13906: ApplicativeDo doesn't handle existentials as well as it could

GHC ghc-devs at haskell.org
Mon Jul 3 12:28:01 UTC 2017


#13906: ApplicativeDo doesn't handle existentials as well as it could
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:3 simonmar]:
 > Right, but we only need to ensure that a strict pattern match is bound
 by a `>>=`.

 Ah, now I see what you're saying! I was misled by the fact that `b` and
 `d` are applied to `x1` and `x2`. What you were getting at is that by
 simply making the very next action "dependent" on a strict pattern match,
 you propagate strictness from the result level to the action level and
 rely on the fact that strict monads have `undefined *> a = undefined`.
 Does that hold up for reader, for example? It doesn't for lazy `State`,
 but the latter isn't strictly law-abiding, so you're in the clear there.

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


More information about the ghc-tickets mailing list