-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1541, by adding internal build-tools to PATH.
Signed-off-by: Edward Z. Yang <[email protected]>
- Loading branch information
Showing
15 changed files
with
140 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,9 @@ | |
the component to be configured. The semantics of this mode | ||
of operation are described in | ||
<https://github.com/ghc-proposals/ghc-proposals/pull/4> | ||
* Internal 'build-tools' dependencies are now added to PATH | ||
upon invocation of GHC, so that they can be conveniently | ||
used via `-pgmF`. (#1541) | ||
|
||
1.24.0.0 Ryan Thomas <[email protected]> March 2016 | ||
* Support GHC 8. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{-# OPTIONS_GHC -F -pgmF my-custom-preprocessor #-} | ||
module A where | ||
|
||
a :: String | ||
a = "0000" |
11 changes: 11 additions & 0 deletions
11
Cabal/tests/PackageTests/BuildToolsPath/MyCustomPreprocessor.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Main where | ||
|
||
import System.Environment | ||
import System.IO | ||
|
||
main :: IO () | ||
main = do | ||
(_:source:target:_) <- getArgs | ||
let f '0' = '1' | ||
f c = c | ||
writeFile target . map f =<< readFile source |
25 changes: 25 additions & 0 deletions
25
Cabal/tests/PackageTests/BuildToolsPath/build-tools-path.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: build-tools-path | ||
version: 0.1.0.0 | ||
synopsis: Checks build-tools are put in PATH | ||
license: BSD3 | ||
category: Testing | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
executable my-custom-preprocessor | ||
main-is: MyCustomPreprocessor.hs | ||
build-depends: base, directory | ||
default-language: Haskell2010 | ||
|
||
library | ||
exposed-modules: A | ||
build-depends: base | ||
build-tools: my-custom-preprocessor | ||
-- ^ Note the internal dependency. | ||
default-language: Haskell2010 | ||
|
||
executable hello-world | ||
main-is: Hello.hs | ||
build-depends: base, build-tools-path | ||
default-language: Haskell2010 | ||
hs-source-dirs: hello |
Oops, something went wrong.