[project @ 2000-04-20 15:18:58 by simonmar]
[ghc-hetmet.git] / ghc / compiler / absCSyn / CStrings.lhs
index 0b543d4..e231993 100644 (file)
@@ -6,7 +6,7 @@ module CStrings(
 
        cSEP, pp_cSEP,
 
-       stringToC, charToC, pprFSInCStyle,
+       stringToC, charToC, pprFSInCStyle, pprStringInCStyle,
        charToEasyHaskell
   ) where
 
@@ -38,6 +38,9 @@ pp_cSEP = char '_'
 pprFSInCStyle :: FAST_STRING -> SDoc
 pprFSInCStyle fs = doubleQuotes (text (stringToC (_UNPK_ fs)))
 
+pprStringInCStyle :: String -> SDoc
+pprStringInCStyle s = doubleQuotes (text (stringToC s))
+
 stringToC   :: String -> String
 -- Convert a string to the form required by C in a C literal string
 -- Tthe hassle is what to do w/ strings like "ESC 0"...