diff --git a/lib/resource-1.0/api/Constructors.gf b/lib/resource-1.0/api/Constructors.gf index 36599a3ee..0820baa90 100644 --- a/lib/resource-1.0/api/Constructors.gf +++ b/lib/resource-1.0/api/Constructors.gf @@ -71,19 +71,19 @@ incomplete resource Constructors = open Grammar in { --2 Sentences, and clauses mkS : overload { - mkS : Cl -> S ; -- John walks - mkS : Tense -> Cl -> S ; -- John walked - mkS : Ant -> Cl -> S ; -- John has walked - mkS : Pol -> Cl -> S ; -- John doesn't walk - mkS : Tense -> Ant -> Cl -> S ; -- John had walked - mkS : Tense -> Pol -> Cl -> S ; -- John didn't walk - mkS : Ant -> Pol -> Cl -> S ; -- John hasn't walked - mkS : Tense -> Ant -> Pol -> Cl -> S ; -- John wouldn't have walked - mkS : Conj -> S -> S -> S ; -- John walks and Mary talks - mkS : DConj -> S -> S -> S ; -- either I leave or you come - mkS : Conj -> ListS -> S ; -- John walks, Mary talks, and Bob runs - mkS : DConj -> ListS -> S ; -- either I leave, you come, or he runs - mkS : Adv -> S -> S -- today, I will sleep + mkS : Cl -> S ; -- John walks + mkS : Tense -> Cl -> S ; -- John walked + mkS : Ant -> Cl -> S ; -- John has walked + mkS : Pol -> Cl -> S ; -- John doesn't walk + mkS : Tense -> Ant -> Cl -> S ; -- John had walked + mkS : Tense -> Pol -> Cl -> S ; -- John didn't walk + mkS : Ant -> Pol -> Cl -> S ; -- John hasn't walked + mkS : Tense -> Ant -> Pol -> Cl -> S ; -- John wouldn't have walked + mkS : Conj -> S -> S -> S ; -- John walks and Mary talks + mkS : DConj -> S -> S -> S ; -- either I leave or you come + mkS : Conj -> ListS -> S ; -- John walks, Mary talks, and Bob runs + mkS : DConj -> ListS -> S ; -- either I leave, you come, or he runs + mkS : Adv -> S -> S -- today, I will sleep } ; mkCl : overload { diff --git a/lib/resource-1.0/api/Syntax.gf b/lib/resource-1.0/api/Syntax.gf new file mode 100644 index 000000000..c8c3ab783 --- /dev/null +++ b/lib/resource-1.0/api/Syntax.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +interface Syntax = Constructors, Cat, Structural ** {} ; + diff --git a/lib/resource-1.0/api/SyntaxEng.gf b/lib/resource-1.0/api/SyntaxEng.gf new file mode 100644 index 000000000..15144f5f9 --- /dev/null +++ b/lib/resource-1.0/api/SyntaxEng.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxEng of Syntax = ConstructorsEng, CatEng, StructuralEng ** {} ; + diff --git a/lib/resource-1.0/api/SyntaxFin.gf b/lib/resource-1.0/api/SyntaxFin.gf new file mode 100644 index 000000000..07ebbc3dd --- /dev/null +++ b/lib/resource-1.0/api/SyntaxFin.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxFin of Syntax = ConstructorsFin, CatFin, StructuralFin ** {} ; + diff --git a/lib/resource-1.0/api/SyntaxFre.gf b/lib/resource-1.0/api/SyntaxFre.gf new file mode 100644 index 000000000..dcc076acd --- /dev/null +++ b/lib/resource-1.0/api/SyntaxFre.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxFre of Syntax = ConstructorsFre, CatFre, StructuralFre ** {} ; + diff --git a/lib/resource-1.0/api/SyntaxGer.gf b/lib/resource-1.0/api/SyntaxGer.gf new file mode 100644 index 000000000..d444c7bfb --- /dev/null +++ b/lib/resource-1.0/api/SyntaxGer.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxGer of Syntax = ConstructorsGer, CatGer, StructuralGer ** {} ; + diff --git a/lib/resource-1.0/api/SyntaxSwe.gf b/lib/resource-1.0/api/SyntaxSwe.gf new file mode 100644 index 000000000..96c30e4db --- /dev/null +++ b/lib/resource-1.0/api/SyntaxSwe.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxSwe of Syntax = ConstructorsSwe, CatSwe, StructuralSwe ** {} ; + diff --git a/lib/resource-1.0/english/ParadigmsEng.gf b/lib/resource-1.0/english/ParadigmsEng.gf index bca681ba4..cf28cedf4 100644 --- a/lib/resource-1.0/english/ParadigmsEng.gf +++ b/lib/resource-1.0/english/ParadigmsEng.gf @@ -127,10 +127,6 @@ oper nounPN : N -> PN ; --- To form a noun phrase that can also be plural and have an irregular --- genitive, you can use the worst-case function. - - mkNP : Str -> Str -> Number -> Gender -> NP ; --2 Adjectives @@ -271,12 +267,12 @@ oper mkAV : A -> AV ; mkA2V : A -> Prep -> A2V ; --- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated +-- Notice: categories $V2S, V2V, V2Q$ are in v 1.0 treated -- just as synonyms of $V2$, and the second argument is given -- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$. -- $V0$ is just $V$. - V0, V2S, V2V, V2A, V2Q : Type ; + V0, V2S, V2V, V2Q : Type ; AS, A2S, AV, A2V : Type ; --. @@ -354,8 +350,6 @@ oper regPN n = regGenPN n human ; regGenPN n g = nameReg n g ** {lock_PN = <>} ; nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; - mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ; - lock_NP = <>} ; mk2A a b = mkAdjective a a a b ** {lock_A = <>} ; regA a = regAdjective a ** {lock_A = <>} ; @@ -462,7 +456,7 @@ oper mkVQ v = v ** {lock_VQ = <>} ; V0 : Type = V ; - V2S, V2V, V2Q, V2A : Type = V2 ; + V2S, V2V, V2Q : Type = V2 ; AS, A2S, AV : Type = A ; A2V : Type = A2 ; diff --git a/src/GF/Compile/Rebuild.hs b/src/GF/Compile/Rebuild.hs index 52224c4a1..06f4b663e 100644 --- a/src/GF/Compile/Rebuild.hs +++ b/src/GF/Compile/Rebuild.hs @@ -49,13 +49,11 @@ rebuildModule ms mo@(i,mi) = do --- to avoid double inclusions, in instance I of I0 = J0 ** ... case extends m of [] -> return $ replaceJudgements m js' - j0:jj -> do - m0 <- lookupModMod gr j0 - let notInM0 c _ = not $ isInBinTree c $ jments m0 + j0s -> do + m0s <- mapM (lookupModMod gr) j0s + let notInM0 c _ = all (not . isInBinTree c . jments) m0s let js2 = filterBinTree notInM0 js' - if null jj - then return $ replaceJudgements m js2 - else Bad "FIXME: handle multiple inheritance in instance" + return $ replaceJudgements m js2 return $ ModMod m' _ -> return mi