1
0
forked from GitHub/gf-rgl

(Hun) Adjust types for numerals

This commit is contained in:
Inari Listenmaa
2020-03-30 21:51:42 +02:00
parent 4a8668fce9
commit 60500231d8
3 changed files with 14 additions and 12 deletions

View File

@@ -76,7 +76,7 @@ concrete CatHun of Cat = CommonX ** open ResHun, Prelude in {
-- Constructed in NumeralHun.
Card = ResHun.Num ;
Card = ResHun.Numeral ;
Numeral = ResHun.Numeral ;
Digits = {s : CardOrd => Str ; n : Number} ;

View File

@@ -82,7 +82,9 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
NumPl = baseNum ** {n = Pl} ;
-- : Card -> Num ;
NumCard card = card ;
NumCard card = card ** {
n = Sg -- Numerals take noun in Sg: e.g. öt város, literally 'five city'
} ;
-- : Digits -> Card ;
-- NumDigits dig =

View File

@@ -120,24 +120,24 @@ oper
numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
} ;
Num : Type = {
Numeral : Type = {
s : Place => Str ; -- Independent or attribute
n : Number ; -- Singular or plural
numtype : NumType ; -- Digit, numeral or Sg/Pl : makes a difference in many languages
} ;
baseNum : Num = {
s = \\_ => [] ;
n = Sg ;
numtype = NoNum
-- TODO add ordinal
} ;
{- Numeral can become Num via
Noun.gf: NumNumeral : Numeral -> Card ;
Noun.gf: NumCard : Card -> Num ;
-}
Numeral : Type = Num ** {
-- TODO add ordinal
Num : Type = Numeral ** {
n : Number ; -- Singular or plural
} ;
baseNum : Num = {
s = \\_ => [] ;
n = Sg ;
numtype = NoNum
} ;
--------------------------------------------------------------------------------