mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
possible to inherit an overload group without excluding+opening
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
--# -path=.:alltenses-1.4:prelude
|
--# -path=.:alltenses-1.4:prelude
|
||||||
|
|
||||||
resource TryEng = SyntaxEng - [mkAdv], LexiconEng, ParadigmsEng - [mkAdv] **
|
resource TryEng = SyntaxEng, LexiconEng, ParadigmsEng - [mkAdv] **
|
||||||
open (P = ParadigmsEng), (S = SyntaxEng) in {
|
open (P = ParadigmsEng), in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
mkAdv = overload SyntaxEng {
|
mkAdv = overload SyntaxEng {
|
||||||
mkAdv : Str -> Adv = P.mkAdv ;
|
mkAdv : Str -> Adv = P.mkAdv ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ checkResInfo gr mo mm (c,info) = do
|
|||||||
checkUniq xss = case xss of
|
checkUniq xss = case xss of
|
||||||
x:y:xs
|
x:y:xs
|
||||||
| x == y -> raise $ "ambiguous for type" +++
|
| x == y -> raise $ "ambiguous for type" +++
|
||||||
prtType gr (mkFunType (init x) (last x))
|
prtType gr (mkFunType (tail x) (head x))
|
||||||
| otherwise -> checkUniq $ y:xs
|
| otherwise -> checkUniq $ y:xs
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ extendAnyInfo isc n o i j =
|
|||||||
liftM ResParam $ updn isc n mt1 mt2
|
liftM ResParam $ updn isc n mt1 mt2
|
||||||
(ResValue mt1, ResValue mt2) ->
|
(ResValue mt1, ResValue mt2) ->
|
||||||
liftM ResValue $ updn isc n mt1 mt2
|
liftM ResValue $ updn isc n mt1 mt2
|
||||||
|
(_, ResOverload ms t) | elem n ms ->
|
||||||
|
return $ ResOverload ms t
|
||||||
(ResOper mt1 m1, ResOper mt2 m2) -> ---- extendResOper n mt1 m1 mt2 m2
|
(ResOper mt1 m1, ResOper mt2 m2) -> ---- extendResOper n mt1 m1 mt2 m2
|
||||||
liftM2 ResOper (updn isc n mt1 mt2) (updn isc n m1 m2)
|
liftM2 ResOper (updn isc n mt1 mt2) (updn isc n m1 m2)
|
||||||
(CncCat mc1 mf1 mp1, CncCat mc2 mf2 mp2) ->
|
(CncCat mc1 mf1 mp1, CncCat mc2 mf2 mp2) ->
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ lookupResDefKind gr m c = look True m c where
|
|||||||
CncCat _ _ _ -> liftM (flip (,) 1) $ lock c defLinType
|
CncCat _ _ _ -> liftM (flip (,) 1) $ lock c defLinType
|
||||||
CncFun (Just (cat,_)) (Yes tr) _ -> liftM (flip (,) 1) $ unlock cat tr
|
CncFun (Just (cat,_)) (Yes tr) _ -> liftM (flip (,) 1) $ unlock cat tr
|
||||||
|
|
||||||
CncFun _ (Yes tr) _ -> liftM (flip (,) 1) $ unlock c tr
|
CncFun _ (Yes tr) _ -> liftM (flip (,) 1) (return tr) ---- $ unlock c tr
|
||||||
|
|
||||||
AnyInd _ n -> look False n c
|
AnyInd _ n -> look False n c
|
||||||
ResParam _ -> return (QC m c,2)
|
ResParam _ -> return (QC m c,2)
|
||||||
|
|||||||
Reference in New Issue
Block a user