import CoreSyn
import DsMonad
-import DsBinds ( dsMonoBinds )
+import DsBinds ( dsMonoBinds, AutoScc(..) )
import DsGRHSs ( dsGuarded )
import DsCCall ( dsCCall )
import DsListComp ( dsListComp )
-- Ordinary case for bindings
dsLet (MonoBind binds sigs is_rec) body
- = dsMonoBinds False binds [] `thenDs` \ prs ->
+ = dsMonoBinds NoSccs binds [] `thenDs` \ prs ->
case is_rec of
Recursive -> returnDs (Let (Rec prs) body)
NonRecursive -> returnDs (foldr mk_let body prs)
= returnDs (mkLit (NoRepStr str stringTy))
dsExpr (HsLitOut (HsLitLit str) ty)
- = returnDs ( mkConApp data_con [mkLit (MachLitLit str prim_ty)] )
+ = case (maybeBoxedPrimType ty) of
+ Just (boxing_data_con, prim_ty) ->
+ returnDs ( mkConApp boxing_data_con [mkLit (MachLitLit str prim_ty)] )
+ _ ->
+ pprError "ERROR:"
+ (vcat
+ [ hcat [ text "Cannot see data constructor of ``literal-literal''s type: "
+ , text "value:", quotes (quotes (ptext str))
+ , text "; type: ", ppr ty
+ ]
+ , text "Try compiling with -fno-prune-tydecls."
+ ])
+
where
(data_con, prim_ty)
= case (maybeBoxedPrimType ty) of