Opened 4 years ago

Closed 4 years 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 Rev(s):
Wiki Page:

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 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by monoidal

Status: newpatch

comment:2 Changed 4 years ago by simonpj

difficulty: Unknown
Owner: set to igloo

comment:3 Changed 4 years ago by igloo

Milestone: 7.8.1
Owner: igloo deleted
Status: patchnew

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

comment:4 Changed 4 years ago by igloo

Owner: set to igloo

comment:5 Changed 4 years ago by igloo

Resolution: fixed
Status: newclosed
Test Case: 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.