Skip to content

Commit 5375cda

Browse files
committed
add type signatures to keep the old type checker happy
1 parent e76e11e commit 5375cda

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/scots/ParadigmsSco.gf

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
resource ParadigmsSco = ParadigmsEng - [regV, reg2V, regDuplV, irregV, irreg4V, irregDuplV, mkV, mkV2, mkV3, mkV2V, mkV2Q] ** open Prelude, ResSco, CatSco in {
22

33
oper
4+
regV : Str -> V ;
45
regV cry =
56
let
67
cries = (regN cry).s ! Pl ! Nom ; -- !
7-
cried : Str = case cries of {
8-
_ + "es" => init cries + "d" ;
9-
_ + "ers" => init cries + "ed" ;
10-
_ => duplFinal cry + "ed"
8+
criet : Str = case cry of {
9+
rax@(_ + ("x"|"sh"|"ch")) => rax+"t";
10+
hurt@(_ + ("t"|"p"|"d")) => hurt + "it" ;
11+
traivel@(_ + ("l"|"n"|"r"|"ie"|"y")) => traivel + "t" ;
12+
clean => clean + "ed"
1113
} ;
1214
cryin : Str = case cry of {
1315
_ + "ee" => cry + "in" ;
@@ -16,30 +18,35 @@ oper
1618
ent + "er" => ent + "erin" ;
1719
_ => duplFinal cry + "in"
1820
}
19-
in mk5V cry cries cried cried cryin ;
21+
in mk5V cry cries criet criet cryin ;
2022

21-
reg2V fit fitted =
22-
let fitt = Predef.tk 2 fitted ;
23+
reg2V : Str -> Str -> V ;
24+
reg2V fit fittet =
25+
let fitt = Predef.tk 2 fittet ;
2326
in
2427
if_then_else V (pbool2bool (Predef.eqStr (last fit) (last fitt)))
25-
(mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "in"))
28+
(mk5V fit (fit + "s") (fitt + "et") (fitt + "et") (fitt + "in"))
2629
(regV fit) ;
2730

31+
regDuplV : Str -> V ;
2832
regDuplV fit =
2933
case last fit of {
3034
("a" | "e" | "i" | "o" | "u" | "y") =>
3135
Predef.error (["final duplication makes no sense for"] ++ fit) ;
3236
t =>
3337
let fitt = fit + t in
34-
mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "in")
38+
mk5V fit (fit + "s") (fitt + "et") (fitt + "et") (fitt + "in")
3539
} ;
3640

41+
irregV : Str -> Str -> Str -> V ;
3742
irregV x y z = let reg = (regV x).s in
3843
mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = []} ;
3944

45+
irreg4V : Str -> Str -> Str -> Str -> V ;
4046
irreg4V x y z w = let reg = (regV x).s in
4147
mk5V x (reg ! VPres) y z w ** {s1 = []} ;
4248

49+
irregDuplV : Str -> Str -> Str -> V ;
4350
irregDuplV fit y z =
4451
let
4552
fitting = (regDuplV fit).s ! VPresPart

0 commit comments

Comments
 (0)