Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/b8845b879d968c2888091ca2dd1bc7bdc208a166

>---------------------------------------------------------------

commit b8845b879d968c2888091ca2dd1bc7bdc208a166
Author: David Waern <david.wa...@gmail.com>
Date:   Sun Apr 1 18:10:30 2012 +0200

    Don't crash on unicode strings in doc comments.

>---------------------------------------------------------------

 src/Haddock/Lex.x                                  |    3 ++-
 .../tests/{Unicode.hs.disabled => Unicode.hs}      |    0 
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x
index f65aee8..b9ebe68 100644
--- a/src/Haddock/Lex.x
+++ b/src/Haddock/Lex.x
@@ -34,6 +34,7 @@ import Data.Char
 import Data.Word (Word8)
 import Numeric
 import System.IO.Unsafe
+import Debug.Trace
 }
 
 $ws    = $white # \n
@@ -181,7 +182,7 @@ tokenise dflags str (line, col) = let toks = go (posn, 
'\n', eofHack str) para i
     go inp@(pos, _, str) sc =
          case alexScan inp sc of
                AlexEOF -> []
-               AlexError _ -> error "lexical error"
+               AlexError _ -> []
                AlexSkip  inp' _       -> go inp' sc
                AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc 
(\sc -> go inp' sc) dflags
 
diff --git a/tests/html-tests/tests/Unicode.hs.disabled 
b/tests/html-tests/tests/Unicode.hs
similarity index 100%
rename from tests/html-tests/tests/Unicode.hs.disabled
rename to tests/html-tests/tests/Unicode.hs



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to