[GHC] #8678: Derivin `Functor` complains about existential type
GHC
ghc-devs at haskell.org
Sat Mar 1 19:08:46 UTC 2014
#8678: Derivin `Functor` complains about existential type
-------------------------------------+------------------------------------
Reporter: heisenbug | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by heisenbug):
Replying to [comment:3 monoidal]:
> My guess is that the type of `Standard` is rewritten to `m ~ S n => a ->
NonStandard m a` (which is existential in `n`). Simpler test case: `data A
t a where A :: A Int a deriving Functor`.
Yeah, this is Henry Ford polymorphism ("you can have your car in any color
as long as it is black"). But still, `deriving Functor` should only
concern itself with the last parameter, which is manifestly not
existential.
Also, the parameter referred to has kind `Nat`, and thus is irrelevant for
endofunctors on `*`. Furthermore even your example establishes a
//functional dependency// between `t ~ Int`, so it should not count as
existential.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8678#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list