From: Matthijs Kooijman Date: Wed, 31 Mar 2010 11:55:44 +0000 (+0200) Subject: Add is_let predicate. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=2cc551233a06fbb34887db4f89ae7d153b81aedd;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add is_let predicate. --- diff --git "a/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" "b/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" index 19c1270..a4ea1ec 100644 --- "a/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" +++ "b/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" @@ -148,6 +148,11 @@ is_lam :: CoreSyn.CoreExpr -> Bool is_lam (CoreSyn.Lam _ _) = True is_lam _ = False +-- Is the given core expression a let expression? +is_let :: CoreSyn.CoreExpr -> Bool +is_let (CoreSyn.Let _ _) = True +is_let _ = False + -- Is the given core expression of a function type? is_fun :: CoreSyn.CoreExpr -> Bool -- Treat Type arguments differently, because exprType is not defined for them.