mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -06:00
fix in etaexpand optimization
This commit is contained in:
@@ -35,7 +35,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** open ResFin, MorphoFin, Coordinatio
|
|||||||
i_implicPron = mkPronoun [] "minun" "minua" "minuna" "minuun" Sg P1 ;
|
i_implicPron = mkPronoun [] "minun" "minua" "minuna" "minuun" Sg P1 ;
|
||||||
whatPart_IP = {
|
whatPart_IP = {
|
||||||
s = table {
|
s = table {
|
||||||
NPCase Nom | NPAcc => "mitä" ;
|
NPCase Nom | NPAcc => "mitä" ;
|
||||||
c => whatSg_IP.s ! c
|
c => whatSg_IP.s ! c
|
||||||
} ;
|
} ;
|
||||||
n = Sg
|
n = Sg
|
||||||
|
|||||||
@@ -167,8 +167,12 @@ partEval opts gr (context, val) trm = errIn ("parteval" +++ prt_ trm) $ do
|
|||||||
etaExpand su t = do
|
etaExpand su t = do
|
||||||
t' <- comp su t
|
t' <- comp su t
|
||||||
case t' of
|
case t' of
|
||||||
R _ -> comp su t' --- return t' wo noexpand...
|
R _ | rightType t' -> comp su t' --- return t' wo noexpand...
|
||||||
_ -> recordExpand val t' >>= comp su
|
_ -> recordExpand val t' >>= comp su
|
||||||
|
-- don't eta expand records of right length (correct by type checking)
|
||||||
|
rightType t = case (t,val) of
|
||||||
|
(R rs, RecType ts) -> length rs == length ts
|
||||||
|
_ -> False
|
||||||
|
|
||||||
outCase subst t = do
|
outCase subst t = do
|
||||||
pts <- getParams context
|
pts <- getParams context
|
||||||
|
|||||||
Reference in New Issue
Block a user