[GHC] #14917: Allow levity polymorhism in binding position

GHC ghc-devs at haskell.org
Fri Mar 16 02:50:11 UTC 2018


#14917: Allow levity polymorhism in binding position
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
                                     |  LevityPolymorphism
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Yes, I was thinking of compulsory unfoldings without realizing it.

 I think the existing check for levity-polymorphic arguments in the
 desugarer (which wouldn't change under this proposal) would catch cases
 where a levity-polymorphic function wasn't sufficiently specialized. All
 that would be left to check for is that the compulsory unfolding would
 actually work (and that the function was sufficiently saturated). If it
 doesn't, I think we would be able to report a sensible error, because we
 at least have the name of the thing that didn't unfold.

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


More information about the ghc-tickets mailing list