]> Git — Sourcephile - comptalang.git/blob - lcc/Hcompta/LCC/Compta.hs
Sync with symantic.
[comptalang.git] / lcc / Hcompta / LCC / Compta.hs
1 module Hcompta.LCC.Compta where
2
3 import Data.Eq (Eq)
4 import Data.Map.Strict (Map)
5 import Data.Text (Text)
6 import Text.Show (Show)
7
8 import Language.Symantic as Sym
9 import Hcompta.LCC.Amount
10 import Hcompta.LCC.Chart
11 import Hcompta.LCC.Journal
12
13 -- * Type 'Compta'
14 --
15 -- NOTE: 'Compta' is recursively prepended to @ss@ in 'compta_modules' here,
16 -- where it is possible. It is more simple than introducing some fix-point wrapping @ss@
17 -- to include 'Compta' later, especially because this fix-point
18 -- would not be a type-level list like @ss@, hence not matching Symantic's API.
19 data Compta src ss j
20 = Compta
21 { compta_chart :: Chart
22 , compta_journals :: Journals j
23 , compta_modules :: Sym.Modules src (Sym.Proxy (Compta src ss) ': ss)
24 , compta_style_amounts :: Style_Amounts
25 , compta_terms :: Terms
26 -- , compta_code :: Map Name Text
27 } deriving (Eq, Show)
28
29 -- * Type 'Terms'
30 type Terms = Map (Sym.Mod Sym.NameTe) Text
31