forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
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 haskell#9988 from sheaf/no-implicit-prelude-setup
Add NoImplicitPrelude to buildTypeScript
- Loading branch information
Showing
7 changed files
with
54 additions
and
6 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
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/SetupHooks/SetupHooksNoBase/A.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,2 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
module A where {} |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/SetupHooks/SetupHooksNoBase/SetupHooks.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,8 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module SetupHooks ( setupHooks ) where | ||
|
||
import Distribution.Simple.SetupHooks ( SetupHooks, noSetupHooks ) | ||
|
||
setupHooks :: SetupHooks | ||
setupHooks = noSetupHooks |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/SetupHooks/SetupHooksNoBase/cabal.project
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 @@ | ||
packages: . |
14 changes: 14 additions & 0 deletions
14
cabal-testsuite/PackageTests/SetupHooks/SetupHooksNoBase/cabal.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,14 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- Test that we can compile the Setup.hs script for a package with | ||
-- build-type:Hooks without requiring a dependency on 'base'. | ||
-- | ||
-- NB: we specifically don't include a 'Setup.hs' file in this package, | ||
-- as we rely on 'cabal-install' generating one that does not incur an extra | ||
-- dependency on base. | ||
main = cabalTest $ do | ||
mpkgdb <- testPackageDbPath <$> getTestEnv | ||
case mpkgdb of | ||
Nothing -> skip "Cabal-hooks library unavailable." | ||
Just _pkgdb -> recordMode DoNotRecord $ do | ||
cabal "v2-build" [ "all" ] |
16 changes: 16 additions & 0 deletions
16
cabal-testsuite/PackageTests/SetupHooks/SetupHooksNoBase/setup-hooks-no-base-test.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,16 @@ | ||
cabal-version: 3.14 | ||
name: setup-hooks-no-base-test | ||
version: 0.1.0.0 | ||
synopsis: Test that we can build Setup.hs without base | ||
license: BSD-3-Clause | ||
author: NA | ||
maintainer: NA | ||
category: Testing | ||
build-type: Hooks | ||
|
||
custom-setup | ||
setup-depends: Cabal-hooks | ||
|
||
library | ||
exposed-modules: A | ||
default-language: Haskell2010 |