Your code uses what are called "n + k patterns" which are not supported in Haskell 2010 (they were supported in Haskell 98).
You can read a little about it on this SO question .
To make your code work, you can write
ripeti :: Int -> a -> [a] ripeti 0 x = [] ripeti nx = x : ripeti (n-1) x
Note that this will not stop if you specify a negative value for n , so I would rather define
ripeti :: Int -> a -> [a] ripeti nx | n <= 0 = [] | otherwise = x : ripeti (n-1) x
Chris taylor
source share