(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. -- Constructed in NumeralHun.
Card = ResHun.Num ; Card = ResHun.Numeral ;
Numeral = ResHun.Numeral ; Numeral = ResHun.Numeral ;
Digits = {s : CardOrd => Str ; n : Number} ; 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} ; NumPl = baseNum ** {n = Pl} ;
-- : Card -> Num ; -- : 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 ; -- : Digits -> Card ;
-- NumDigits dig = -- NumDigits dig =

View File

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