Your code uses something called "n + k patterns" which are not supported in Haskell 2010 (they were supported in Haskell 98).
You can read a bit more about it at this SO question.
To get your code to work, you can write
ripeti :: Int -> a -> [a]
ripeti 0 x = []
ripeti n x = x : ripeti (n-1) x
Note that this will not terminate if you supply a negative value for n
, so I would rather define
ripeti :: Int -> a -> [a]
ripeti n x | n <= 0 = []
| otherwise = x : ripeti (n-1) x