[GHC] #13179: Levity-polymorphic data types

GHC ghc-devs at haskell.org
Tue Jan 24 21:30:03 UTC 2017


#13179: Levity-polymorphic data types
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Core Libraries    |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12708            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:2 RyanGlScott]:
 > I'm afraid your definitions may not be what you think they are.

 Yes. GHC will do levity polymorphism only upon request, and there is no
 request in your data constructor types.

 > If you tried to write truly levity polymorphic definitions for, say,
 `Product`, it'll actually be rejected!

 As well they should be. When creating data constructors, we need to know
 representations of their fields.

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


More information about the ghc-tickets mailing list