[project @ 2001-04-27 08:31:54 by simonmar]
authorsimonmar <unknown>
Fri, 27 Apr 2001 08:31:54 +0000 (08:31 +0000)
committersimonmar <unknown>
Fri, 27 Apr 2001 08:31:54 +0000 (08:31 +0000)
oops, can't use inCharRange here because of recursive dep.

ghc/compiler/utils/Outputable.lhs

index 165ce03..2dd48ce 100644 (file)
@@ -371,8 +371,8 @@ showCharLit c rest
 -- of Char and String.
 
 pprHsChar :: Int -> SDoc
-pprHsChar c | not (inCharRange c) = char '\\' <> show (fromIntegral c :: Word32)
-            | otherwise = text (show (chr c))
+pprHsChar c | c > 0x10ffff = char '\\' <> show (fromIntegral c :: Word32)
+            | otherwise    = text (show (chr c))
 
 pprHsString :: FastString -> SDoc
 pprHsString fs = text (show (unpackFS fs))