diff options
| author | aarne <aarne@cs.chalmers.se> | 2006-12-21 10:38:26 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2006-12-21 10:38:26 +0000 |
| commit | ed46bb13647a387291340a8ee40cc61a0cb8db4d (patch) | |
| tree | bc9c9ebebbdf340693a5c124de622a65ccb0d82e /src | |
| parent | fd90fe0791961982570835582dc900627ee62cd5 (diff) | |
length test in overload
Diffstat (limited to 'src')
| -rw-r--r-- | src/GF/Compile/CheckGrammar.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index 53c8dbab9..6ac23e3b2 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -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 ] |
