From 9eebebd95cbf192b0e0cf50e7266df26b20942aa Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 26 Jun 2009 12:37:50 +0200 Subject: [PATCH] Let exprToVar give a useful error message. --- CoreTools.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/CoreTools.hs b/CoreTools.hs index 3f9b33c..33a4a62 100644 --- a/CoreTools.hs +++ b/CoreTools.hs @@ -165,6 +165,7 @@ has_free_vars = not . VarSet.isEmptyVarSet . CoreFVs.exprFreeVars -- simple Var CoreExprs, not complexer ones. exprToVar :: CoreSyn.CoreExpr -> Var.Id exprToVar (CoreSyn.Var id) = id +exprToVar expr = error $ "CoreTools.exprToVar Not a var: " ++ show expr -- Removes all the type and dictionary arguments from the given argument list, -- leaving only the normal value arguments. The type given is the type of the -- 2.30.2