Ticket #7625 (new bug)

Opened 4 months ago

Last modified 6 weeks ago

Semicolon is not handled between imports at the ghci command prompt

Reported by: JohnWiegley Owned by:
Priority: normal Milestone: 7.8.1
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:

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

Change History

Changed 4 months ago by parcs

  • status changed from new to patch

Patch attached.

Changed 4 months ago by igloo

  • status changed from patch to new
  • difficulty set to Unknown

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?

Changed 4 months ago by parcs

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

Changed 4 months ago by JohnWiegley

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

Changed 6 weeks ago by igloo

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