[GHC] #210: .lhs Birdtracks are removed instead of replaced
GHC
trac at galois.com
Fri Oct 13 09:20:35 EDT 2006
#210: .lhs Birdtracks are removed instead of replaced
----------------------------------+-----------------------------------------
Reporter: pesco | Owner: nobody
Type: bug | Status: closed
Priority: lowest | Milestone: 6.8
Component: Compiler (Parser) | Version: 6.2
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Architecture: Unknown | Os: Unknown
----------------------------------+-----------------------------------------
Changes (by igloo):
* architecture: => Unknown
* resolution: None => fixed
* difficulty: => Unknown
* milestone: => 6.8
* status: assigned => closed
* os: => Unknown
Old description:
> {{{
> With respect to Bird-style literate programs, the
> Report states in section 9.4 (p. 134) that "[t]he
> program text is recovered by taking only those lines
> beginning with '>', and replacing the leading '>' with
> a space."
> The following program seems to indicate that GHC strips
> the leading '>' instead:
>
> -----mixed.lhs-----
> \begin{code}
> -- Notice two leading spaces!
> main = putStrLn "This is LaTeX-literal Haskell."
> \end{code}
>
> > main = putStrLn "This is Birdtrack-literal Haskell."
> ------------------------
>
> GHC says "mixed.lhs:5: parse error on input `main'"
> instead of "Multiple declarations of `Main.main'".
> Inserting a second space after the '>', however, yields
> the latter.
>
> I just stumbled across this because I'm writing a
> syntax highlighter and the Report only advises against
> but does not forbid mixed-style literate programs.
> }}}
New description:
{{{
With respect to Bird-style literate programs, the
Report states in section 9.4 (p. 134) that "[t]he
program text is recovered by taking only those lines
beginning with '>', and replacing the leading '>' with
a space."
The following program seems to indicate that GHC strips
the leading '>' instead:
-----mixed.lhs-----
\begin{code}
-- Notice two leading spaces!
main = putStrLn "This is LaTeX-literal Haskell."
\end{code}
> main = putStrLn "This is Birdtrack-literal Haskell."
------------------------
GHC says "mixed.lhs:5: parse error on input `main'"
instead of "Multiple declarations of `Main.main'".
Inserting a second space after the '>', however, yields
the latter.
I just stumbled across this because I'm writing a
syntax highlighter and the Report only advises against
but does not forbid mixed-style literate programs.
}}}
Comment:
I've fixed this in the HEAD. Test is read041.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/210>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list