(Pes) Add comparative

This commit is contained in:
Inari Listenmaa
2019-05-14 15:19:16 +02:00
parent 31d4e5971a
commit 1372c0b354
5 changed files with 34 additions and 20 deletions
+6 -2
View File
@@ -321,9 +321,13 @@ oper
mkA = overload {
mkA : Str -> A -- Regular adjective, same adj and adv forms.
= \str -> lin A (mkAdj str str);
= \str -> lin A (case str of {
_ + " " + _ => mkAdj str str str ;
_ => mkAdj str str }) ;
mkA : Str-> Str -> A -- Takes adj and adv forms
= \str,adv -> lin A (mkAdj str adv);
mkA : (pos,compar,adv : Str) -> A -- positive, comparative and adverb
= \p,c,adv -> lin A (mkAdj p c adv);
mkA : Str -> Str -> A2 -- Takes string and complementiser, returns A2. Hidden from public API, confusing naming. /IL
= \a,c -> lin A2 (mkAdj a a ** {c2 = c})
} ;
@@ -331,7 +335,7 @@ oper
prefixA a = a ** {isPre=True};
preA : (adj,adv : Str) -> A = \adj,adv ->
lin A ((mkAdj adj adv) ** {isPre=True}) ;
lin A (<mkAdj adj adv:Adjective> ** {isPre=True}) ;
{-
-- Demonstrative Pronouns