Skip to content
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

Support GHC 7.10.3 for all Dhall packages #814

Merged
merged 2 commits into from
Feb 12, 2019
Merged
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
2 changes: 1 addition & 1 deletion dhall-bash/dhall-bash.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: dhall-bash
Version: 1.0.18
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.2, GHC == 8.0.1
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
License: BSD3
License-File: LICENSE
Copyright: 2017 Gabriel Gonzalez
Expand Down
2 changes: 1 addition & 1 deletion dhall-json/dhall-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: dhall-json
Version: 1.2.6
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.2, GHC == 8.0.1
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
License: BSD3
License-File: LICENSE
Copyright: 2017 Gabriel Gonzalez
Expand Down
17 changes: 8 additions & 9 deletions dhall-json/dhall-to-json/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}

Expand Down Expand Up @@ -35,13 +34,13 @@ data Options = Options
}

parseOptions :: Parser Options
parseOptions = Options.Applicative.helper <*> do
explain <- parseExplain
pretty <- parsePretty
omitNull <- parseOmitNull
version <- parseVersion
conversion <- Dhall.JSON.parseConversion
return (Options {..})
parseOptions =
Options
<$> parseExplain
<*> parsePretty
<*> parseOmitNull
<*> parseVersion
<*> Dhall.JSON.parseConversion
where
parseExplain =
Options.Applicative.switch
Expand Down Expand Up @@ -84,7 +83,7 @@ parseOptions = Options.Applicative.helper <*> do
parserInfo :: ParserInfo Options
parserInfo =
Options.Applicative.info
parseOptions
(Options.Applicative.helper <*> parseOptions)
( Options.Applicative.fullDesc
<> Options.Applicative.progDesc "Compile Dhall to JSON"
)
Expand Down
15 changes: 7 additions & 8 deletions dhall-json/dhall-to-yaml/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}

Expand Down Expand Up @@ -29,12 +28,12 @@ data Options = Options
}

parseOptions :: Parser Options
parseOptions = Options.Applicative.helper <*> do
explain <- parseExplain
omitNull <- parseOmitNull
documents <- parseDocuments
conversion <- Dhall.JSON.parseConversion
return (Options {..})
parseOptions =
Options
<$> parseExplain
<*> parseOmitNull
<*> parseDocuments
<*> Dhall.JSON.parseConversion
where
parseExplain =
Options.Applicative.switch
Expand All @@ -57,7 +56,7 @@ parseOptions = Options.Applicative.helper <*> do
parserInfo :: ParserInfo Options
parserInfo =
Options.Applicative.info
parseOptions
(Options.Applicative.helper <*> parseOptions)
( Options.Applicative.fullDesc
<> Options.Applicative.progDesc "Compile Dhall to YAML"
)
Expand Down
6 changes: 1 addition & 5 deletions dhall-json/src/Dhall/JSON.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -699,10 +698,7 @@ parseConversion =
conversion
<|> noConversion
where
conversion = do
mapKey <- parseKeyField
mapValue <- parseValueField
return (Conversion {..})
conversion = Conversion <$> parseKeyField <*> parseValueField
where
parseKeyField =
Options.Applicative.strOption
Expand Down
2 changes: 1 addition & 1 deletion dhall-text/dhall-text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: dhall-text
Version: 1.0.15
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.2, GHC == 8.0.1
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
License: BSD3
License-File: LICENSE
Copyright: 2017 Gabriel Gonzalez
Expand Down
2 changes: 1 addition & 1 deletion dhall/dhall.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: dhall
Version: 1.20.1
Cabal-Version: >=1.10
Build-Type: Simple
Tested-With: GHC == 8.0.1
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
License: BSD3
License-File: LICENSE
Copyright: 2017 Gabriel Gonzalez
Expand Down
30 changes: 27 additions & 3 deletions nix/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,23 @@ let
haskellPackagesNew.fail
];

blaze-builder =
pkgsNew.haskell.lib.addBuildDepend
haskellPackagesOld.blaze-builder
haskellPackagesNew.semigroups;

cborg =
pkgsNew.haskell.lib.addBuildDepends
haskellPackagesOld.cborg
[ haskellPackagesNew.fail
haskellPackagesNew.semigroups
];

conduit =
pkgsNew.haskell.lib.addBuildDepend
haskellPackagesOld.conduit
haskellPackagesNew.semigroups;

contravariant =
pkgsNew.haskell.lib.addBuildDepends
haskellPackagesOld.contravariant
Expand All @@ -317,14 +327,25 @@ let
haskellPackagesNew.mockery
];

generic-deriving =
pkgsNew.haskell.lib.dontCheck
haskellPackagesOld.generic-deriving;

haskell-src =
pkgsNew.haskell.lib.addBuildDepends
haskellPackagesOld.haskell-src
[ haskellPackagesNew.fail
haskellPackagesNew.semigroups
];

megaparsec =
pkgsNew.haskell.lib.addBuildDepend
haskellPackagesOld.megaparsec
haskellPackagesNew.fail;

generic-deriving =
pkgsNew.haskell.lib.dontCheck
haskellPackagesOld.generic-deriving;
neat-interpolation =
pkgsNew.haskell.lib.doJailbreak
haskellPackagesOld.neat-interpolation;

prettyprinter =
pkgsNew.haskell.lib.addBuildDepend
Expand All @@ -345,6 +366,9 @@ let
wcwidth =
pkgsNew.haskell.lib.appendPatch
haskellPackagesOld.wcwidth ./wcwidth.patch;

yaml =
pkgsNew.haskell.lib.doJailbreak haskellPackagesOld.yaml;
};

in
Expand Down
13 changes: 7 additions & 6 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ in
{ name = "dhall";

constituents = [
# Eta only requires the `dhall` package to build using GHC 7.10.3.
# This is why we don't need to test the other `dhall-*` packages on
# GHC 7.10.3
# Verify that the packages build against the oldest supported version
# of the compiler
shared_7_10_3.dhall
shared_7_10_3.dhall-bash
shared_7_10_3.dhall-json
shared_7_10_3.dhall-text

# Verify that the packages build against the latest version of the
# compiler
shared_8_6_1.dhall
# Verify that the packages build against the latest supported version
# of the compiler
shared_8_6_1.dhall
shared_8_6_1.dhall-bash
shared_8_6_1.dhall-json
Expand Down