X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FSimplUtils.lhs;h=6ab117fe6e17b95d9a3fe68a2539bc5ef7c7d5fc;hb=7f7b6cefcfbcf81ca3abd18c65498c5ba4860204;hp=fbe5f18b892c1c84c06cd3f4cbc065dcf384fedd;hpb=6f074a37a1546391632863898da3c32bbb7995df;p=ghc-hetmet.git diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index fbe5f18..6ab117f 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -19,7 +19,7 @@ module SimplUtils ( mkBoringStop, mkLazyArgStop, mkRhsStop, contIsRhsOrArg, interestingCallContext, interestingArgContext, - interestingArg, isStrictBndr, mkArgInfo + interestingArg, mkArgInfo ) where #include "HsVersions.h" @@ -216,6 +216,14 @@ interestingArg (Var v) = hasSomeUnfolding (idUnfolding v) interestingArg (Type _) = False interestingArg (App fn (Type _)) = interestingArg fn interestingArg (Note _ a) = interestingArg a + +-- Idea (from Sam B); I'm not sure if it's a good idea, so commented out for now +-- interestingArg expr | isUnLiftedType (exprType expr) +-- -- Unlifted args are only ever interesting if we know what they are +-- = case expr of +-- Lit lit -> True +-- _ -> False + interestingArg other = True -- Consider let x = 3 in f x -- The substitution will contain (x -> ContEx 3), and we want to @@ -777,7 +785,7 @@ activeRule env -- to work in Template Haskell when simplifying -- splices, so we get simpler code for literal strings SimplPhase n -> Just (isActive n) -\end{code} +\end{code} %************************************************************************ @@ -1251,7 +1259,7 @@ match. For example: other -> ...(case x of 0# -> ... other -> ...) ... -\end{code} +\end{verbatim} Here the inner case can be eliminated. This really only shows up in eliminating error-checking code.