summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2010-07-30 13:19:22 +0000
committersimonpj@microsoft.com <unknown>2010-07-30 13:19:22 +0000
commit70249b050422f2abba670e5fdb3c5853ceeb662c (patch)
treec2ec08fbf4ee77d6d9c4950d870350e5a7a26b8f
parent13346da217137e4efb6cf14657960c75a23251ad (diff)
downloadhaskell-70249b050422f2abba670e5fdb3c5853ceeb662c.tar.gz
* Add StringPrimL as a constructor for Template Haskell (Trac #4168)
There are already constructors for IntPrim, FloatPrim etc, so this makes it more uniform. There's a corresponding patch for the TH library
-rw-r--r--compiler/hsSyn/Convert.lhs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs
index 2a4fa724b4..d392be24e3 100644
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@ -589,11 +589,12 @@ cvtLit (WordPrimL w) = do { force w; return $ HsWordPrim w }
cvtLit (FloatPrimL f) = do { force f; return $ HsFloatPrim f }
cvtLit (DoublePrimL f) = do { force f; return $ HsDoublePrim f }
cvtLit (CharL c) = do { force c; return $ HsChar c }
-cvtLit (StringL s)
- = do { let { s' = mkFastString s }
- ; force s'
- ; return $ HsString s'
- }
+cvtLit (StringL s) = do { let { s' = mkFastString s }
+ ; force s'
+ ; return $ HsString s' }
+cvtLit (StringPrimL s) = do { let { s' = mkFastString s }
+ ; force s'
+ ; return $ HsStringPrim s' }
cvtLit _ = panic "Convert.cvtLit: Unexpected literal"
-- cvtLit should not be called on IntegerL, RationalL
-- That precondition is established right here in