hasktags - small patch

Simon Marlow simonmarhaskell at gmail.com
Wed Feb 21 04:43:54 EST 2007

Ian Lynagh wrote:
> 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?

Yes, there's Norman Ramsey and Kathleen Fisher's partial hasktags implementation 
on top of the GHC API:


I think incorporating small fixes to the existing hasktags in the meantime is 
fine, though.  We're still using it, and it may be a while before the GHC API 
version is working well enough.


More information about the Glasgow-haskell-users mailing list