@@ -1,5 +1,6 @@
1{-# LANGUAGE AllowAmbiguousTypes #-}
1{-# LANGUAGE AllowAmbiguousTypes #-}
2{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DataKinds #-}
3+{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE KindSignatures #-}
5{-# LANGUAGE KindSignatures #-}
5{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE ScopedTypeVariables #-}
@@ -11,9 +12,9 @@ module Data.Money.Internal ( Money(..)
14import Data.Fixed (Centi)
16import Data.Fixed (Centi)
15import Data.Group
17import Data.Group
17import GHC.Generics
18import GHC.Generics
18import GHC.TypeLits
19import GHC.TypeLits
19import GHC.Stack (HasCallStack)
20import GHC.Stack (HasCallStack)
@@ -22,7 +23,7 @@ import GHC.Stack (HasCallStack)
22-- The type parameter is phantom, you probably want to use 'Currency' there.
23-- The type parameter is phantom, you probably want to use 'Currency' there.
23-- See also 'Data.Money.Currencies' for currency types.
24-- See also 'Data.Money.Currencies' for currency types.
24newtype Money curr = Money { getAmount :: Centi }
25newtype Money curr = Money { getAmount :: Centi }
25− deriving (Eq, Ord, Generic)
26+ deriving (Eq, Ord, Generic, Data)
27-- | Empty type, used only to carry its type parameter with a currency code around. E.g. 'Currency "USD"', 'Currency "GBP"', et cetera.
28-- | Empty type, used only to carry its type parameter with a currency code around. E.g. 'Currency "USD"', 'Currency "GBP"', et cetera.
28-- See Data.Money.Currencies for pre-defined currency types.
29-- See Data.Money.Currencies for pre-defined currency types.