
23 Jan
2003
23 Jan
'03
9:05 a.m.
"Simon Peyton-Jones"
R.hs:1: Ambiguous type variable `a' in constraints `Random a' arising from use of `randomRs' at R.hs:4 `Num a' arising from the literal `0' at R.hs:4 Possible cause: the monomorphism restriction applied to the following: f :: Int -> [a] (bound at R.hs:4)
How about explicitly suggesting a type signature? Referring to "the monomorphism restriction" will probably not be helpful to novices, who are the ones who need clear error messages the most. -kzm -- If I haven't seen further, it is by standing in the footprints of giants