[GHC] #16412: Type family signatures in indefinite modules

GHC ghc-devs at haskell.org
Sat Mar 9 02:52:01 UTC 2019


#16412: Type family signatures in indefinite modules
-------------------------------------+-------------------------------------
           Reporter:  andrewthad     |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.4
           Keywords:  backpack       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Backpack does not allow type family signatures in indefinite modules. As
 an example, although GHC does accept:

 {{{
 -- indefinite module
 data Foo :: Bool
 -- implementing module
 type Foo = 'True
 }}}

 It does not accept:

 {{{
 -- indefinite module
 type family Foo (b :: Bool) :: Bool
 -- implementing module
 type family Foo (b :: Bool) :: Bool where
   Foo 'True = 'False
   Foo 'False = 'True
 }}}

 I'm not sure if there is a fundamental reason for this (e.g. a requirement
 that everything is matchable). It would be helpful for the thing I'm
 experimenting with if this restriction could be lifted.

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


More information about the ghc-tickets mailing list