[GHC] #16135: Panic with ExistentialQuantification and ApplicativeDo

GHC ghc-devs at haskell.org
Tue Jan 8 11:32:03 UTC 2019


#16135: Panic with ExistentialQuantification and ApplicativeDo
-------------------------------------+-------------------------------------
        Reporter:  Ashley Yakeley    |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I think the root cause of this is that the applicative-do stuff just
 doesn't work well with existentials.  See [https://www.microsoft.com/en-
 us/research/publication/desugaring-haskells-do-notation-into-applicative-
 operations/ the paper].  The desugaring in Fig 5 really only works if the
 binder of the patterns don't include existentials.

 To me that says:

 * GHC should check for this and complain if necessary.  Not crash!

 * Someone might like to think about whether it'd be possible to
 accommodate existentials.

 Simon M: this is your territory.

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


More information about the ghc-tickets mailing list