on master help sign in
isFnName should look for exact names
7af5df9Edwin Brady
src/Idris/Core/Evaluate.hs+6−6
@@ -889,12 +889,12 @@ isDConName n ctxt
889
889
890isFnName :: Name -> Context -> Bool
890isFnName :: Name -> Context -> Bool
891isFnName n ctxt
891isFnName n ctxt
892− = or $ do def <- lookupCtxt n (definitions ctxt)
892+ = let def = lookupCtxtExact n (definitions ctxt) in
893− case tfst def of
893+ case def of
894− (Function _ _) -> return True
894+ Just (Function _ _, _, _, _) -> True
895− (Operator _ _ _) -> return True
895+ Just (Operator _ _ _, _, _, _) -> True
896− (CaseOp _ _ _ _ _ _) -> return True
896+ Just (CaseOp _ _ _ _ _ _, _, _, _) -> True
897− _ -> return False
897+ _ -> False
898
898
899lookupP :: Name -> Context -> [Term]
899lookupP :: Name -> Context -> [Term]
900lookupP n ctxt
900lookupP n ctxt