[GHC] #15710: Should accept a type that needs coercion quantification
GHC
ghc-devs at haskell.org
Fri Oct 5 16:56:57 UTC 2018
#15710: Should accept a type that needs coercion quantification
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Consider
{{{
f :: forall k (f :: k) (x :: k1). (k ~ (k1 -> *)) => f x
f = error "uk"
}}}
Should we accept it? Now that we have coercion quantification (Trac
#15497), I think the answer should be yes, with the elaborated signature
being
{{{
f :: forall k (f::k) (x::k1). forall (co :: k ~# (k1->*)). (f |> co) x
}}}
But there is a problem: the user wrote `k ~ (k1 -> *)`, and that's a boxed
value that we can't take apart in types. I'm not sure what to do here.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15710>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list