Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn private library into common stanza #97

Merged
merged 1 commit into from
Feb 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions cabal-helper.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ common build-deps
ghc-options: -Wall


library c-h-internal
common c-h-internal
import: build-deps, extensions
exposed-modules:
other-modules:
CabalHelper.Compiletime.Cabal
CabalHelper.Compiletime.CompPrograms
CabalHelper.Compiletime.Compat.Environment
Expand All @@ -139,62 +139,67 @@ library c-h-internal
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
exposed-modules:
other-modules:
Symlink
if os(windows)
hs-source-dirs: os/win
else
hs-source-dirs: os/posix
hs-source-dirs: src

common c-h-lib
import: build-deps, extensions, c-h-internal
other-modules:
Distribution.Helper
Distribution.Helper.Discover
other-modules:
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
hs-source-dirs: lib

library
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
exposed-modules: Distribution.Helper
Distribution.Helper.Discover
other-modules:
Paths_cabal_helper
autogen-modules:
Paths_cabal_helper
hs-source-dirs: lib
build-depends: c-h-internal

test-suite compile-test
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
type: exitcode-stdio-1.0
main-is: CompileTest.hs
other-modules: TestOptions
hs-source-dirs: tests
ghc-options: -Wall
build-depends: c-h-internal

test-suite programs-test
import: build-deps, extensions
import: build-deps, extensions, c-h-internal
type: exitcode-stdio-1.0
main-is: ProgramsTest.hs
hs-source-dirs: tests
ghc-options: -Wall
build-depends: c-h-internal
, pretty-show
build-depends: pretty-show

test-suite ghc-session
import: build-deps, extensions
import: build-deps, extensions, c-h-lib
type: exitcode-stdio-1.0
main-is: GhcSession.hs
other-modules: TestOptions
hs-source-dirs: tests
ghc-options: -Wall
build-depends: ghc < 8.9 && >= 8.0.2
, pretty-show < 1.9 && >= 1.8.1
, cabal-helper
, c-h-internal

test-suite examples
import: build-deps, extensions
import: build-deps, extensions, c-h-lib
type: exitcode-stdio-1.0
main-is: Examples.hs
hs-source-dirs: tests
ghc-options: -Wall
build-depends: cabal-helper

executable cabal-helper-main
default-language: Haskell2010
Expand Down