[GHC] #3743: type checker fails to infer an implicit parameter
constraint in the presence of existential types.
GHC
trac at galois.com
Thu Jan 14 04:38:02 EST 2010
#3743: type checker fails to infer an implicit parameter constraint in the
presence of existential types.
---------------------------------+------------------------------------------
Reporter: int-e | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.14.1
Component: Compiler | Version: 6.13
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonpj):
Interesting example. Somehow I missed this bug when you first submitted
it.
Any type inference under local constraints is tricky. See our paper "Let
should not be generalised". In the type system of that paper the program
would be rejected on the grounds that we can't solve the implication
{{{
forall a. Foo a => (?x::())
}}}
But in this case there's an obvious simple constraint we could infer.
I'll discuss with Dimitrios, and add it to my list for the new constraint
solver.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3743#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list