From: Matthijs Kooijman Date: Fri, 26 Jun 2009 10:37:50 +0000 (+0200) Subject: Let exprToVar give a useful error message. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=9eebebd95cbf192b0e0cf50e7266df26b20942aa;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Let exprToVar give a useful error message. --- 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