[Haskell-cafe] Inferred type is less polymorphic than expected,
depends on order
dagit at codersbase.com
Tue Oct 7 12:29:11 EDT 2008
On Tue, Oct 7, 2008 at 1:13 AM, Ryan Ingram <ryani.spam at gmail.com> wrote:
> You may think it doesn't matter, because you could instantiate it to
> anything after the fact, but it's possible that the result of the case
> statement depends on the choice of instantiation for sy; consider if
> sy had an additional constraint:
> > Sealed (fromInteger) :: forall t. Num t => Sealed ((->) Integer)
> Now the result of the case statement is the concrete implementation of
> fromInteger for whatever type it gets instantiated at.
Thanks, I was indeed hoping to see examples of things that break if the
type checker behaved the way I wanted.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe