projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2006-01-09 13:29:02 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
utils
/
Encoding.hs
diff --git
a/ghc/compiler/utils/Encoding.hs
b/ghc/compiler/utils/Encoding.hs
index
1f266e1
..
7b35e65
100644
(file)
--- 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)
-- 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
-- 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