[Haskell-beginners] Inconsistencies in type inference
Brent Yorgey
byorgey at seas.upenn.edu
Tue Jun 25 20:45:50 CEST 2013
I should add that it is recommended to disable the monomorphism
restriction, by putting
:set -XNoMonomorphismRestriction
in your .ghci file. It has very dubious benefits and usually only
serves to confuse.
-Brent
On Tue, Jun 25, 2013 at 01:36:26PM +0200, David Virebayre wrote:
> The monomorphism restriction forces ghci to infer a default type.
>
> Prelude> :set -XNoMonomorphismRestriction
> Prelude> let mul = (*)
> Prelude> :t mul
> mul :: Num a => a -> a -> a
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
More information about the Beginners
mailing list