[GHC] #12708: RFC: Representation polymorphic Num

GHC ghc-devs at haskell.org
Tue Dec 13 08:37:07 UTC 2016


#12708: RFC: Representation polymorphic Num
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Core Libraries    |              Version:  8.0.1
      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:                    |
-------------------------------------+-------------------------------------
Changes (by oerjan):

 * cc: oerjan (added)


Comment:

 Replying to [comment:11 goldfire]:
 > Replying to [comment:3 Iceland_jack]:
 > > Should this not be allowed when `minBound :: () -> a` is allowed?
 >
 > Because `blah :: Int#` is not allowed? This would actually be OK,
 because methods -- even nullary ones, like `minBound` are actually
 functions that take dictionaries. So we're OK here.

 The question is, how would you store the necessary `Int#` in the
 dictionary? It seems to me you'd have to use some kind of indirection
 because otherwise you have a dictionary field than can have arbitrary
 size.

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


More information about the ghc-tickets mailing list