Opened 2 years ago

Last modified 5 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.12.1
Component: GHCi Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 2 years ago by parcs

  • Status changed from new to patch

Patch attached.

comment:2 Changed 2 years 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

or

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

John, how did you come across this?

comment:3 Changed 2 years ago by parcs

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

comment:4 Changed 2 years 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 2 years ago by igloo

  • Milestone set to 7.8.1

comment:6 Changed 13 months ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.10.1

Moving to 7.10.1

comment:7 Changed 5 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

Note: See TracTickets for help on using tickets.