module Hcompta.For where import Data.Map.Strict (Map) import qualified Data.TreeMap.Strict as TM import qualified Data.MonoTraversable as MT {- -- * Type family 'NameFor' type family NameFor a :: * type instance NameFor [a] = NameFor a type instance NameFor (a, b) = NameFor a type instance NameFor (TM.Path a) = a -} -- * Type family 'UnitFor' type family UnitFor a :: * type instance UnitFor [a] = UnitFor a type instance UnitFor (a, b) = UnitFor b type instance UnitFor (Map unit qty) = unit -- * Type family 'QuantityFor' type family QuantityFor a :: * type instance QuantityFor [a] = QuantityFor a type instance QuantityFor (a, b) = QuantityFor b type instance QuantityFor (Map unit qty) = qty -- * Type family 'DateFor' type family DateFor a :: * -- * Type family 'AccountFor' type family AccountFor a :: * type instance AccountFor [a] = AccountFor a type instance AccountFor (TM.Path name, Map unit qty) = TM.Path name -- ** Type 'NameFor' type NameFor a = MT.Element (AccountFor a) -- * Type family 'PostingsFor' type family PostingsFor a :: * -- * Type family 'AmountFor' type family AmountFor a :: *