summaryrefslogtreecommitdiff
path: root/compiler/hsSyn
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-07-18 23:11:02 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-07-18 23:11:02 +0100
commit5c9dfadd979ca3ccb8dd7c21ddb9fb0fe9cdb3fe (patch)
treeaedac951e211cd35fa93140fbb7640cac555784a /compiler/hsSyn
parent72883e48d93528acf44e3ba67c66a66833fe61f3 (diff)
parent8f4f29f655fdda443861152a24588fcaba29b168 (diff)
downloadhaskell-5c9dfadd979ca3ccb8dd7c21ddb9fb0fe9cdb3fe.tar.gz
Merge branch 'master' of http://darcs.haskell.org/ghc
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r--compiler/hsSyn/Convert.lhs3
-rw-r--r--compiler/hsSyn/HsExpr.lhs2
-rw-r--r--compiler/hsSyn/HsLit.lhs10
3 files changed, 10 insertions, 5 deletions
diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs
index 49cd0d3575..639cc39a59 100644
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@ -375,8 +375,7 @@ cvtForD (ImportF callconv safety from nm ty)
where
safety' = case safety of
Unsafe -> PlayRisky
- Safe -> PlaySafe False
- Threadsafe -> PlaySafe True
+ Safe -> PlaySafe
Interruptible -> PlayInterruptible
cvtForD (ExportF callconv as nm ty)
diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs
index 33cc2c503e..35bb17b10b 100644
--- a/compiler/hsSyn/HsExpr.lhs
+++ b/compiler/hsSyn/HsExpr.lhs
@@ -376,7 +376,7 @@ ppr_expr (OpApp e1 op _ e2)
= hang (ppr op) 2 (sep [pp_e1, pp_e2])
pp_infixly v
- = sep [nest 2 pp_e1, pprHsInfix v, nest 2 pp_e2]
+ = sep [pp_e1, sep [pprHsInfix v, nest 2 pp_e2]]
ppr_expr (NegApp e _) = char '-' <+> pprDebugParendExpr e
diff --git a/compiler/hsSyn/HsLit.lhs b/compiler/hsSyn/HsLit.lhs
index 2cda103479..2b556ea7aa 100644
--- a/compiler/hsSyn/HsLit.lhs
+++ b/compiler/hsSyn/HsLit.lhs
@@ -37,8 +37,10 @@ data HsLit
| HsStringPrim FastString -- Packed string
| HsInt Integer -- Genuinely an Int; arises from TcGenDeriv,
-- and from TRANSLATION
- | HsIntPrim Integer -- Unboxed Int
- | HsWordPrim Integer -- Unboxed Word
+ | HsIntPrim Integer -- literal Int#
+ | HsWordPrim Integer -- literal Word#
+ | HsInt64Prim Integer -- literal Int64#
+ | HsWord64Prim Integer -- literal Word64#
| HsInteger Integer Type -- Genuinely an integer; arises only from TRANSLATION
-- (overloaded literals are done with HsOverLit)
| HsRat FractionalLit Type -- Genuinely a rational; arises only from TRANSLATION
@@ -55,6 +57,8 @@ instance Eq HsLit where
(HsInt x1) == (HsInt x2) = x1==x2
(HsIntPrim x1) == (HsIntPrim x2) = x1==x2
(HsWordPrim x1) == (HsWordPrim x2) = x1==x2
+ (HsInt64Prim x1) == (HsInt64Prim x2) = x1==x2
+ (HsWord64Prim x1) == (HsWord64Prim x2) = x1==x2
(HsInteger x1 _) == (HsInteger x2 _) = x1==x2
(HsRat x1 _) == (HsRat x2 _) = x1==x2
(HsFloatPrim x1) == (HsFloatPrim x2) = x1==x2
@@ -148,6 +152,8 @@ instance Outputable HsLit where
ppr (HsDoublePrim d) = ppr d <> text "##"
ppr (HsIntPrim i) = integer i <> char '#'
ppr (HsWordPrim w) = integer w <> text "##"
+ ppr (HsInt64Prim i) = integer i <> text "L#"
+ ppr (HsWord64Prim w) = integer w <> text "L##"
-- in debug mode, print the expression that it's resolved to, too
instance OutputableBndr id => Outputable (HsOverLit id) where