aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2012-04-01 18:10:30 +0200
committerDavid Waern <david.waern@gmail.com>2012-04-01 18:10:30 +0200
commitb8845b879d968c2888091ca2dd1bc7bdc208a166 (patch)
tree1f5c4e26874ffe1369e47f717553a374117d477d /src/Haddock
parentbc89bcc2b076c13ad559543ebba43603c8ab990c (diff)
Don't crash on unicode strings in doc comments.
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Lex.x3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x
index f65aee8c..b9ebe688 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