
10 Jun
2011
10 Jun
'11
5:04 p.m.
On Fri, 10 Jun 2011 17:28:22 +0100, Patrick Browne
-- 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