mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
length test in overload
This commit is contained in:
@@ -617,8 +617,9 @@ getOverload env@gr mt t = case appForm t of
|
||||
---- TODO: use a trie
|
||||
lookupOverloadInstance tys typs =
|
||||
[(mkFunType rest val, t) |
|
||||
(ty,(val,t)) <- typs,
|
||||
let (pre,rest) = splitAt (length tys) ty,
|
||||
let lt = length tys,
|
||||
(ty,(val,t)) <- typs, length ty >= lt,
|
||||
let (pre,rest) = splitAt lt ty,
|
||||
pre == tys
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user