]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Model/Conversion.hs
Modif : Model.Amount.Unit : type -> newtype, pour des instances sur-mesure.
[comptalang.git] / lib / Hcompta / Model / Conversion.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Model.Conversion where
3 {-
4 import Data.Data
5 import Data.Typeable ()
6
7 import qualified Hcompta.Model.Amount as Amount ()
8 import Hcompta.Model.Amount (Amount, Quantity, Style, Unit)
9 import qualified Hcompta.Model.Date as Date ()
10 import Hcompta.Model.Date (Date)
11
12 data Conversion
13 = Unit Quantity Unit Style
14 | Total Quantity Unit Style
15 deriving (Data, Eq, Ord, Read, Show, Typeable)
16
17 data Historical
18 = Historical
19 { amount :: Amount
20 , commodity :: Unit
21 , date :: Date
22 } deriving (Data, Read, Show, Typeable)
23
24 nil :: Maybe Conversion
25 nil = Nothing
26 -}