forked from GitHub/gf-core
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
|
---- TODO: use a trie
|
||||||
lookupOverloadInstance tys typs =
|
lookupOverloadInstance tys typs =
|
||||||
[(mkFunType rest val, t) |
|
[(mkFunType rest val, t) |
|
||||||
(ty,(val,t)) <- typs,
|
let lt = length tys,
|
||||||
let (pre,rest) = splitAt (length tys) ty,
|
(ty,(val,t)) <- typs, length ty >= lt,
|
||||||
|
let (pre,rest) = splitAt lt ty,
|
||||||
pre == tys
|
pre == tys
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user