[GHC] #12119: Can't create injective type family equation with TypeError as the RHS
GHC
ghc-devs at haskell.org
Sun Oct 21 23:29:38 UTC 2018
#12119: Can't create injective type family equation with TypeError as the RHS
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: wontfix | CustomTypeErrors, TypeFamilies,
| InjectiveFamilies
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by AntC):
Replying to [comment:6 sheaf]:
> What about the following: ...
>
> This seems useful to me, ...
Sure, it's the same structure as the O.P.
>
> I feel like the injectivity annotation should be allowed in this case
...
It is. Ryan's comment:5 says what's not allowed is the `TypeError` catch-
all equation -- that is, if you want `ToDim` to be injective.
So if you call `ToDim 5`, inference will get stuck, and you'll get an
error message somewhere/somehow else.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12119#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list