1
0
forked from GitHub/gf-rgl

The new Decimal API

This commit is contained in:
Krasimir Angelov
2023-08-21 20:14:26 +02:00
parent 58da8deca8
commit fb398c603e
147 changed files with 918 additions and 188 deletions

View File

@@ -90,6 +90,7 @@ concrete CatGrc of Cat = CommonX - [Temp,Tense] ** open ResGrc, Prelude in {
Numeral = {s : CardOrd => Str ; n : Number} ;
Digits = {s : Str ; unit : Unit} ;
Decimal = {s : Str ; unit : Unit ; hasDot : Bool} ;
-- Structural

View File

@@ -83,6 +83,8 @@ concrete NounGrc of Noun = CatGrc ** open Prelude, ResGrc, (M = MorphoGrc) in {
-- TODO: check the following two:
NumDigits digits = let num : Number = case digits.unit of {one => Sg ; _ => Pl}
in {s = \\g,c => digits.s ++ "'"; n = num ; isCard = True} ;
NumDecimal digits = let num : Number = case digits.unit of {one => Sg ; _ => Pl}
in {s = \\g,c => digits.s ++ "'"; n = num ; isCard = True} ;
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
AdNum adn num = {s = \\g,c => adn.s ++ num.s ! g ! c ; n = num.n} ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../prelude:
concrete NumeralGrc of Numeral = CatGrc ** open ResGrc, MorphoGrc in {
concrete NumeralGrc of Numeral = CatGrc ** open ResGrc, MorphoGrc, Prelude in {
lincat
Digit = {s : DForm => CardOrd => Str} ;
@@ -81,6 +81,8 @@ lin -- mkDigit d (d+10) (d*10) d-th d-times
D_8 = mkDig "h" "p" "w" ;
D_9 = mkDig "v" "K" "P" ; -- TODO: replace K by koppa, P by sampi (not in ut -ancientgreek)
PosDecimal d = d ** {hasDot=False} ;
oper
TDigit = {
s : Unit => Str