|
[ ghc-Bugs-904234 ] .lhs Birdtracks are removed instead of replaced: msg#00013lang.haskell.glasgow.bugs
Bugs item #904234, was opened at 2004-02-25 08:55 Message generated for change (Comment added) made by isaacdupree You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=904234&group_id=8032 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compiler (Parser) Group: 6.2 Status: Open Resolution: None Priority: 1 Submitted By: Sven M. Hallberg (pesco) Assigned to: Nobody/Anonymous (nobody) Summary: .lhs Birdtracks are removed instead of replaced Initial Comment: 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 By: Isaac (isaacdupree) Date: 2005-09-04 09:42 Message: Logged In: YES user_id=1208135 It appears that GHC removes the '>'s only after converting tabs to spaces, though, or at least it correctly accepts this: > sevenSpaceCharactersBeforeThis = True > oneTabCharaterBeforeThis = True and correctly rejects this: > eightSpaceCharactersBeforeThis = True > oneTabCharacterBeforeThis = True so it does act correctly as long as only one of the styles is used (contrary to my expectations upon reading the bug-report, which were why I tested this). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=904234&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1281598 ] GHC poor type-checker error message, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1281130 ] "class A where a :: A -> Int" panics GHC 6.4, SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1281598 ] GHC poor type-checker error message, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1282571 ] +RTS -xc and SIGINT handler gives seg fault, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |