
2 Oct
2010
2 Oct
'10
11:22 a.m.
On 01.10.2010 05:43, Russ Abbott wrote:
let (zipWithPlus :: Num a => [a] -> [a] -> [a]) = zipWith (+)
<interactive>:1:5: Illegal signature in pattern: (Num a) => [a] -> [a] -> [a] Use -XScopedTypeVariables to permit it
It works if you write it as: let zipWithPlus :: Num a => [a] -> [a] -> [a]; zipWithPlus = zipWith (+) I.e. writing it exactly as you would in a file (inside a do-block), but with a semicolon where the linebreak would be.