]> Git — Sourcephile - comptalang.git/blob - lcc/Hcompta/LCC/Sym/Chart.hs
Add Sym.Compta and sync with symantic.
[comptalang.git] / lcc / Hcompta / LCC / Sym / Chart.hs
1 {-# LANGUAGE UndecidableInstances #-}
2 {-# OPTIONS_GHC -fno-warn-orphans #-}
3 -- | Symantic for 'Chart'.
4 module Hcompta.LCC.Sym.Chart where
5
6 import Data.Eq (Eq)
7 import Data.Function (($))
8 import Data.Maybe (Maybe(..))
9 import Text.Show (Show(..))
10
11 import Hcompta.LCC.Account
12 import Hcompta.LCC.Amount
13 import Hcompta.LCC.Chart (Chart)
14 import qualified Hcompta.LCC.Chart as LCC
15
16 import Hcompta.LCC.Sym.Account (tyAccount)
17 import Hcompta.LCC.Sym.Amount (tyAmounts)
18
19 import Language.Symantic
20
21 -- * Class 'Sym_Chart'
22 type instance Sym Chart = Sym_Chart
23 class Sym_Chart (term:: * -> *) where
24
25 instance Sym_Chart Eval where
26 instance Sym_Chart View where
27 instance (Sym_Chart r1, Sym_Chart r2) => Sym_Chart (Dup r1 r2) where
28 instance (Sym_Chart term, Sym_Lambda term) => Sym_Chart (BetaT term)
29
30 instance ClassInstancesFor Chart where
31 instance TypeInstancesFor Chart where
32
33 instance Gram_Term_AtomsFor src ss g Chart
34 instance (Source src, SymInj ss Chart) => ModuleFor src ss Chart where
35 moduleFor = ["Chart"] `moduleWhere`
36 [
37 ]
38
39 tyChart :: Source src => LenInj vs => Type src vs Chart
40 tyChart = tyConst @(K Chart) @Chart