mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
debugging gfcc bug; resulted in some type annotations to work around problems
This commit is contained in:
@@ -29,7 +29,8 @@ GFCCP=$(GFCC) -preproc=./mkPresent
|
||||
new:
|
||||
export GF='../../bin/gf -s' ; make -e all
|
||||
|
||||
all: chmod show-path prelude present alltenses mathematical api langs compiled
|
||||
all: langs compiled
|
||||
#all: chmod show-path prelude present alltenses mathematical api langs compiled
|
||||
|
||||
chmod:
|
||||
chmod a+x mkPresent
|
||||
|
||||
@@ -10,7 +10,7 @@ instance DiffDan of DiffScand = open CommonScand, Prelude in {
|
||||
neutrum = Neutr ;
|
||||
|
||||
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||
case <g,n> of {
|
||||
case <<g,n> : Gender * Number> of {
|
||||
<Utr, Sg> => SgUtr ;
|
||||
<Neutr,Sg> => SgNeutr ;
|
||||
_ => Plg
|
||||
|
||||
@@ -11,7 +11,7 @@ instance DiffNor of DiffScand = open CommonScand, Prelude in {
|
||||
neutrum = Neutr ;
|
||||
|
||||
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||
case <g,n> of {
|
||||
case <<g,n> : Gender * Number> of {
|
||||
<Utr _,Sg> => SgUtr ;
|
||||
<Neutr,Sg> => SgNeutr ;
|
||||
_ => Plg
|
||||
|
||||
@@ -81,10 +81,12 @@ oper
|
||||
|
||||
-- Used in $Noun.AdjCN$.
|
||||
|
||||
agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d -> case <gn,d> of {
|
||||
<_, DIndef> => Strong gn ;
|
||||
<Plg,DDef _> => Weak Pl ;
|
||||
_ => Weak Sg
|
||||
----- agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d -> Strong gn ; --- debug
|
||||
agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d ->
|
||||
case <<gn,d> : GenNum * DetSpecies> of {
|
||||
<_, DIndef> => Strong gn ;
|
||||
<Plg,DDef _> => Weak Pl ;
|
||||
_ => Weak Sg
|
||||
} ;
|
||||
|
||||
-- Used in $DiffScand.predV$.
|
||||
|
||||
@@ -9,8 +9,19 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in {
|
||||
utrum = Utr ;
|
||||
neutrum = Neutr ;
|
||||
|
||||
gennumN : Gender -> Number -> GenNum = \g,n -> Plg ; -----
|
||||
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||
case <g,n> of {
|
||||
{-
|
||||
--- debugging Compute 9/11/2007
|
||||
case n of {
|
||||
Sg => case g of {
|
||||
Utr => SgUtr ;
|
||||
Neutr => SgNeutr
|
||||
} ;
|
||||
_ => Plg
|
||||
} ;
|
||||
-}
|
||||
case <<g,n> : Gender * Number> of {
|
||||
<Utr,Sg> => SgUtr ;
|
||||
<Neutr,Sg> => SgNeutr ;
|
||||
_ => Plg
|
||||
|
||||
@@ -179,6 +179,7 @@ computeTermOpt rec gr = comp where
|
||||
vs <- allParamValues gr ptyp
|
||||
case lookup v' (zip vs [0 .. length vs - 1]) of
|
||||
Just i -> comp g $ ts !! i
|
||||
----- _ -> prtBad "selection" $ S t' v' -- debug
|
||||
_ -> return $ S t' v' -- if v' is not canonical
|
||||
|
||||
T (TComp _) cs -> do
|
||||
@@ -196,8 +197,7 @@ computeTermOpt rec gr = comp where
|
||||
Alias _ _ d -> comp g (S d v')
|
||||
|
||||
S (T i cs) e -> prawitz g i (flip S v') cs e
|
||||
|
||||
_ -> returnC $ S t' v'
|
||||
_ -> returnC $ S t' v'
|
||||
|
||||
-- normalize away empty tokens
|
||||
K "" -> return Empty
|
||||
|
||||
Reference in New Issue
Block a user