On Fri, 10 Jun 2011 17:28:22 +0100, Patrick Browne <patrick.bro...@dit.ie> 
wrote:
> -- Not OK
> -- insert 2 [9,2]

This causes an error, because numeric literals like 2 are polymorphic:

> :t 2
2 :: Num a => a

If you fix the type to Integer, it works as expected:

insert (2 :: Integer) [9,2]

By the way: It's helpful to include the error messages in your mail when
some piece of code doesn't compile.

Cheers,
Daniel

Attachment: pgpiVLpuLW0ar.pgp
Description: PGP signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to