diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 16:14:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 16:14:26 +0100 |
commit | 1bcd32b8e0f252d3b830c961184dab9d8b61dba9 (patch) | |
tree | 0d6315c9e1a06c4801d89be85c21fa95df97b34e /compiler/stranal/WwLib.lhs | |
parent | c679ce14814a044d6607b31b8e65e9c7ea17af81 (diff) | |
download | haskell-1bcd32b8e0f252d3b830c961184dab9d8b61dba9.tar.gz |
Add Type.tyConAppTyCon_maybe and tyConAppArgs_maybe, and use them
These turn out to be a useful special case of splitTyConApp_maybe.
A refactoring only; no change in behaviour
Diffstat (limited to 'compiler/stranal/WwLib.lhs')
-rw-r--r-- | compiler/stranal/WwLib.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index 1b8b270024..7627ac9b04 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -515,7 +515,7 @@ mk_absent_let :: Id -> Maybe (CoreExpr -> CoreExpr) mk_absent_let arg | not (isUnLiftedType arg_ty) = Just (Let (NonRec arg abs_rhs)) - | Just (tc, _) <- splitTyConApp_maybe arg_ty + | Just tc <- tyConAppTyCon_maybe arg_ty , Just lit <- absentLiteralOf tc = Just (Let (NonRec arg (Lit lit))) | arg_ty `eqType` realWorldStatePrimTy |