Ticket #276 (closed task: fixed)

Opened 9 years ago

Last modified 4 years ago

ghci compile option

Reported by: goronsf Owned by: simonmar
Priority: normal Milestone: 6.8.1
Component: GHCi Version: None
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

Sometimes you want to develop something using ghci, but
a lot of files are just interpreted everytime (which
takes a lot time), while they could also had been
compiled. (An option is writing a simple script each
time (but that's not what users want.) So what I want
(and some people on #haskell): an interface to compile
everything instead of interpretate it.  

So inside ghci I want to have an option: 
:compile which compiles everything (except maybe for
the module you are currently working on.) 

This is how people in #haskell would appreciate it:

21:13 < goron> Is there some command to say in ghci:
precompile everything?
21:13 < goron> I had to write some scripts to do it.
21:14 < Lemmih> goron: ghc --make, perhaps.
21:15 < goron> Lemmih: I meant inside ghci. My approach
was ghc --make, but I had to include a lot of
               paths.
21:15 < goron> And it seems something useful.
21:17 < Lemmih> Agreed.
21:18 < Lemmih> But unfortunately I haven't heard of
such feature.
21:18 < Somebody else> Yep, would be immensly useful.

Change History

Changed 7 years ago by igloo

  • description modified (diff)
  • component changed from None to GHCi
  • difficulty set to Moderate (1 day)
  • architecture set to Unknown
  • milestone set to _|_
  • os set to Unknown

Changed 7 years ago by simonmar

  • owner changed from nobody to simonmar
  • status changed from assigned to new
  • type changed from feature request to task
  • milestone changed from _|_ to 6.8

I'll take this one. I'm removing the duplication between GhcMode? and HscTarget?, and one nice side-effect should be that it will be possible to compile to object code from inside GHCi.

Changed 6 years ago by simonmar

See also #934

Changed 6 years ago by simonmar

  • status changed from new to closed
  • resolution changed from None to fixed

Now done, patch is:

Wed Apr 11 03:18:02 PDT 2007  Simon Marlow <simonmar@microsoft.com>
  * Rationalise GhcMode, HscTarget and GhcLink

To compile to object code inside GHCi, use either ghci -fobject-code or :set -fobject-code.

Changed 6 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)
Note: See TracTickets for help on using tickets.