The reason is that Double is not an instance of Enum.
There are 2 possibilities:
- Make Double an instance of Enum.
- Use the function that converts Int values to any numeric type you need:
For example:
(map (** 2) . map fromInt) [0..9]
or, if you prefer:
map ((** 2) . fromInt) [0..9]