Opened 3 years ago

Closed 3 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:

Description

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 3 years ago.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by errge

Attachment: unlit.patch added

comment:1 Changed 3 years ago by simonpj

Status: newpatch

OK with me. Thanks.

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

In 400c260f977f5cd2bf2f2f26deeeecbe37466295/ghc:

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

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

comment:4 Changed 3 years ago by monoidal

Resolution: fixed
Status: patchclosed

Patch applied, thanks!

Note: See TracTickets for help on using tickets.