-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7827 from brandonchinn178/chinn/haddock
Fix haddock via Setup.hs with internal libraries
- Loading branch information
Showing
14 changed files
with
135 additions
and
29 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
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/InternalLibraries/Haddock/Foo.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,6 @@ | ||
module Foo where | ||
|
||
import InternalBefore | ||
|
||
foo :: Int | ||
foo = internalBefore |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/InternalLibraries/Haddock/InternalAfter.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,6 @@ | ||
module InternalAfter where | ||
|
||
import Foo | ||
|
||
internalAfter :: Int | ||
internalAfter = foo |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/InternalLibraries/Haddock/InternalBefore.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,4 @@ | ||
module InternalBefore where | ||
|
||
internalBefore :: Int | ||
internalBefore = 42 |
19 changes: 19 additions & 0 deletions
19
cabal-testsuite/PackageTests/InternalLibraries/Haddock/foo.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,19 @@ | ||
name: foo | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
cabal-version: 1.24 | ||
|
||
library foo-internal-before | ||
build-depends: base | ||
exposed-modules: InternalBefore | ||
default-language: Haskell2010 | ||
|
||
library | ||
build-depends: base, foo-internal-before | ||
exposed-modules: Foo | ||
default-language: Haskell2010 | ||
|
||
library foo-internal-after | ||
build-depends: base, foo | ||
exposed-modules: InternalAfter | ||
default-language: Haskell2010 |
27 changes: 27 additions & 0 deletions
27
cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.cabal.out
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,27 @@ | ||
# Setup configure | ||
Configuring foo-0.1.0.0... | ||
# Setup build | ||
Preprocessing library 'foo-internal-before' for foo-0.1.0.0.. | ||
Building library 'foo-internal-before' for foo-0.1.0.0.. | ||
Preprocessing library for foo-0.1.0.0.. | ||
Building library for foo-0.1.0.0.. | ||
Preprocessing library 'foo-internal-after' for foo-0.1.0.0.. | ||
Building library 'foo-internal-after' for foo-0.1.0.0.. | ||
# Setup copy | ||
Installing internal library foo-internal-before in <PATH> | ||
Installing library in <PATH> | ||
Installing internal library foo-internal-after in <PATH> | ||
# Setup register | ||
Registering library 'foo-internal-before' for foo-0.1.0.0.. | ||
Registering library for foo-0.1.0.0.. | ||
Registering library 'foo-internal-after' for foo-0.1.0.0.. | ||
# Setup haddock | ||
Preprocessing library 'foo-internal-before' for foo-0.1.0.0.. | ||
Running Haddock on library 'foo-internal-before' for foo-0.1.0.0.. | ||
Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html | ||
Preprocessing library for foo-0.1.0.0.. | ||
Running Haddock on library for foo-0.1.0.0.. | ||
Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html | ||
Preprocessing library 'foo-internal-after' for foo-0.1.0.0.. | ||
Running Haddock on library 'foo-internal-after' for foo-0.1.0.0.. | ||
Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html |
27 changes: 27 additions & 0 deletions
27
cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.out
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,27 @@ | ||
# Setup configure | ||
Configuring foo-0.1.0.0... | ||
# Setup build | ||
Preprocessing library 'foo-internal-before' for foo-0.1.0.0.. | ||
Building library 'foo-internal-before' for foo-0.1.0.0.. | ||
Preprocessing library for foo-0.1.0.0.. | ||
Building library for foo-0.1.0.0.. | ||
Preprocessing library 'foo-internal-after' for foo-0.1.0.0.. | ||
Building library 'foo-internal-after' for foo-0.1.0.0.. | ||
# Setup copy | ||
Installing internal library foo-internal-before in <PATH> | ||
Installing library in <PATH> | ||
Installing internal library foo-internal-after in <PATH> | ||
# Setup register | ||
Registering library 'foo-internal-before' for foo-0.1.0.0.. | ||
Registering library for foo-0.1.0.0.. | ||
Registering library 'foo-internal-after' for foo-0.1.0.0.. | ||
# Setup haddock | ||
Preprocessing library 'foo-internal-before' for foo-0.1.0.0.. | ||
Running Haddock on library 'foo-internal-before' for foo-0.1.0.0.. | ||
Documentation created: haddock.dist/work/dist/doc/html/foo/index.html | ||
Preprocessing library for foo-0.1.0.0.. | ||
Running Haddock on library for foo-0.1.0.0.. | ||
Documentation created: haddock.dist/work/dist/doc/html/foo/index.html | ||
Preprocessing library 'foo-internal-after' for foo-0.1.0.0.. | ||
Running Haddock on library 'foo-internal-after' for foo-0.1.0.0.. | ||
Documentation created: haddock.dist/work/dist/doc/html/foo/index.html |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.test.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,6 @@ | ||
import Test.Cabal.Prelude | ||
-- https://github.com/haskell/cabal/issues/1919 | ||
main = setupAndCabalTest $ | ||
withPackageDb $ do | ||
setup_install [] | ||
setup "haddock" [] |
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,4 @@ | ||
synopsis: Fix haddock command via Setup.hs for internal libraries | ||
packages: Cabal | ||
issues: #1919 | ||
prs: #7827 |
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