Ticket #1462 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

runghc is undocumented

Reported by: Isaac Dupree Owned by: igloo
Priority: high Milestone: 6.8.1
Component: Documentation Version: 6.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

make install installs runghc, which is not mentioned anywhere in the user's guide.

So I didn't know whether it was a bug that runghc doesn't work when ghc is compiled without interactive(ghci) support. Also I need to pass --make to runghc in a multi-module program to make runghc work. Also I don't know if there's any GHC flag like ghc --run the way there is ghc --interactive for ghci (should there be? or is the syntax different enough that it would be troublesome?). Also #1312 and #1281 are about runghc's behavior...

At least runghc and runghc --help produce runghc: syntax: runghc [-f GHCPATH] [GHC-ARGS] FILE ARG... which is clear enough about the syntax, but not exactly the meaning.

Change History

Changed 5 years ago by sorear

runghc is implemented by calling GHCi, loading your module, and invoking 'main'. I'm extremely suprised that there is any situation where --make is required! So you can just run ghc -e main Main.hs, (approximately - runghc has other magic that is only sometimes useful. Read the source for details, it's <100 lines). Runghc is *primarily* intended for use as a #! interpreter, and is installed with a runhaskell symlink.

Changed 5 years ago by Isaac Dupree

Odd, I can't seem to reproduce needing --make, but I'm sure adding --make to runghc has been necessary for it to work for me more than once... maybe has something to do with some combination of .hi/.o files some of which are up to date for some modules? (observed on powerpc, whose ghci is not entirely perfect anyway it seems)

Changed 5 years ago by igloo

  • priority changed from normal to high
  • milestone set to 6.8

We should document runghc for 6.8.

Changed 4 years ago by igloo

  • owner set to igloo

Changed 4 years ago by igloo

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

I've added some basic docs.

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.