[Haskell-cafe] Inferred type is less polymorphic than expected,
depends on order
Jason Dagit
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.
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081007/81661b1f/attachment.htm
More information about the Haskell-Cafe
mailing list