[GHC] #15515: Bogus "No instance" error when type families appear in kinds
GHC
ghc-devs at haskell.org
Tue Aug 14 14:39:55 UTC 2018
#15515: Bogus "No instance" error when type families appear in kinds
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler (Type | Version: 8.4.3
checker) | Keywords: TypeInType,
Resolution: | TypeFamilies
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
The class instance should be rejected -- indeed, I'm quite surprised it's
not.
Let's write with explicit kinds:
{{{#!hs
class C k a where ...
instance C (F -> Type) D where ...
}}}
That instance mentions a type family in one of its arguments, which should
be rejected.
I would love to come up with a way where we ignore determined dependent
arguments during matching, which would then allow this instance to work,
but we're not there yet.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15515#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list