forked from GitHub/gf-rgl
The new Decimal API
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user