From ef201d6afa77e5e155fb830dd0c95d846b7731e7 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 4 Nov 2019 10:28:30 +0100 Subject: [PATCH] Compile dhall-to-etlas.dhall with dhall-to-cabal --- dhall-to-etlas.cabal | 99 ++++++++++++++++++++++++-------------------- dhall-to-etlas.dhall | 10 ++--- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/dhall-to-etlas.cabal b/dhall-to-etlas.cabal index 35fa0fb..0e5c98e 100644 --- a/dhall-to-etlas.cabal +++ b/dhall-to-etlas.cabal @@ -1,4 +1,4 @@ -cabal-version: 1.12 +cabal-version: 1.12 -- * * * * * * * * * * * * WARNING * * * * * * * * * * * * -- This file has been AUTO-GENERATED by dhall-to-cabal. -- @@ -23,6 +23,7 @@ description: bindings and imports, and all features of Etlas are supported (including conditional stanzas). . + category: Distribution build-type: Simple extra-source-files: @@ -43,7 +44,7 @@ extra-source-files: golden-tests/cabal-to-dhall/*.cabal source-repository head - type: git + type: git location: https://github.com/eta-lang/dhall-to-etlas library @@ -60,13 +61,17 @@ library DhallToCabal.Diff Dhall.Extra Paths_dhall_to_etlas + default-language: Haskell2010 - other-extensions: GADTs GeneralizedNewtypeDeriving LambdaCase - OverloadedStrings RecordWildCards - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + other-extensions: + GADTs GeneralizedNewtypeDeriving LambdaCase OverloadedStrings + RecordWildCards + + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, @@ -82,16 +87,16 @@ library semigroups >=0.18.0 && <0.19 executable dhall-to-etlas - main-is: Main.hs - hs-source-dirs: exe - other-modules: - Paths_dhall_to_etlas + main-is: Main.hs + hs-source-dirs: exe + other-modules: Paths_dhall_to_etlas default-language: Haskell2010 other-extensions: NamedFieldPuns - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, @@ -108,16 +113,16 @@ executable dhall-to-etlas transformers >=0.2.0.0 && <0.6 executable etlas-to-dhall - main-is: Main.hs - hs-source-dirs: cabal-to-dhall - other-modules: - Paths_dhall_to_etlas + main-is: Main.hs + hs-source-dirs: cabal-to-dhall + other-modules: Paths_dhall_to_etlas default-language: Haskell2010 other-extensions: NamedFieldPuns - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, @@ -128,13 +133,14 @@ executable etlas-to-dhall text >=1.2 && <1.3 executable dhall-to-etlas-meta - main-is: Main.hs - hs-source-dirs: meta + main-is: Main.hs + hs-source-dirs: meta default-language: Haskell2010 - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, @@ -145,14 +151,15 @@ executable dhall-to-etlas-meta prettyprinter >=1.2.0.1 && <1.3 test-suite golden-tests - type: exitcode-stdio-1.0 - main-is: GoldenTests.hs - hs-source-dirs: golden-tests + type: exitcode-stdio-1.0 + main-is: GoldenTests.hs + hs-source-dirs: golden-tests default-language: Haskell2010 - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, @@ -168,16 +175,16 @@ test-suite golden-tests text >=1.2 && <1.3 test-suite unit-tests - type: exitcode-stdio-1.0 - main-is: Tests.hs - hs-source-dirs: tests - other-modules: - DhallToCabal.Tests + type: exitcode-stdio-1.0 + main-is: Tests.hs + hs-source-dirs: tests + other-modules: DhallToCabal.Tests default-language: Haskell2010 - ghc-options: -Wall -fno-warn-safe -fno-warn-unsafe - -fno-warn-implicit-prelude -fno-warn-missing-import-lists - -fno-warn-missing-local-sigs -fno-warn-monomorphism-restriction - -fno-warn-name-shadowing + ghc-options: + -Wall -fno-warn-safe -fno-warn-unsafe -fno-warn-implicit-prelude + -fno-warn-missing-import-lists -fno-warn-missing-local-sigs + -fno-warn-monomorphism-restriction -fno-warn-name-shadowing + build-depends: base >=4.5 && <5, dhall >=1.26.0 && <1.27, diff --git a/dhall-to-etlas.dhall b/dhall-to-etlas.dhall index fd6bc85..29f0e96 100644 --- a/dhall-to-etlas.dhall +++ b/dhall-to-etlas.dhall @@ -1,8 +1,8 @@ let prelude = - https://github.com/eta-lang/dhall-to-etlas/raw/master/dhall/prelude.dhall sha256:22685aa004763d3d783a116b307a3b3d61cc49aa48e6ff07257668336c27b4a9 + https://github.com/eta-lang/dhall-to-etlas/raw/cabal/dhall/prelude.dhall let types = - https://github.com/eta-lang/dhall-to-etlas/raw/master/dhall/types.dhall sha256:4de5daf77713923a6510c4eff516a6f9caf9a52761fc0558d7a924eef0050e09 + https://github.com/eta-lang/dhall-to-etlas/raw/cabal/dhall/types.dhall let v = prelude.v @@ -11,7 +11,7 @@ let anyVersion = prelude.anyVersion let pkg = λ(name : Text) → λ(version-range : types.VersionRange) - → { bounds = version-range, package = name } + → { bounds = version-range, package = name, library-names = [ types.LibraryName.main-library ] } let pkgVer = λ(packageName : Text) @@ -25,7 +25,7 @@ let pkgVer = ) let deps = - { etlas-cabal = pkg "etlas-cabal" anyVersion + { etlas-cabal = pkg "etlas-cabal" anyVersion , Diff = pkgVer "Diff" "0.3.4" "0.4" , base = pkgVer "base" "4.5" "5" , bytestring = pkgVer "bytestring" "0.10" "0.11" @@ -109,7 +109,7 @@ in prelude.utils.mapBuildInfo , version = v "1.3.4.0" , library = prelude.unconditional.library - ( prelude.defaults.Library + ( prelude.defaults.MainLibrary ⫽ { build-depends = [ deps.etlas-cabal , deps.bytestring