Opened 7 months ago

Closed 6 months ago

#8431 closed bug (fixed)

ghci freezes in multiline when passed a closing paren

Reported by: errge Owned by:
Priority: high Milestone: 7.8.1
Component: GHCi Version: 7.6.3
Keywords: Cc: mihaly.barasz@…, hvr
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Prelude> :set +m
Prelude> )

Never returns.

Patch attached. John's code was buggy and reachable, apparently.

Attachments (1)

ghci.patch (628 bytes) - added by errge 7 months ago.

Download all attachments as: .zip

Change History (9)

Changed 7 months ago by errge

comment:1 Changed 7 months ago by errge

  • Status changed from new to patch

comment:2 Changed 7 months ago by errge

Thanks goes to klao for helping me while debugging this.

comment:3 Changed 7 months ago by hvr

Can this bug also be triggered via ordinary compilation by enabling prime:AlternativeLayoutRule?

comment:4 Changed 7 months ago by errge

I don't know what is AlternativeLayoutRule? and I couldn't find any description of it. It's not documented in the manual and there are no examples on the linked wiki page or in the mailing list archives.

The patch replaces a bottom with an empty list. So it's certainly an improvement :)

comment:5 Changed 6 months ago by Krzysztof Gogolewski <krz.gogolewski@…>

In 6c122f9c8850df6b6869af17cf7420e7da5c3270/ghc:

Fix freezing on bare ')' with alternative layout rule (#8431)

Patch by errge

comment:6 Changed 6 months ago by Krzysztof Gogolewski <krz.gogolewski@…>

comment:7 Changed 6 months ago by Krzysztof Gogolewski <krz.gogolewski@…>

comment:8 Changed 6 months ago by monoidal

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

I applied the patch - thanks.

hvr: The bug could indeed be triggered with a single-character file ')' and the flag -XAlternativeLayoutRule. The patch fixed it.

Note: See TracTickets for help on using tickets.