Opened 2 years ago

Closed 2 years ago

#8430 closed bug (fixed)

Literate haskell accepts spurious \end{code} lines

Reported by: errge Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC accepts invalid program Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


In #8428 klao removed a spurious \end{code} from TypeRep.lhs. This made it clear that GHC has accepts spurious \end{code} lines in literate haskell code.

This patch fixes the literate haskell preprocessor to issue an error in this case. Interestingly though, after this change nothing breaks except for klao's already merged patch, so this issue was not found in other .lhs files through GHC.

Attachments (1)

unlit.patch (2.3 KB) - added by errge 2 years ago.

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by errge

comment:1 Changed 2 years ago by simonpj

  • Status changed from new to patch

OK with me. Thanks.

comment:2 Changed 2 years ago by Krzysztof Gogolewski <krz.gogolewski@…>

In 400c260f977f5cd2bf2f2f26deeeecbe37466295/ghc:

Reject spurious \end{code} in literate mode (#8430)

comment:3 Changed 2 years ago by Krzysztof Gogolewski <krz.gogolewski@…>

comment:4 Changed 2 years ago by monoidal

  • Resolution set to fixed
  • Status changed from patch to closed

Patch applied, thanks!

Note: See TracTickets for help on using tickets.