avoid name clases and make number feature accessible

This commit is contained in:
Herbert Lange
2019-06-24 18:19:54 +02:00
parent 4df898a038
commit 0f174af5b4
2 changed files with 33 additions and 11 deletions
+11 -5
View File
@@ -34,6 +34,10 @@ oper
abl : Case = Abl ;
voc : Case = ResLat.Voc ;
plural : Number = Pl ;
singular : Number = Sg ;
missing : Coordinator = Missing ;
mkN = overload {
mkN : (verbum : Str) -> N
= \n -> lin N ( noun n ) ;
@@ -41,9 +45,10 @@ oper
= \x,y,z -> lin N ( noun_ngg x y z ) ;
} ;
pluralN = ResLat.pluralN ;
singularN = ResLat.singularN ;
constN = ResLat.constN ;
pluralN : N -> N = \n -> lin N (ResLat.pluralNoun n) ;
singularN : N -> N = \n -> lin N (ResLat.singularNoun n) ;
constN : Str -> Gender-> N = \s,g -> lin N (ResLat.constNoun s g);
mkA = overload {
mkA : (verbum : Str) -> A -- Nominative masculine
= \n -> lin A ( adj n ** {isPre = False } ) ;
@@ -68,7 +73,7 @@ oper
False => let a = adj n in { s = table { Posit => a.s ! Posit ; _ => \\_ => nonExist } ; adv = a.adv }
} ** { isPre = False } )
} ;
constA : Str -> A = \s -> lin A (ResLat.constAdj s) ;
mkV = overload {
mkV : (tacere : Str) -> V
@@ -82,7 +87,7 @@ oper
V0 : Type = V;
mkV0 = overload {
mkV0 : V -> V0 = \v -> lin V0 v ; -- Same as in english, don't know if it's working
mkV0 : Str -> V0 = \v -> lin V0 (mkImpersonal v) ;
mkV0 : Str -> V0 = \v -> lin V0 (impersonalVerb v) ;
} ;
mkV2 = overload {
@@ -94,6 +99,7 @@ oper
= \v,p -> lin V2 ( v ** { c = p } ) ;
} ;
constV : Str -> Verb = \s -> lin V (ResLat.constVerb s) ;
mkAdv = overload {
mkAdv : Str -> Adv