Skip to content

Commit

Permalink
Merge branch 'map-build-info'
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Aug 29, 2019
2 parents 84058fc + 0c5d015 commit 4fb66b3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 40 deletions.
15 changes: 8 additions & 7 deletions dhall-to-etlas.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ library
-fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction
-fno-warn-name-shadowing
build-depends:
etlas-cabal -any,
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
etlas-cabal -any,
bytestring >=0.10 && <0.11,
containers >=0.5 && <0.6,
contravariant >=1.4 && <1.5,
dhall >=1.25.0 && <1.26,
filepath >=1.4 && <1.5,
microlens >=0.4.0.0 && <0.5,
microlens >=0.1.0.0 && <0.5,
text >=1.2 && <1.3,
transformers >=0.2.0.0 && <0.6,
vector >=0.11.0.0 && <0.13,
Expand All @@ -92,9 +92,10 @@ executable dhall-to-etlas
-fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction
-fno-warn-name-shadowing
build-depends:
etlas-cabal -any,
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
etlas-cabal -any,
containers >=0.5 && <0.6,
dhall-to-etlas -any,
directory >=1.2.7.1 && <1.4,
filepath >=1.4 && <1.5,
Expand Down Expand Up @@ -135,8 +136,8 @@ executable dhall-to-etlas-meta
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
directory >=1.2.7.1 && <1.4,
dhall >=1.25.0 && <1.26,
directory >=1.2.7.1 && <1.4,
dhall-to-etlas -any,
filepath >=1.4 && <1.5,
optparse-applicative >=0.13.2 && <0.15,
Expand All @@ -153,10 +154,10 @@ test-suite golden-tests
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
etlas-cabal -any,
Diff >=0.3.4 && <0.4,
bytestring >=0.10 && <0.11,
dhall >=1.25.0 && <1.26,
dhall-to-etlas -any,
filepath >=1.4 && <1.5,
microlens >=0.1.0.0 && <0.5,
Expand All @@ -178,8 +179,8 @@ test-suite unit-tests
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
etlas-cabal -any,
dhall >=1.25.0 && <1.26,
etlas-cabal -any,
dhall-to-etlas -any,
tasty >=0.11 && <1.3,
tasty-hunit >=0.10.0.1 && <0.11,
Expand Down
47 changes: 14 additions & 33 deletions dhall-to-etlas.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ let deps =
, microlens =
pkgVer "microlens" "0.1.0.0" "0.5"
, optparse-applicative =
pkgVer "optparse-applicative" "0.15" "0.16"
pkgVer "optparse-applicative" "0.13.2" "0.15"
, prettyprinter =
pkgVer "prettyprinter" "1.3.0" "1.4"
pkgVer "prettyprinter" "1.2.0.1" "1.3"
, contravariant =
pkgVer "contravariant" "1.5" "1.6"
pkgVer "contravariant" "1.4" "1.5"
, tasty =
pkgVer "tasty" "0.11" "1.3"
, tasty-golden =
Expand Down Expand Up @@ -80,16 +80,20 @@ let warning-options =
, "-fno-warn-name-shadowing"
]

let addWarningOptions =
let addCommonBuildInfo =
λ(component : types.BuildInfo)
component
{ compiler-options =
component.compiler-options
{ GHC = component.compiler-options.GHC # warning-options }
, build-depends =
[ deps.base, deps.dhall ] # component.build-depends
, default-language =
Some types.Language.Haskell2010
}

in prelude.utils.mapBuildInfo
addWarningOptions
addCommonBuildInfo
( prelude.utils.GitHub-project
{ owner = "eta-lang", repo = "dhall-to-etlas" }
{ cabal-version =
Expand Down Expand Up @@ -139,12 +143,11 @@ in prelude.utils.mapBuildInfo
( prelude.defaults.Library
{ build-depends =
[ deps.etlas-cabal
, deps.base
, deps.bytestring
, deps.containers
, deps.contravariant
, deps.dhall
, deps.filepath
, deps.microlens
, deps.text
, deps.transformers
, deps.vector
Expand Down Expand Up @@ -172,8 +175,6 @@ in prelude.utils.mapBuildInfo
, "Dhall.Extra"
, "Paths_dhall_to_etlas"
]
, default-language =
Some types.Language.Haskell2010
}
)
, executables =
Expand All @@ -182,9 +183,7 @@ in prelude.utils.mapBuildInfo
( prelude.defaults.Executable
{ build-depends =
[ deps.etlas-cabal
, deps.base
, deps.containers
, deps.dhall
, deps.dhall-to-etlas
, deps.directory
, deps.filepath
Expand All @@ -203,17 +202,13 @@ in prelude.utils.mapBuildInfo
[ types.Extension.NamedFieldPuns True ]
, other-modules =
[ "Paths_dhall_to_etlas" ]
, default-language =
Some types.Language.Haskell2010
}
)
, prelude.unconditional.executable
"etlas-to-dhall"
( prelude.defaults.Executable
{ build-depends =
[ deps.base
, deps.dhall
, deps.bytestring
[ deps.bytestring
, deps.dhall-to-etlas
, deps.optparse-applicative
, deps.prettyprinter
Expand All @@ -227,26 +222,20 @@ in prelude.utils.mapBuildInfo
[ types.Extension.NamedFieldPuns True ]
, other-modules =
[ "Paths_dhall_to_etlas" ]
, default-language =
Some types.Language.Haskell2010
}
)
, prelude.unconditional.executable
"dhall-to-etlas-meta"
( prelude.defaults.Executable
{ build-depends =
[ deps.base
, deps.directory
, deps.dhall
[ deps.directory
, deps.dhall-to-etlas
, deps.filepath
, deps.optparse-applicative
, deps.prettyprinter
]
, hs-source-dirs =
[ "meta" ]
, default-language =
Some types.Language.Haskell2010
, main-is =
"Main.hs"
}
Expand All @@ -257,11 +246,9 @@ in prelude.utils.mapBuildInfo
"golden-tests"
( prelude.defaults.TestSuite
{ build-depends =
[ deps.base
, deps.etlas-cabal
[ deps.etlas-cabal
, deps.Diff
, deps.bytestring
, deps.dhall
, deps.dhall-to-etlas
, deps.filepath
, deps.microlens
Expand All @@ -275,17 +262,13 @@ in prelude.utils.mapBuildInfo
, type =
types.TestType.exitcode-stdio
{ main-is = "GoldenTests.hs" }
, default-language =
Some types.Language.Haskell2010
}
)
, prelude.unconditional.test-suite
"unit-tests"
( prelude.defaults.TestSuite
{ build-depends =
[ deps.base
, deps.etlas-cabal
, deps.dhall
[ deps.etlas-cabal
, deps.dhall-to-etlas
, deps.tasty
, deps.tasty-hunit
Expand All @@ -295,8 +278,6 @@ in prelude.utils.mapBuildInfo
[ "tests" ]
, type =
types.TestType.exitcode-stdio { main-is = "Tests.hs" }
, default-language =
Some types.Language.Haskell2010
, other-modules =
[ "DhallToCabal.Tests" ]
}
Expand Down

0 comments on commit 4fb66b3

Please sign in to comment.