There are two problems with the code.
- Indentation with your code
Once you make that correct, it throws a type error for this code:
instance Show Money where
show (Money notes) = giveMoney (value notes)
You can rectify that by converting the code to:
instance Show Money where
show (Money notes) = show $ giveMoney (value notes)
Demo in ghci:
ghci> Money [Ten]
[Ten]