Skip to content

Commit

Permalink
Upgrade to Dhall 1.24.
Browse files Browse the repository at this point in the history
  • Loading branch information
quasicomputational committed Jun 9, 2019
1 parent bdd8ee2 commit 4c3133f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 29 deletions.
12 changes: 6 additions & 6 deletions dhall-to-cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ library
bytestring ^>=0.10,
containers ^>=0.5 || ^>=0.6,
contravariant ^>=1.4 || ^>=1.5,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
filepath ^>=1.4,
text ^>=1.2,
transformers ^>=0.5.2,
Expand All @@ -89,7 +89,7 @@ executable dhall-to-cabal
build-depends:
Cabal ^>=2.4,
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
dhall-to-cabal -any,
directory ^>=1.3.0.2,
filepath ^>=1.4,
Expand All @@ -115,7 +115,7 @@ executable cabal-to-dhall
-fno-warn-name-shadowing
build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
bytestring ^>=0.10,
dhall-to-cabal -any,
optparse-applicative ^>=0.13.2 || ^>=0.14,
Expand All @@ -135,7 +135,7 @@ executable dhall-to-cabal-meta
build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
directory ^>=1.3.0.2,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
dhall-to-cabal -any,
filepath ^>=1.4,
optparse-applicative ^>=0.13.2 || ^>=0.14,
Expand All @@ -156,7 +156,7 @@ test-suite golden-tests
Cabal ^>=2.4,
Diff ^>=0.3.4,
bytestring ^>=0.10,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
dhall-to-cabal -any,
filepath ^>=1.4,
microlens ^>=0.1.0.0 || ^>=0.2.0.0 || ^>=0.3.0.0 || ^>=0.4.0.0,
Expand All @@ -180,7 +180,7 @@ test-suite unit-tests
build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
Cabal ^>=2.4,
dhall ^>=1.23.0,
dhall ^>=1.24.0,
dhall-to-cabal -any,
tasty ^>=0.11 || ^>=0.12 || ^>=1.0 || ^>=1.1 || ^>=1.2,
tasty-hunit ^>=0.10.0.1,
Expand Down
2 changes: 1 addition & 1 deletion dhall-to-cabal.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let deps =
, directory =
majorVersions "directory" [ v "1.3.0.2" ]
, dhall =
majorVersions "dhall" [ v "1.23.0" ]
majorVersions "dhall" [ v "1.24.0" ]
, dhall-to-cabal =
package "dhall-to-cabal" anyVersion
, filepath =
Expand Down
24 changes: 12 additions & 12 deletions dhall.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
, doctest, dotgen, exceptions, filepath, foldl, haskeline
, http-client, http-client-tls, http-types, lens-family-core
, megaparsec, memory, mockery, mtl, optparse-applicative, parsers
, prettyprinter, prettyprinter-ansi-terminal, QuickCheck
, quickcheck-instances, repline, scientific, serialise, stdenv
, tasty, tasty-hunit, tasty-quickcheck, template-haskell, text
, transformers, transformers-compat, turtle, unordered-containers
, uri-encode, vector
, prettyprinter, prettyprinter-ansi-terminal, profunctors
, QuickCheck, quickcheck-instances, repline, scientific, serialise
, stdenv, tasty, tasty-hunit, tasty-quickcheck, template-haskell
, text, transformers, transformers-compat, turtle
, unordered-containers, uri-encode, vector
}:
mkDerivation {
pname = "dhall";
version = "1.23.0";
sha256 = "eda7b9d1baad8214f83aaf7e7ce5e374c32a62f58ca69734024fb3f254bc9d1c";
version = "1.24.0";
sha256 = "67ff6ff2bcd3c3fed0a598f8038f62a18676a419f7f7773a07804a5cc89404d8";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
Expand All @@ -22,16 +22,16 @@ mkDerivation {
dotgen exceptions filepath haskeline http-client http-client-tls
http-types lens-family-core megaparsec memory mtl
optparse-applicative parsers prettyprinter
prettyprinter-ansi-terminal repline scientific serialise
template-haskell text transformers transformers-compat
prettyprinter-ansi-terminal profunctors repline scientific
serialise template-haskell text transformers transformers-compat
unordered-containers uri-encode vector
];
executableHaskellDepends = [ base ];
testHaskellDepends = [
base bytestring cborg containers deepseq directory doctest filepath
foldl mockery prettyprinter QuickCheck quickcheck-instances
serialise tasty tasty-hunit tasty-quickcheck text transformers
turtle vector
foldl megaparsec mockery prettyprinter QuickCheck
quickcheck-instances serialise tasty tasty-hunit tasty-quickcheck
text transformers turtle vector
];
benchmarkHaskellDepends = [
base bytestring containers criterion directory serialise text
Expand Down
11 changes: 1 addition & 10 deletions lib/DhallToCabal/ConfigTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module DhallToCabal.ConfigTree ( ConfigTree(..), toConfigTree ) where
import Control.Monad
import Data.Semigroup ( Semigroup ( (<>) ) )
import Dhall.Core hiding ( Const )
import Dhall.Optics ( transformMOf )


-- | 'ConfigTree' captures a logic-monad like expansion of the result of
Expand Down Expand Up @@ -87,13 +88,3 @@ rewriteConfigUse v =
isConfigUse (App (App (Field (Var x') "impl") _) _) | v == x' = True
isConfigUse (App (Field (Var x') "flag") _) | v == x' = True
isConfigUse _ = False


-- | Transform every element in a tree using a user supplied 'Traversal' in a
-- bottom-up manner with a monadic effect.
transformMOf
:: Monad m =>
( ( t -> m b ) -> t -> m a ) -> ( a -> m b ) -> t -> m b
transformMOf l f = go where
go t = l go t >>= f
{-# INLINE transformMOf #-}

0 comments on commit 4c3133f

Please sign in to comment.