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