Opened 11 years ago

Closed 8 years ago

Last modified 6 years ago

#276 closed task (fixed)

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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by igloo)

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 (8)

comment:1 Changed 9 years ago by igloo

  • Architecture set to Unknown
  • Component changed from None to GHCi
  • Description modified (diff)
  • difficulty set to Moderate (1 day)
  • Milestone set to _|_
  • Operating System set to Unknown

comment:2 Changed 9 years ago by simonmar

  • Milestone changed from _|_ to 6.8
  • Owner changed from nobody to simonmar
  • Status changed from assigned to new
  • Type changed from feature request to task

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.

comment:3 Changed 9 years ago by simonmar

See also #934

comment:4 Changed 8 years ago by simonmar

  • Resolution changed from None to fixed
  • Status changed from new to closed

Now done, patch is:

Wed Apr 11 03:18:02 PDT 2007  Simon Marlow <[email protected]>
  * Rationalise GhcMode, HscTarget and GhcLink

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

comment:5 Changed 8 years ago by igloo

  • Milestone changed from 6.8 branch to 6.8.1

comment:6 Changed 7 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 7 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:8 Changed 6 years ago by simonmar

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