Opened 15 months ago

Last modified 12 months ago

#7625 new bug

Semicolon is not handled between imports at the ghci command prompt

Reported by: JohnWiegley Owned by:
Priority: normal Milestone: 7.8.3
Component: GHCi Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:


You cannot use "import Data.List ; import Control.Monad" at the ghci command prompt. It gives:

<no location info>: parse error in import declaration

Attachments (1)

0001-Allow-multiple-import-statements-on-one-line-in-GHCi.patch (2.4 KB) - added by parcs 15 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 15 months ago by parcs

  • Status changed from new to patch

Patch attached.

comment:2 Changed 15 months ago by igloo

  • Difficulty set to Unknown
  • Status changed from patch to new

Thanks for the patch, parcs. However, if I understand it correctly, it only works for import declarations?

If we support that, then we should presumably also support

import Data.List ; let x = 1


let { x = 1 } ; let { y = 2 }

John, how did you come across this?

comment:3 Changed 15 months ago by parcs

Yes, it only works for multiple import declarations. I can investigate supporting the two examples you mentioned.

comment:4 Changed 15 months ago by JohnWiegley

It was brought up in #haskell, I just reported it because another user was having difficulty registering for the Trac.

comment:5 Changed 12 months ago by igloo

  • Milestone set to 7.8.1
Note: See TracTickets for help on using tickets.