Hello,

On Thu, Mar 19, 2009 at 05:49:34PM -0600, Duane Johnson wrote:
> I'm not sure I understand what is going on here, but it seems to me that 
> the following assignment of "mult = (*)" causes "mult" to lose out on some 
> of the polymorphic behavior of (*).  Is that right?  If so, why?

This is the monomorphism restriction kicking in.

See http://www.haskell.org/haskellwiki/Monomorphism_restriction.

> Prelude> let (...) = (*)
> Prelude> :t (...)
> (...) :: Integer -> Integer -> Integer
> 
> Prelude> :set -fno-monomorphism-restriction 
> Prelude> let (...) = (*)
> Prelude> :t (...)
> (...) :: (Num a) => a -> a -> a

-- 
Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to