import Type ( Type )
import Var ( TyVar, Id )
import DataCon ( DataCon )
+import CStrings ( CLabelString, pprCLabelString )
import SrcLoc ( SrcLoc )
\end{code}
-- direct from the components
Bool -- boxed?
- | HsCon DataCon -- TRANSLATION; a saturated constructor application
- [Type]
- [HsExpr id pat]
-- Record construction
| RecordCon id -- The constructor
(HsRecordBinds id pat)
| RecordUpdOut (HsExpr id pat) -- TRANSLATION
- Type -- Type of *result* record (may differ from
+ Type -- Type of *result* record (may differ from
-- type of input record)
- [id] -- Dicts needed for construction
+ [id] -- Dicts needed for construction
(HsRecordBinds id pat)
| ExprWithTySig -- signature binding
(HsExpr id pat) -- (typechecked, of course)
(ArithSeqInfo id pat)
- | CCall FAST_STRING -- call into the C world; string is
+ | HsCCall CLabelString -- call into the C world; string is
[HsExpr id pat] -- the C function; exprs are the
-- arguments to pass.
Bool -- True <=> might cause Haskell
pprBinds b = pprDeeper (ppr b)
ppr_expr (HsVar v) = ppr v
-ppr_expr (HsIPVar v) = char '?' <> ppr v
+ppr_expr (HsIPVar v) = {- char '?' <> -} ppr v
ppr_expr (HsLit lit) = ppr lit
ppr_expr (HsLitOut lit _) = ppr lit
ppr_expr (ExplicitTuple exprs False)
= ptext SLIT("(#") <> sep (punctuate comma (map ppr_expr exprs)) <> ptext SLIT("#)")
-ppr_expr (HsCon con_id tys args)
- = ppr con_id <+> sep (map pprParendType tys ++
- map pprParendExpr args)
-
ppr_expr (RecordCon con_id rbinds)
= pp_rbinds (ppr con_id) rbinds
ppr_expr (RecordConOut data_con con rbinds)
ppr_expr (ELazyPat e) = char '~' <> pprParendExpr e
ppr_expr (EAsPat v e) = ppr v <> char '@' <> pprParendExpr e
-ppr_expr (CCall fun args _ is_asm result_ty)
+ppr_expr (HsCCall fun args _ is_asm result_ty)
= hang (if is_asm
- then ptext SLIT("_casm_ ``") <> ptext fun <> ptext SLIT("''")
- else ptext SLIT("_ccall_") <+> ptext fun)
+ then ptext SLIT("_casm_ ``") <> pprCLabelString fun <> ptext SLIT("''")
+ else ptext SLIT("_ccall_") <+> pprCLabelString fun)
4 (sep (map pprParendExpr args))
ppr_expr (HsSCC lbl expr)
pp_rbinds thing rbinds
= hang thing
- 4 (braces (hsep (punctuate comma (map (pp_rbind) rbinds))))
+ 4 (braces (sep (punctuate comma (map (pp_rbind) rbinds))))
where
pp_rbind (v, e, pun_flag)
= getPprStyle $ \ sty ->