#16412: Type family signatures in indefinite modules
"GHC" <[email protected]> Sat, 09 Mar 2019 02:52:01 -0000
| Newsgroups | gmane.comp.lang.haskell.glasgow.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============0791287614006404128==
Content-Type: multipart/related;
boundary="===============4320796795108883407=="
--===============4320796795108883407==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
#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>