diff options
author | simonmar <unknown> | 2006-01-09 13:29:02 +0000 |
---|---|---|
committer | simonmar <unknown> | 2006-01-09 13:29:02 +0000 |
commit | f4965a02229f7f2e44acc41e70475b0fe1b26233 (patch) | |
tree | a3dbc490a5384e4415daea8232bba1b8f9c51361 /ghc/compiler/utils/Encoding.hs | |
parent | 5d8f5e005c673f6e14a7e1b61f889b176ccf4766 (diff) | |
download | haskell-f4965a02229f7f2e44acc41e70475b0fe1b26233.tar.gz |
[project @ 2006-01-09 13:29:02 by simonmar]
Avoid desugaring bug in HEAD (see test ds057).
Diffstat (limited to 'ghc/compiler/utils/Encoding.hs')
-rw-r--r-- | ghc/compiler/utils/Encoding.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/compiler/utils/Encoding.hs b/ghc/compiler/utils/Encoding.hs index 1f266e11a7..7b35e65da4 100644 --- a/ghc/compiler/utils/Encoding.hs +++ b/ghc/compiler/utils/Encoding.hs @@ -92,8 +92,8 @@ utf8DecodeChar# a# = -- will signal a lexer error immediately. utf8DecodeChar :: Ptr Word8 -> (Char, Ptr Word8) -utf8DecodeChar (Ptr a#) = ( C# c#, Ptr b# ) - where (# c#, b# #) = utf8DecodeChar# a# +utf8DecodeChar (Ptr a#) = + case utf8DecodeChar# a# of (# c#, b# #) -> ( C# c#, Ptr b# ) -- UTF-8 is cleverly designed so that we can always figure out where -- the start of the current character is, given any position in a |