[GHC] #15322: `KnownNat` does not imply `Typeable` any more when used with plugin

GHC ghc-devs at haskell.org
Mon Jul 2 18:03:07 UTC 2018


#15322: `KnownNat` does not imply `Typeable` any more when used with plugin
-------------------------------------+-------------------------------------
        Reporter:  chshersh          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
                                     |  typeable,knownnat
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10348            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by diatchki):

 We are using the same system for `Typeable`.  Have a look in
 `Data.Typeable.Internal` (in `base`): the functions `typeNatTypeRep` and
 `typeSymbolTypeRep` make the run-time representations used by the
 corresponding `Typeable` instances.

 The `ds_ev_typeable` function in `deSugar/DsBinds` just uses these
 functions when it needs to make evidence for `Typeable`.

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


More information about the ghc-tickets mailing list