[GHC] #15138: Unable to instantiate data members of kind Nat in backpack signatures.

GHC ghc-devs at haskell.org
Thu May 10 09:30:59 UTC 2018


#15138: Unable to instantiate data members of kind Nat in backpack signatures.
-------------------------------------+-------------------------------------
           Reporter:  ppk            |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This is in context with backpack signatures and their instantiation with
 concrete implementation. Consider the signature `Abstract` which contains
 a
 data `NatType` of kind `Nat`.

 {{{#!hs

 {- skipped relevant language extensions -}

 signature Abstract where
      import GHC.TypeLits
      data NatType :: Nat  -- comment this out


 }}}

 Concrete implementations are unable to instantiate this abstract class
 during
 linking

 {{{#!hs

    module Concrete where
      type NatType = 42
 }}}

 This is neither working with explicit .bkp files nor actual cabal package.
 I have isolated a minimum example into a repository [[https://github.com
 /piyush-kurur/backpack-nat| a cabal packages]] as well as a
 [[https://github.com/piyush-kurur/backpack-nat/blob/master/as-bkpfiles
 /backpack-nat.bkp|single bkp file]]. The urls above also have the
 associated
 ghc log messages.

 The version of ghc I have tested with is 8.4.1

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


More information about the ghc-tickets mailing list