[Haskell-cafe] Monomorphism restriction

Neil Mitchell ndmitchell at gmail.com
Tue Jan 23 13:11:03 EST 2007


Hi

This should clear up some of the questions:

http://haskell.org/hawiki/MonomorphismRestriction

Note to others (esp Cale): does this page not appear on the new wiki?

Thanks

Neil

On 1/23/07, Marco Túlio Gontijo e Silva <malebria at riseup.net> wrote:
> Hello,
>
> I talked for a while with bd_ about this on #haskell, and I think maybe
> I'm just being silly. But I can't get why:
>
> > lambda = \x -> length (show x)
>
> or
>
> > dot = length . show
>
> is different from
>
> > pre x = length $ show x
>
> I read about monomorphism restriction on the haskell 98 report, but I
> couldn't find where it explains the reason why these different versions
> influence on type infer.
>
> Thanks for any help.
>
> --
> malebria
> Marco Túlio Gontijo e Silva
> Correio (MSN): malebria at riseup.net
> Jabber (GTalk): malebria at jabber.org
> Ekiga: malebria at ekiga.net
> IRC: malebria at irc.freenode.net
>      malebria at irc.oftc.org
> Skype: marcotmarcot
> Telefone: 33346720
> Celular: 98116720
> Endereço:
>     Rua Paula Cândido, 257/201
>     Gutierrez 30430-260
>     Belo Horizonte/MG Brasil
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list