@@ -889,12 +889,12 @@ isDConName n ctxt
889889
890890isFnName :: Name -> Context -> Bool
891891isFnName n ctxt
892− = or $ do def <- lookupCtxt n (definitions ctxt)
893− case tfst def of
894− (Function _ _) -> return True
895− (Operator _ _ _) -> return True
896− (CaseOp _ _ _ _ _ _) -> return True
897− _ -> return False
892+ = let def = lookupCtxtExact n (definitions ctxt) in
893+ case def of
894+ Just (Function _ _, _, _, _) -> True
895+ Just (Operator _ _ _, _, _, _) -> True
896+ Just (CaseOp _ _ _ _ _ _, _, _, _) -> True
897+ _ -> False
898898
899899lookupP :: Name -> Context -> [Term]
900900lookupP n ctxt