Skip to content

Commit

Permalink
Merge branch 'cabal'
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Nov 3, 2019
2 parents 4fb66b3 + d16c510 commit e9f3d17
Show file tree
Hide file tree
Showing 54 changed files with 1,624 additions and 648 deletions.
24 changes: 24 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@
* New utility function, `prelude.utils.mapBuildInfo`, which maps over
the common fields of all non-setup components.

* Port to Cabal 3.0. Included changes:

* `types.CompilerOptions` now only knows about options for GHC and
GHCJS.

* `types.Dependency` now has a `library-names` field, to identify
which library components of the dependency package to use. These
can be build with `types.LibraryName`. `prelude.majorVersions`
reflects this with a third parameter.

* `types.BuildInfo.pkgconfig-depends.version` is now its own type,
`types.PkgconfigVersionRange`. There are functions to construct it
under `prelude.pkg-config`.

* `prelude.defaults.Library` has been split into `MainLibrary` and
`NamedLibrary`. Use `MainLibrary` in the `library` field, and
`NamedLibrary` in the `sub-libraries` field.

* New `types.Library` field, `visibility`, and a new type,
`types.LibraryVisibility`.

* New `types.BuildInfo` fields, `autogen-includes` and
`extra-dyn-lib-flavours`.

## 1.3.4.0 -- 2019-07-05

