summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsExpr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/deSugar/DsExpr.hs')
-rw-r--r--compiler/deSugar/DsExpr.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index bf04f13ce9..a08c3ac7cb 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -314,6 +314,13 @@ dsExpr (ExplicitTuple tup_args boxity)
; return $ mkCoreLams lam_vars $
mkCoreTupBoxity boxity args }
+dsExpr (ExplicitSum alt arity expr types)
+ = do { core_expr <- dsLExpr expr
+ ; return $ mkCoreConApps (sumDataCon alt arity)
+ (map (Type . getRuntimeRep "dsExpr ExplicitSum") types ++
+ map Type types ++
+ [core_expr]) }
+
dsExpr (HsSCC _ cc expr@(L loc _)) = do
dflags <- getDynFlags
if gopt Opt_SccProfilingOn dflags