Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Amount.hs:
- module Money
- (
- Currency
- ) where
- class (Eq a, Show a) => Currency a where
- code :: a -> String
- intSep :: a -> Char
- decSep :: a -> Char
- symbol :: a -> String
- decPlaces :: a -> Word8
- Currencies.hs:
- import qualified Money(Amount, Currency)
- data COP = COP
- instance Money.Currency COP where
- code = "COP"
- intSep = '.'
- decSep = ','
- symbol = "$"
- decPlaces = 2
Advertisement
Add Comment
Please, Sign In to add comment