1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Model.Amount.Style where
5 import Data.Word (Word8)
6 import Data.Typeable ()
12 { fractioning :: Maybe Fractioning
13 , grouping_integral :: Maybe Grouping
14 , grouping_fractional :: Maybe Grouping
15 , precision :: Precision
16 , unit_side :: Maybe Side
17 , unit_spaced :: Maybe Spacing
18 } deriving (Data, Eq, Ord, Read, Show, Typeable)
25 deriving (Data, Eq, Ord, Read, Show, Typeable)
36 deriving (Data, Eq, Ord, Read, Show, Typeable)
43 { fractioning = Nothing
44 , grouping_integral = Nothing
45 , grouping_fractional = Nothing
48 , unit_spaced = Nothing
53 union :: Style -> Style -> Style
56 { fractioning=fractioning_
57 , grouping_integral=grouping_integral_
58 , grouping_fractional=grouping_fractional_
59 , precision=precision_
64 { fractioning=fractioning'
65 , grouping_integral=grouping_integral_'
66 , grouping_fractional=grouping_fractional_'
67 , precision=precision'
75 { fractioning=maybe fractioning' (const fractioning_) fractioning_
76 , grouping_integral=maybe grouping_integral_' (const grouping_integral_) grouping_integral_
77 , grouping_fractional=maybe grouping_fractional_' (const grouping_fractional_) grouping_fractional_
78 , precision=max precision_ precision'
79 , unit_side=maybe side' (const side) side
80 , unit_spaced=maybe spaced' (const spaced) spaced