* Add compatibility for `optparse-applicative-0.15`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ in GitHub-project { owner = "ocharles", repo = "example" }
prelude.v "1.0.0"
, library =
prelude.unconditional.library
( prelude.defaults.Library
( prelude.defaults.MainLibrary
{ build-depends =
[ { package =
"base"
Expand Down
37 changes: 19 additions & 18 deletions dhall-to-etlas.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ cabal-version: 1.12
-- 'dhall-to-etlas.dhall', and re-generate this file by running
-- 'dhall-to-cabal -- dhall-to-etlas.dhall'.
-- * * * * * * * * * * * * WARNING * * * * * * * * * * * *
name: dhall-to-etlas
version: 1.3.4.0
license: MIT
license-file: LICENSE
maintainer: Javier Neira <[email protected]>
author: Ollie Charles <[email protected]>
homepage: https://github.com/eta-lang/dhall-to-etlas
bug-reports: https://github.com/eta-lang/dhall-to-etlas/issues
synopsis: Compile Dhall expressions to Etlas files
name: dhall-to-etlas
version: 1.3.4.0
license: MIT
license-file: LICENSE
maintainer: Javier Neira <[email protected]>
author: Ollie Charles <[email protected]>
homepage: https://github.com/eta-lang/dhall-to-etlas
bug-reports: https://github.com/eta-lang/dhall-to-etlas/issues
synopsis: Compile Dhall expressions to Etlas files
description:
dhall-to-etlas takes Dhall expressions and compiles them into Etlas
files. All of the features of Dhall are supported, such as let
bindings and imports, and all features of Etlas are supported
(including conditional stanzas).
.
category: Distribution
build-type: Simple
category: Distribution
build-type: Simple
extra-source-files:
Changelog.md
README.md
Expand Down Expand Up @@ -53,7 +53,8 @@ library
DhallToCabal
DhallToCabal.FactorType
DhallToCabal.Util
hs-source-dirs: lib

hs-source-dirs: lib
other-modules:
DhallToCabal.ConfigTree
DhallToCabal.Diff
Expand All @@ -68,7 +69,7 @@ library
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
etlas-cabal -any,
bytestring >=0.10 && <0.11,
containers >=0.5 && <0.6,
Expand All @@ -93,7 +94,7 @@ executable dhall-to-etlas
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
etlas-cabal -any,
containers >=0.5 && <0.6,
dhall-to-etlas -any,
Expand All @@ -119,7 +120,7 @@ executable etlas-to-dhall
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
bytestring >=0.10 && <0.11,
dhall-to-etlas -any,
optparse-applicative >=0.13.2 && <0.15,
Expand All @@ -136,7 +137,7 @@ executable dhall-to-etlas-meta
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
directory >=1.2.7.1 && <1.4,
dhall-to-etlas -any,
filepath >=1.4 && <1.5,
Expand All @@ -154,7 +155,7 @@ test-suite golden-tests
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
etlas-cabal -any,
Diff >=0.3.4 && <0.4,
bytestring >=0.10 && <0.11,
Expand All @@ -179,7 +180,7 @@ test-suite unit-tests
-fno-warn-name-shadowing
build-depends:
base >=4.5 && <5,
dhall >=1.25.0 && <1.26,
dhall >=1.26.0 && <1.27,
etlas-cabal -any,
dhall-to-etlas -any,
tasty >=0.11 && <1.3,
Expand Down
2 changes: 1 addition & 1 deletion dhall-to-etlas.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ in prelude.utils.mapBuildInfo
v "1.3.4.0"
, library =
prelude.unconditional.library
( prelude.defaults.Library
( prelude.defaults.MainLibrary
{ build-depends =
[ deps.etlas-cabal
, deps.bytestring
Expand Down
14 changes: 14 additions & 0 deletions dhall/PkgconfigVersionRange/anyVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
anyVersion
15 changes: 15 additions & 0 deletions dhall/PkgconfigVersionRange/earlierVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
λ(v : Text)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
earlierVersion v
38 changes: 38 additions & 0 deletions dhall/PkgconfigVersionRange/intersectVersionRanges.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
λ(a : ../types/PkgconfigVersionRange.dhall)
λ(b : ../types/PkgconfigVersionRange.dhall)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
intersectVersionRanges
( a
PkgconfigVersionRange
anyVersion
thisVersion
laterVersion
earlierVersion
orLaterVersion
orEarlierVersion
unionVersionRanges
intersectVersionRanges
)
( b
PkgconfigVersionRange
anyVersion
thisVersion
laterVersion
earlierVersion
orLaterVersion
orEarlierVersion
unionVersionRanges
intersectVersionRanges
)
15 changes: 15 additions & 0 deletions dhall/PkgconfigVersionRange/laterVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
λ(v : Text)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
laterVersion v
15 changes: 15 additions & 0 deletions dhall/PkgconfigVersionRange/orEarlierVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
λ(v : Text)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
orEarlierVersion v
15 changes: 15 additions & 0 deletions dhall/PkgconfigVersionRange/orLaterVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
λ(v : Text)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
orLaterVersion v
15 changes: 15 additions & 0 deletions dhall/PkgconfigVersionRange/thisVersion.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
λ(v : Text)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
thisVersion v
38 changes: 38 additions & 0 deletions dhall/PkgconfigVersionRange/unionVersionRanges.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
λ(a : ../types/PkgconfigVersionRange.dhall)
λ(b : ../types/PkgconfigVersionRange.dhall)
λ(PkgconfigVersionRange : Type)
λ(anyVersion : PkgconfigVersionRange)
λ(thisVersion : Text PkgconfigVersionRange)
λ(laterVersion : Text PkgconfigVersionRange)
λ(earlierVersion : Text PkgconfigVersionRange)
λ(orLaterVersion : Text PkgconfigVersionRange)
λ(orEarlierVersion : Text PkgconfigVersionRange)
λ ( unionVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
λ ( intersectVersionRanges
: PkgconfigVersionRange PkgconfigVersionRange PkgconfigVersionRange
)
unionVersionRanges
( a
PkgconfigVersionRange
anyVersion
thisVersion
laterVersion
earlierVersion
orLaterVersion
orEarlierVersion
unionVersionRanges
intersectVersionRanges
)
( b
PkgconfigVersionRange
anyVersion
thisVersion
laterVersion
earlierVersion
orLaterVersion
orEarlierVersion
unionVersionRanges
intersectVersionRanges
)
16 changes: 13 additions & 3 deletions dhall/defaults/BuildInfo.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ let types = ./../types.dhall
in { autogen-modules =
[] : List Text
, build-depends =
[] : List { bounds : types.VersionRange, package : Text }
[] : List types.Dependency
, build-tool-depends =
[] : List
{ component : Text, package : Text, version : types.VersionRange }
{ component :
Text
, package :
Text
, version :
types.VersionRange
}
, build-tools =
[] : List { exe : Text, version : types.VersionRange }
, buildable =
Expand Down Expand Up @@ -76,7 +82,7 @@ in { autogen-modules =
, other-modules =
[] : List Text
, pkgconfig-depends =
[] : List { name : Text, version : types.VersionRange }
[] : List { name : Text, version : types.PkgconfigVersionRange }
, profiling-options =
././CompilerOptions.dhall
, shared-options =
Expand All @@ -85,4 +91,8 @@ in { autogen-modules =
[] : List types.Mixin
, java-sources =
[] : List Text
, autogen-includes =
[] : List Text
, extra-dyn-lib-flavours =
[] : List Text
}
18 changes: 18 additions & 0 deletions dhall/defaults/MainLibrary.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- This file is auto-generated by dhall-to-cabal-meta. Look but don't touch (unless you want your edits to be over-written).
let types = ../types.dhall

in ./BuildInfo.dhall
{ exposed-modules =
[] : List Text
, reexported-modules =
[] : List
{ name :
Text
, original :
{ name : Text, package : Optional Text }
}
, signatures =
[] : List Text
, visibility =
types.LibraryVisibility.public
}
18 changes: 18 additions & 0 deletions dhall/defaults/NamedLibrary.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- This file is auto-generated by dhall-to-cabal-meta. Look but don't touch (unless you want your edits to be over-written).
let types = ../types.dhall

in ./BuildInfo.dhall
{ exposed-modules =
[] : List Text
, reexported-modules =
[] : List
{ name :
Text
, original :
{ name : Text, package : Optional Text }
}
, signatures =
[] : List Text
, visibility =
types.LibraryVisibility.private
}
Loading

0 comments on commit e9f3d17

Please sign in to comment.