fixes for ops in the presence of $ scopedId
Haldean Brown
4 years ago
37 | 37 | case exprs of |
38 | 38 | [] -> Failure $ BadArity "$" 1 (length exprs) |
39 | 39 | (name:args) -> |
40 | case name of | |
40 | case canonicalIfId name of | |
41 | 41 | Id n -> return $ NativeCall n args |
42 | 42 | _ -> Failure $ BadNativeName name e |
43 | canonicalIfId x@(Id _) = x | |
44 | canonicalIfId x@(ScopedId _ _) = canonicalId x | |
45 | canonicalIfId x = x | |
46 | ||
43 | 47 | loadOpsExpr e = return e |
44 | 48 | |
45 | 49 | loadOpsDef :: Def -> Artifact Def |