Skip to content

Add Cabal Helper cradle and tests #8

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ tags
TAGS
codex.tags
.vim


## test specific ignores
test/testdata/**/stack.yaml
6 changes: 6 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ cradle:

- path: "test"
component: "implicit-hie:test:implicit-hie-test"

- path: test/utils
component: "implicit-hie:test:unit-tests"

- path: test/unit
component: "implicit-hie:test:unit-tests"
66 changes: 56 additions & 10 deletions implicit-hie.cabal
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
cabal-version: 2.0

-- This file has been generated from package.yaml by hpack version 0.33.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: b2b829a658e33ea328c725dea732391089d03ffd2a216d413a75d88aefa7c181

cabal-version: 2.4
name: implicit-hie
version: 0.1.0.0
description: Auto generate a stack or cabal multi component hie.yaml file
Expand All @@ -16,42 +9,69 @@ bug-reports: https://github.com/Avi-D-coder/implicit-hie/issues
author: Avi Dessauer
maintainer: avi.the.coder@gmail.com
copyright: 2020
license: BSD3
license: BSD-3-Clause
license-file: LICENSE
tested-with: GHC==8.8.3
build-type: Simple
extra-source-files:
README.md
ChangeLog.md
test/testdata/cabal-helper/**/*.hs
test/testdata/cabal-helper/**/*.cabal
test/testdata/cabal-helper/**/*.project

source-repository head
type: git
location: https://github.com/Avi-D-coder/implicit-hie

flag cabalHelper
Description: Enable Cabal-Helper dependencies
Default: True
Manual: True

common cabal-helper
if flag(cabalHelper)
cpp-options: -DCABAL_HELPER_SUPPORT

library
import: cabal-helper
exposed-modules:
Hie.Cabal.Parser
Hie.Locate
Hie.Logger
Hie.Yaml

other-modules:
Paths_implicit_hie
autogen-modules:
Paths_implicit_hie
hs-source-dirs:
src
ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints
ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fwarn-unused-imports -fwarn-unused-binds -fwarn-name-shadowing -fwarn-redundant-constraints
build-depends:
attoparsec >= 0.13
, base >=4.7 && <5
, directory >= 1.3
, filepath >= 1.4
, filepattern >= 0.1
, hie-bios >=0.5 && <0.6
, hslogger
, text >= 1.2
, transformers >= 0.5
, yaml >= 0.5

if flag(cabalHelper)
exposed-modules:
Hie.CabalHelper
build-depends:
cabal-helper >= 1.1 && <1.2
, containers
, process

default-language: Haskell2010

executable gen-hie
import: cabal-helper
main-is: Main.hs
other-modules:
Paths_implicit_hie
Expand All @@ -67,12 +87,14 @@ executable gen-hie
, filepath
, filepattern
, implicit-hie
, optparse-applicative
, text
, transformers
, yaml
default-language: Haskell2010

test-suite implicit-hie-test
import: cabal-helper
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Expand All @@ -95,3 +117,27 @@ test-suite implicit-hie-test
, transformers
, yaml
default-language: Haskell2010

test-suite unit-tests
import: cabal-helper
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_implicit_hie, TestUtils
if flag(cabalHelper)
other-modules:
CabalHelperSpec
hs-source-dirs:
test/unit, test/utils
ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base
, directory
, filepath
, hie-bios
, hspec
, implicit-hie
, text
, yaml
default-language: Haskell2010
Loading