<div dir="ltr">you're probably right, this could be regarded as dead code for ghc 7.8 (esp since alex and happy must be the recent versions to even build ghc HEAD ! )</div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Tue, Jan 7, 2014 at 2:25 AM, Mateusz Kowalczyk <span dir="ltr"><<a href="mailto:fuuzetsu@fuuzetsu.co.uk" target="_blank">fuuzetsu@fuuzetsu.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Greetings,<br>
<br>
When looking at the GHC lexer (Lexer.x), there's:<br>
<br>
> $unispace    = \x05 -- Trick Alex into handling Unicode. See alexGetChar.<br>
> $whitechar   = [\ \n\r\f\v $unispace]<br>
> $white_no_nl = $whitechar # \n<br>
> $tab         = \t<br>
<br>
Scrolling down to alexGetChar and alexGetChar', we see the comments:<br>
<br>
<br>
> -- backwards compatibility for Alex 2.x<br>
> alexGetChar :: AlexInput -> Maybe (Char,AlexInput)<br>
><br>
> -- This version does not squash unicode characters, it is used when<br>
> -- lexing strings.<br>
> alexGetChar' :: AlexInput -> Maybe (Char,AlexInput)<br>
<br>
What's the reason for these? I was under the impression that since<br>
3.0, Alex has natively supported unicode. Is it just dead code? Could<br>
all the hex $uni* functions be removed? If not, why not?<br>
<br>
--<br>
Mateusz K.<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br></div>