[GHC] #8226: Remove the old style -- # Haddock comments.
GHC
ghc-devs at haskell.org
Tue Jun 17 06:46:41 UTC 2014
#8226: Remove the old style -- # Haddock comments.
-------------------------------------+------------------------------------
Reporter: Fuuzetsu | Owner: adinapoli
Type: task | Status: patch
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by adinapoli):
Hi guys,
I haven't forgot, is that I'm making basically no progress on it.
After Fuuzetsu's suggestion of removing the old data structure which held
the 0.x style comments, I stumbled upon a series of difficulties, which
are, unordered, the result of different edits on the Lexer;
* Removing the data structure caused immediately GHC to complain on old
style comments which are actually leftovers, an example is inside
libraries/ghc-prim/GHC/Classes.hs. I couldn't understand from the sole
documentation what to do, but it seems to me that, as Fuuzetsu said, they
can be removed because they are equivalent to a pragma (in the example --
#hide == {-# OPTIONS_HADDOCK hide #-}. Unfortunately the lexer chokes in
trying to parse "-- #hide" once the data structure has been removed, even
though, theoretically, should be possible to modify the Lexer to just
treat them as a normal comment ; after all the only thing which prevents
this to happen, I believe, is the "isNormalComment" function.
Unfortunately I can't modify it as per my first patch (aka removing the
"#") because this will cause GHC to interpret RULES as normal comments (I
discovered this thanks to an insight from SPJ).
Sorry for the noise, I thought it was worth documenting my efforts my
myself in the future :)
If someone has some insights, please shout :)
Alfredo
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8226#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list