- data NumConfig s = NumConfig {}
- data NumSymbol s = NumSym {
- symType :: SymbolType
- symVal :: Integer
- symScope :: Integer
- symRepr :: Gender -> SymbolContext -> s
- data SymbolType
- data SymbolContext
- data Gender
- cardinal :: NumConfig s -> Gender -> Integer -> Maybe s
- findSym :: [NumSymbol s] -> Integer -> Maybe (NumSymbol s)
- term :: Integer -> (SymbolContext -> s) -> NumSymbol s
- add :: Integer -> Integer -> (SymbolContext -> s) -> NumSymbol s
- mul :: Integer -> (SymbolContext -> s) -> NumSymbol s
- termG :: Integer -> (Gender -> SymbolContext -> s) -> NumSymbol s
- addG :: Integer -> Integer -> (Gender -> SymbolContext -> s) -> NumSymbol s
- mulG :: Integer -> (Gender -> SymbolContext -> s) -> NumSymbol s
- gender :: s -> s -> Gender -> s
- genderN :: s -> s -> s -> Gender -> s
- tenForms :: s -> s -> s -> SymbolContext -> s
- tenFormsG :: (Gender -> s) -> (Gender -> s) -> (Gender -> s) -> Gender -> SymbolContext -> s
- tenForms' :: s -> s -> s -> s -> SymbolContext -> s
- mulForms :: s -> s -> SymbolContext -> s
Types
NumSym | |
|
data SymbolContext Source
Cardinals
Smart NumSymbol constructors
term :: Integer -> (SymbolContext -> s) -> NumSymbol sSource
mul :: Integer -> (SymbolContext -> s) -> NumSymbol sSource
Symbol representation helper functions
tenForms :: s -> s -> s -> SymbolContext -> sSource
Constructs a symbol representation based on the relation of the symbol with the number 10. The chosen representation depends on the context in which the symbol is used: d) default: x a) additive: 10 + x m) multiplicative: x * 10
tenForms' :: s -> s -> s -> s -> SymbolContext -> sSource
Constructs a symbol representation based on the relation of the symbol with the number 10. The chosen representation depends on the context in which the symbol is used: d) default: x a) additive: 10 + x mt) multiplicative: x * 10 mh) multiplicative: x * 100
mulForms :: s -> s -> SymbolContext -> sSource