Ticket #1682 (closed feature request: duplicate)

Opened 4 years ago

Last modified 3 years ago

ghci Foo.hs should load the Foo.hs file interpreted

Reported by: iampure@… Owned by:
Priority: normal Milestone: 6.8.1
Component: GHCi Version: 6.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

ghc Foo.hs, where Foo.hs has a name X that is not exported. ghci Foo.hs Asking for the type of X now fails, since X is not in scope.

I would like to have that the latter operation does not fail. When one asks for the Foo.hs file, the Foo.hs file should be loaded interpreted. When one asks for the Foo module, the same should happen. When one explicitly asks for Foo.o or Foo.hi, the compiled version should be loaded.

The rationale for all this is that ghci is used to explore code. In the rare case that one for example compiles somebody else's project and want to look around a bit (ask for types for example), one does not want to touch(1) every file by hand first.

Change History

Changed 4 years ago by igloo

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #1205.

By the way, please don't set the "milestone" field when reporting bugs.  http://hackage.haskell.org/trac/ghc/wiki/ReportABug was recently updated to clarify which fields should and shouldn't be filled in.

Thanks

Ian

Changed 4 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 3 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 3 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.