X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=CoreTools.hs;h=0bfe58fa8fd4657149cf171e5295da54eb001559;hb=2ca7af8f94b990f13d9ef299a889e2ad591759a2;hp=a8dce3fab43ac345762307704a27b6d1e31592b3;hpb=e230d86ae7135a268a72cdffba947a9011001ec2;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/CoreTools.hs b/CoreTools.hs index a8dce3f..0bfe58f 100644 --- a/CoreTools.hs +++ b/CoreTools.hs @@ -98,4 +98,6 @@ is_lam _ = False -- Is the given core expression of a function type? is_fun :: CoreSyn.CoreExpr -> Bool -is_fun = Type.isFunTy . CoreUtils.exprType +-- Treat Type arguments differently, because exprType is not defined for them. +is_fun (CoreSyn.Type _) = False +is_fun expr = (Type.isFunTy . CoreUtils.exprType) expr