mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-28 12:18:54 -06:00
fixed issue #67 on order of record fields in overloading
This commit is contained in:
@@ -332,6 +332,8 @@ getOverload gr g mt ot = case appForm ot of
|
|||||||
return $ Just v
|
return $ Just v
|
||||||
_ -> return Nothing
|
_ -> return Nothing
|
||||||
|
|
||||||
|
-- checkIfEqLType :: SourceGrammar -> Context -> Type -> Type -> Term -> Check (Bool,Type,Type,String)
|
||||||
|
-- checkEqLType :: SourceGrammar -> Context -> Type -> Type -> Term -> Check Type
|
||||||
where
|
where
|
||||||
collectOverloads tr@(Q c) = case lookupOverload gr c of
|
collectOverloads tr@(Q c) = case lookupOverload gr c of
|
||||||
Ok typs -> typs
|
Ok typs -> typs
|
||||||
@@ -399,7 +401,7 @@ getOverload gr g mt ot = case appForm ot of
|
|||||||
matchVal mt v = elem mt [Nothing,Just v,Just (unlocked v)]
|
matchVal mt v = elem mt [Nothing,Just v,Just (unlocked v)]
|
||||||
|
|
||||||
unlocked v = case v of
|
unlocked v = case v of
|
||||||
RecType fs -> RecType $ filter (not . isLockLabel . fst) fs
|
RecType fs -> RecType $ filter (not . isLockLabel . fst) (sortRec fs)
|
||||||
_ -> v
|
_ -> v
|
||||||
---- TODO: accept subtypes
|
---- TODO: accept subtypes
|
||||||
---- TODO: use a trie
|
---- TODO: use a trie
|
||||||
|
|||||||
Reference in New Issue
Block a user