1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Model.Amount.Style where
5 import Data.Word (Word8)
6 import Data.Typeable ()
12 { decimal_point :: Maybe Char
13 , format :: Maybe Format
15 , unit_side :: Maybe Side
16 , unit_spaced :: Maybe Bool
17 } deriving (Data, Eq, Ord, Read, Show, Typeable)
22 deriving (Data, Eq, Ord, Read, Show, Typeable)
26 deriving (Data, Eq, Ord, Read, Show, Typeable)
33 { decimal_point = Nothing
37 , unit_spaced = Nothing
42 union :: Style -> Style -> Style
45 { decimal_point=decimal_point_
47 , precision=precision_
52 { decimal_point=decimal_point'
54 , precision=precision'
62 { decimal_point=maybe decimal_point' (const decimal_point_) decimal_point_
63 , format=maybe format_' (const format_) format_
64 , precision=max precision_ precision'
65 , unit_side=maybe side' (const side) side
66 , unit_spaced=maybe spaced' (const spaced) spaced