mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
add type signatures to keep the old type checker happy
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
resource ParadigmsSco = ParadigmsEng - [regV, reg2V, regDuplV, irregV, irreg4V, irregDuplV, mkV, mkV2, mkV3, mkV2V, mkV2Q] ** open Prelude, ResSco, CatSco in {
|
resource ParadigmsSco = ParadigmsEng - [regV, reg2V, regDuplV, irregV, irreg4V, irregDuplV, mkV, mkV2, mkV3, mkV2V, mkV2Q] ** open Prelude, ResSco, CatSco in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
regV : Str -> V ;
|
||||||
regV cry =
|
regV cry =
|
||||||
let
|
let
|
||||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||||
cried : Str = case cries of {
|
criet : Str = case cry of {
|
||||||
_ + "es" => init cries + "d" ;
|
rax@(_ + ("x"|"sh"|"ch")) => rax+"t";
|
||||||
_ + "ers" => init cries + "ed" ;
|
hurt@(_ + ("t"|"p"|"d")) => hurt + "it" ;
|
||||||
_ => duplFinal cry + "ed"
|
traivel@(_ + ("l"|"n"|"r"|"ie"|"y")) => traivel + "t" ;
|
||||||
|
clean => clean + "ed"
|
||||||
} ;
|
} ;
|
||||||
cryin : Str = case cry of {
|
cryin : Str = case cry of {
|
||||||
_ + "ee" => cry + "in" ;
|
_ + "ee" => cry + "in" ;
|
||||||
@@ -16,30 +18,35 @@ oper
|
|||||||
ent + "er" => ent + "erin" ;
|
ent + "er" => ent + "erin" ;
|
||||||
_ => duplFinal cry + "in"
|
_ => duplFinal cry + "in"
|
||||||
}
|
}
|
||||||
in mk5V cry cries cried cried cryin ;
|
in mk5V cry cries criet criet cryin ;
|
||||||
|
|
||||||
reg2V fit fitted =
|
reg2V : Str -> Str -> V ;
|
||||||
let fitt = Predef.tk 2 fitted ;
|
reg2V fit fittet =
|
||||||
|
let fitt = Predef.tk 2 fittet ;
|
||||||
in
|
in
|
||||||
if_then_else V (pbool2bool (Predef.eqStr (last fit) (last fitt)))
|
if_then_else V (pbool2bool (Predef.eqStr (last fit) (last fitt)))
|
||||||
(mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "in"))
|
(mk5V fit (fit + "s") (fitt + "et") (fitt + "et") (fitt + "in"))
|
||||||
(regV fit) ;
|
(regV fit) ;
|
||||||
|
|
||||||
|
regDuplV : Str -> V ;
|
||||||
regDuplV fit =
|
regDuplV fit =
|
||||||
case last fit of {
|
case last fit of {
|
||||||
("a" | "e" | "i" | "o" | "u" | "y") =>
|
("a" | "e" | "i" | "o" | "u" | "y") =>
|
||||||
Predef.error (["final duplication makes no sense for"] ++ fit) ;
|
Predef.error (["final duplication makes no sense for"] ++ fit) ;
|
||||||
t =>
|
t =>
|
||||||
let fitt = fit + t in
|
let fitt = fit + t in
|
||||||
mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "in")
|
mk5V fit (fit + "s") (fitt + "et") (fitt + "et") (fitt + "in")
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
irregV : Str -> Str -> Str -> V ;
|
||||||
irregV x y z = let reg = (regV x).s in
|
irregV x y z = let reg = (regV x).s in
|
||||||
mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = []} ;
|
mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = []} ;
|
||||||
|
|
||||||
|
irreg4V : Str -> Str -> Str -> Str -> V ;
|
||||||
irreg4V x y z w = let reg = (regV x).s in
|
irreg4V x y z w = let reg = (regV x).s in
|
||||||
mk5V x (reg ! VPres) y z w ** {s1 = []} ;
|
mk5V x (reg ! VPres) y z w ** {s1 = []} ;
|
||||||
|
|
||||||
|
irregDuplV : Str -> Str -> Str -> V ;
|
||||||
irregDuplV fit y z =
|
irregDuplV fit y z =
|
||||||
let
|
let
|
||||||
fitting = (regDuplV fit).s ! VPresPart
|
fitting = (regDuplV fit).s ! VPresPart
|
||||||
|
|||||||
Reference in New Issue
Block a user