hasktags - small patch

Ian Lynagh igloo at earth.li
Tue Feb 20 14:28:56 EST 2007


Hi Marc,

On Sat, Feb 17, 2007 at 05:12:13AM +0100, Marc Weber wrote:
> 
> 154c154
> <       let wordlines = map words aslines
> ---
> >       let wordlines = map mywords aslines
> 161a162,174
> >       -- my words is mainly copied from Data.List.
> >       -- difference abc::def is split into three words instead of one.
> >       mywords :: String -> [String]
> >       mywords (':':':':xs) = "::" : mywords xs

I'm not familiar with the code, but this looks like it is just a quick
fix for this particular case, while a proper fix would involve something
like breaking lines into blocks of characters in the same class (i.e. a
weak form of lexing by the Haskell Report rules). Is that right, or does
it turn out that the :: case is the only thing we need to worry about?

Better still, of course, if anyone was interested in spending some time
on this, would be to either (portably) use Language.Haskell to do the
lexing or (GHC-only) use the GHC API to do the lexing. I think someone
might actually have been looking at doing the latter already?


Thanks
Ian



More information about the Glasgow-haskell-users mailing list