adjusting parameter types in Romance and fixing some compilation bugs

This commit is contained in:
aarne
2007-10-14 14:08:41 +00:00
parent 54db8d29f7
commit 405dc75016
6 changed files with 17 additions and 13 deletions

View File

@@ -74,12 +74,12 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
P3 => elision "s" ; --- use of reflPron incred. expensive P3 => elision "s" ; --- use of reflPron incred. expensive
_ => argPron Fem n p Acc _ => argPron Fem n p Acc
},True> ; },True> ;
CPron a => <argPron a.g a.n a.p Acc,True> ; CPron ag an ap => <argPron ag an ap Acc,True> ;
_ => <[],False> _ => <[],False>
} ; } ;
in in
case dat of { case dat of {
CPron a => let pdat = argPron a.g a.n a.p dative in case a.p of { CPron ag an ap => let pdat = argPron ag an ap dative in case ap of {
P3 => <pacc.p1 ++ pdat,[],True> ; P3 => <pacc.p1 ++ pdat,[],True> ;
_ => <pdat ++ pacc.p1,[],True> _ => <pdat ++ pacc.p1,[],True>
} ; } ;
@@ -90,7 +90,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
-- Positive polarity is used in the imperative: stressed for 1st and -- Positive polarity is used in the imperative: stressed for 1st and
-- 2nd persons. -- 2nd persons.
pronArgGen : Polarity -> Number -> Person -> CAgr -> CAgr -> Str * Str = \b,n,p,acc,dat -> pronArgGen : Polarity -> Number -> Person -> CAgr -> CAgr -> Str * Str =
\b,n,p,acc,dat ->
let let
cas : Person -> Case -> Case = \pr,c -> case <pr,b> of { cas : Person -> Case -> Case = \pr,c -> case <pr,b> of {
<P1 | P2, Pos> => CPrep P_de ; --- encoding in argPron <P1 | P2, Pos> => CPrep P_de ; --- encoding in argPron
@@ -101,16 +102,16 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
P3 => elision "s" ; --- use of reflPron incred. expensive P3 => elision "s" ; --- use of reflPron incred. expensive
_ => argPron Fem n p (cas p Acc) _ => argPron Fem n p (cas p Acc)
} ; } ;
CPron a => argPron a.g a.n a.p (cas a.p Acc) ; CPron ag an ap => argPron ag an ap (cas ap Acc) ;
_ => [] _ => []
} ; } ;
pdat = case dat of { pdat = case dat of {
CPron a => argPron a.g a.n a.p (cas a.p dative) ; CPron ag an ap => argPron ag an ap (cas ap dative) ;
_ => [] _ => []
} ; } ;
in in
case dat of { case dat of {
CPron {p = P3} => <pacc ++ pdat,[]> ; CPron _ _ P3 => <pacc ++ pdat,[]> ;
_ => <pdat ++ pacc, []> _ => <pdat ++ pacc, []>
} ; } ;

View File

@@ -87,7 +87,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
P3 => "si" ; P3 => "si" ;
_ => argPron Fem n p Acc False --- no clitic after acc _ => argPron Fem n p Acc False --- no clitic after acc
} ; } ;
CPron a => argPron a.g a.n a.p Acc False ; CPron ag an ap => argPron ag an ap Acc False ;
_ => [] _ => []
} ; } ;
hasAcc = case acc of { hasAcc = case acc of {
@@ -99,7 +99,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
_ => True _ => True
} ; } ;
pdat = case dat of { pdat = case dat of {
CPron a => argPron a.g a.n a.p dative hasAcc ; CPron ag an ap => argPron ag an ap dative hasAcc ;
_ => [] _ => []
} ; } ;
in in

View File

@@ -129,7 +129,8 @@ param
-- Clitic slots. -- Clitic slots.
CAgr = CPron {g : Gender ; n : Number ; p : Person} | CRefl | CNone ; --- Agr CAgr = CPron Gender Number Person | CRefl | CNone ; --- Agr
--- CAgr = CPron {g : Gender ; n : Number ; p : Person} | CRefl | CNone ; --- Agr
oper oper
aagr : Gender -> Number -> AAgr = \g,n -> aagr : Gender -> Number -> AAgr = \g,n ->

View File

@@ -104,12 +104,13 @@ oper
vpdat = vp.clDat ; vpdat = vp.clDat ;
vpagr = vp.agr ; vpagr = vp.agr ;
npa = np.a ; npa = np.a ;
cpron = CPron npa.g npa.n npa.p ;
noNewClit = <vpacc, vpdat, appCompl c np.s, vpagr> ; noNewClit = <vpacc, vpdat, appCompl c np.s, vpagr> ;
cc : CAgr * CAgr * Str * VPAgr = case <np.hasClit,c.isDir> of { cc : CAgr * CAgr * Str * VPAgr = case <np.hasClit,c.isDir> of {
<True,True> => case c.c of { <True,True> => case c.c of {
Acc => <CPron npa, vpdat, [], vpAgrClit npa> ; Acc => <cpron, vpdat, [], vpAgrClit npa> ;
_ => <vpacc, CPron npa, [], vpagr> -- must be dat _ => <vpacc, cpron, [], vpagr> -- must be dat
} ; } ;
_ => noNewClit _ => noNewClit
} ; } ;

View File

@@ -63,11 +63,11 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
let let
paccp = case acc of { paccp = case acc of {
CRefl => <reflPron n p Acc, p,True> ; CRefl => <reflPron n p Acc, p,True> ;
CPron a => <argPron a.g a.n a.p Acc, a.p,True> ; CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
_ => <[],P2,False> _ => <[],P2,False>
} ; } ;
pdatp = case dat of { pdatp = case dat of {
CPron a => <argPron a.g a.n a.p dative, a.p,True> ; CPron ag an ap => <argPron ag an ap dative, ap,True> ;
_ => <[],P2,False> _ => <[],P2,False>
} }
in case <paccp.p2, pdatp.p2> of { in case <paccp.p2, pdatp.p2> of {

View File

@@ -235,6 +235,7 @@ computeTermOpt rec gr = comp where
---- foldr1 C (map K (str2strings (glueStr v (str a)))) | v <- x'] ---- foldr1 C (map K (str2strings (glueStr v (str a)))) | v <- x']
,return $ Glue x y ,return $ Glue x y
] ]
(C u v,_) -> comp g $ C u (Glue v y)
_ -> do _ -> do
mapM_ checkNoArgVars [x,y] mapM_ checkNoArgVars [x,y]