Opened 2 years ago

Closed 23 months ago

#7859 closed bug (fixed)

runghc should give an error when the path to ghc is invalid

Reported by: monoidal Owned by: igloo
Priority: normal Milestone: 7.8.1
Component: None Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case: T7859
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

runghc has a -f option which allows to specify the path to GHC. However, it uses rawSystem and if the path is incorrect, we only get a nonzero exit code. For example, attempting to use "ghc -fdefer-type-errors X.hs" gives absolutely no output.

Attached patch uses findExecutable and gives an error message if the executable is not found. This is not the ideal solution, but I think it's better than the current state.

Attachments (1)

0001-In-runghc-check-if-the-executable-given-by-the-f-fla.patch (1.4 KB) - added by monoidal 2 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 2 years ago by monoidal

  • Status changed from new to patch

comment:2 Changed 2 years ago by simonpj

  • difficulty set to Unknown
  • Owner set to igloo

comment:3 Changed 2 years ago by igloo

  • Milestone set to 7.8.1
  • Owner igloo deleted
  • Status changed from patch to new

I'd like to fix this differently; see http://www.haskell.org/pipermail/libraries/2013-April/019752.html for details.

comment:4 Changed 2 years ago by igloo

  • Owner set to igloo

comment:5 Changed 23 months ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to T7859

We now get:

runghc: defer-type-errors: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory)
Note: See TracTickets for help on using tickets.