(Por) improve mkV

- regV with more cases
- separate one instance of mkA into an oper
This commit is contained in:
odanoburu
2018-05-11 15:57:35 -03:00
parent 2299c0b50f
commit 38852ee672

View File

@@ -219,6 +219,8 @@ oper
} ; } ;
isPre = a.isPre ; lock_A = <>} ; isPre = a.isPre ; lock_A = <>} ;
mkNonInflectA : A -> Str -> A ;
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
mkA = overload { mkA = overload {
@@ -243,7 +245,7 @@ oper
= mkADeg ; = mkADeg ;
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective
= \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ; = mkNonInflectA ;
} ; } ;
-- The functions above create postfix adjectives. To switch them to -- The functions above create postfix adjectives. To switch them to
@@ -287,32 +289,38 @@ oper
--2 Verbs --2 Verbs
regV : Str -> V ; regV : Str -> V ;
regV v = -- cortar actuar cazar guiar pagar sacar regV v =
let let
xr = Predef.dp 2 v ; -- -ar xr = Predef.dp 2 v ; -- -ar
z = Predef.dp 1 (Predef.tk 2 v) ; -- i in -iar z = Predef.dp 1 (Predef.tk 2 v) ; -- i in -iar
verb = case xr of { paradigm = case xr of {
"ir" => case z of { "ir" => case z of {
"g" => redigir_52 v ; "g" => redigir_52 ;
"a" => sair_68 v ; "a" => sair_68 ;
"u" => distribuir_73 v ; "u" => distribuir_73 ;
_ => garantir_6 v _ => garantir_6
} ; } ;
"er" => case z of { "er" => case z of {
"c" => aquecer_25 v ; "c" => aquecer_25 ;
_ => vender_5 v "g" => proteger_26 ;
"o" => moer_28 ;
_ => vender_5
} ; } ;
"ar" => case z of { "ar" => case z of {
"e" => recear_15 v ; "c" => ficar_12 ;
"i" => anunciar_16 v ; "ç" => começar_13 ;
"o" => perdoar_20 v ; "e" => recear_15 ;
"u" => averiguar_21 v ; "g" => chegar_14 ;
_ => comprar_4 v "i" => anunciar_16 ;
"j" => viajar_r22 ;
"o" => perdoar_20 ;
"u" => suar_r37 ;
_ => comprar_4
} ; } ;
"or" => pôr_45 v ; "or" | "ôr" => pôr_45 ;
_ => comprar_4 v -- hole _ => comprar_4 -- hole
} }
in verboV verb ; in verboV (paradigm v) ;
{- regAltV : (mostrar,muestro : Str) -> V ; {- regAltV : (mostrar,muestro : Str) -> V ;
regAltV x y = case x of { regAltV x y = case x of {