summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsUtils.lhs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-09-15 07:29:46 +0000
committersimonpj@microsoft.com <unknown>2008-09-15 07:29:46 +0000
commit4179e02ec7ec7aea79273cdcc166123c2ddd2063 (patch)
tree6b3dcc1f2f6f9e9df3b859b3e8fbfde0a99f68d5 /compiler/deSugar/DsUtils.lhs
parent539b572921068dc02cec4c5a71e8516958949336 (diff)
downloadhaskell-4179e02ec7ec7aea79273cdcc166123c2ddd2063.tar.gz
Minor refactoring to get rid of Type.splitNewTyConApp
Diffstat (limited to 'compiler/deSugar/DsUtils.lhs')
-rw-r--r--compiler/deSugar/DsUtils.lhs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs
index 62328bc7a1..24579df162 100644
--- a/compiler/deSugar/DsUtils.lhs
+++ b/compiler/deSugar/DsUtils.lhs
@@ -46,6 +46,7 @@ import {-# SOURCE #-} DsExpr( dsExpr )
import HsSyn
import TcHsSyn
+import TcType( tcSplitTyConApp )
import CoreSyn
import DsMonad
@@ -287,7 +288,8 @@ mkCoAlgCaseMatchResult var ty match_alts
(con1, arg_ids1, match_result1) = ASSERT( notNull match_alts ) head match_alts
arg_id1 = ASSERT( notNull arg_ids1 ) head arg_ids1
var_ty = idType var
- (tc, ty_args) = splitNewTyConApp var_ty
+ (tc, ty_args) = tcSplitTyConApp var_ty -- Don't look through newtypes
+ -- (not that splitTyConApp does, these days)
newtype_rhs = unwrapNewTypeBody tc ty_args (Var var)
-- Stuff for data types