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

Bump version bounds #188

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
34 changes: 17 additions & 17 deletions dhall-to-cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ library
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
Cabal ^>=3.0,
bytestring ^>=0.10,
containers ^>=0.5 || ^>=0.6,
Expand All @@ -93,16 +93,16 @@ executable dhall-to-cabal
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
Cabal ^>=3.0,
containers ^>=0.5 || ^>=0.6,
dhall-to-cabal -any,
directory ^>=1.3.0.2,
filepath ^>=1.4,
microlens ^>=0.1.0.0 || ^>=0.2.0.0 || ^>=0.3.0.0 || ^>=0.4.0.0,
optparse-applicative ^>=0.13.2 || ^>=0.14 || ^>=0.15,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0 || ^>=1.4.0 || ^>=1.5.0,
text ^>=1.2,
transformers ^>=0.5.2

Expand All @@ -120,12 +120,12 @@ executable cabal-to-dhall
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
bytestring ^>=0.10,
dhall-to-cabal -any,
optparse-applicative ^>=0.13.2 || ^>=0.14 || ^>=0.15,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0 || ^>=1.4.0 || ^>=1.5.0,
text ^>=1.2

executable dhall-to-cabal-meta
Expand All @@ -140,13 +140,13 @@ executable dhall-to-cabal-meta
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
directory ^>=1.3.0.2,
dhall-to-cabal -any,
filepath ^>=1.4,
optparse-applicative ^>=0.13.2 || ^>=0.14 || ^>=0.15,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0
prettyprinter ^>=1.2.0.1 || ^>=1.3.0 || ^>=1.4.0 || ^>=1.5.0

test-suite golden-tests
type: exitcode-stdio-1.0
Expand All @@ -160,15 +160,15 @@ test-suite golden-tests
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
Cabal ^>=3.0,
Diff ^>=0.3.4,
Diff ^>=0.3.4 || ^>=0.4.0,
bytestring ^>=0.10,
dhall-to-cabal -any,
filepath ^>=1.4,
microlens ^>=0.1.0.0 || ^>=0.2.0.0 || ^>=0.3.0.0 || ^>=0.4.0.0,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0,
prettyprinter ^>=1.2.0.1 || ^>=1.3.0 || ^>=1.4.0 || ^>=1.5.0,
tasty ^>=0.11 || ^>=0.12 || ^>=1.0 || ^>=1.1 || ^>=1.2,
tasty-golden ^>=2.3,
text ^>=1.2
Expand All @@ -186,8 +186,8 @@ test-suite unit-tests
-Wno-monomorphism-restriction -fno-warn-name-shadowing

build-depends:
base ^>=4.10 || ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0,
base ^>=4.11 || ^>=4.12,
dhall ^>=1.26.0 || ^>=1.27.0,
Cabal ^>=3.0,
dhall-to-cabal -any,
tasty ^>=0.11 || ^>=0.12 || ^>=1.0 || ^>=1.1 || ^>=1.2,
Expand Down
8 changes: 4 additions & 4 deletions dhall-to-cabal.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ let deps =
{ Cabal =
majorVersions "Cabal" [ v "3.0" ] [ types.LibraryName.main-library ]
, Diff =
majorVersions "Diff" [ v "0.3.4" ] [ types.LibraryName.main-library ]
majorVersions "Diff" [ v "0.3.4", v "0.4.0" ] [ types.LibraryName.main-library ]
, base =
majorVersions "base" [ v "4.10", v "4.11", v "4.12" ] [ types.LibraryName.main-library ]
majorVersions "base" [ v "4.11", v "4.12" ] [ types.LibraryName.main-library ]
, bytestring =
majorVersions "bytestring" [ v "0.10" ] [ types.LibraryName.main-library ]
, containers =
majorVersions "containers" [ v "0.5", v "0.6" ] [ types.LibraryName.main-library ]
, directory =
majorVersions "directory" [ v "1.3.0.2" ] [ types.LibraryName.main-library ]
, dhall =
majorVersions "dhall" [ v "1.26.0" ] [ types.LibraryName.main-library ]
majorVersions "dhall" [ v "1.26.0", v "1.27.0" ] [ types.LibraryName.main-library ]
, dhall-to-cabal =
package "dhall-to-cabal" anyVersion
, filepath =
Expand All @@ -43,7 +43,7 @@ let deps =
[ v "0.13.2", v "0.14", v "0.15" ]
[ types.LibraryName.main-library ]
, prettyprinter =
majorVersions "prettyprinter" [ v "1.2.0.1", v "1.3.0" ] [ types.LibraryName.main-library ]
majorVersions "prettyprinter" [ v "1.2.0.1", v "1.3.0", v "1.4.0", v "1.5.0" ] [ types.LibraryName.main-library ]
, contravariant =
majorVersions "contravariant" [ v "1.4", v "1.5" ] [ types.LibraryName.main-library ]
, tasty =
Expand Down
5 changes: 2 additions & 3 deletions lib/CabalToDhall.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module CabalToDhall
import Data.Foldable ( foldMap, toList )
import Data.Functor.Contravariant ( (>$<), Contravariant( contramap ) )
import Data.Semigroup ( Semigroup, (<>) )
import Data.Void ( absurd )
import Data.Void ( Void, absurd )
import Numeric.Natural ( Natural )

import qualified Data.ByteString as ByteString
Expand All @@ -30,7 +30,6 @@ import qualified Dhall.Core
import qualified Dhall.Core as Expr ( Expr(..), Var(..), Chunks(..), makeBinding )
import qualified Dhall.Map as Map
import qualified Dhall.Parser
import qualified Dhall.TypeCheck
import qualified Distribution.Compiler as Cabal
import qualified Distribution.License as Cabal
import qualified Distribution.ModuleName as Cabal
Expand Down Expand Up @@ -508,7 +507,7 @@ runRecordInputType ( RecordInputType m ) =
}


runRecordInputTypeWithDefault :: KnownDefault -> Default Dhall.Parser.Src Dhall.TypeCheck.X -> RecordInputType a -> Dhall.InputType a
runRecordInputTypeWithDefault :: KnownDefault -> Default Dhall.Parser.Src Void -> RecordInputType a -> Dhall.InputType a
runRecordInputTypeWithDefault typ def m =
let
Dhall.InputType embed declared = runRecordInputType m
Expand Down
6 changes: 3 additions & 3 deletions lib/DhallToCabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module DhallToCabal
import Data.List ( partition )
import Data.Maybe ( fromMaybe )
import Data.Monoid ( (<>) )
import Data.Void ( Void )

import qualified Data.Set as Set
import qualified Data.Text as StrictText
Expand All @@ -61,7 +62,6 @@ import qualified Dhall
import qualified Dhall.Core
import qualified Dhall.Map as Map
import qualified Dhall.Parser
import qualified Dhall.TypeCheck
import qualified Distribution.Compiler as Cabal
import qualified Distribution.License as Cabal
import qualified Distribution.ModuleName as Cabal
Expand Down Expand Up @@ -417,7 +417,7 @@ buildInfo = do
return Cabal.BuildInfo { .. }


buildInfoType :: Expr.Expr Dhall.Parser.Src Dhall.TypeCheck.X
buildInfoType :: Expr.Expr Dhall.Parser.Src Void
buildInfoType =
Dhall.expected ( Dhall.record buildInfo )

Expand Down Expand Up @@ -1299,7 +1299,7 @@ mergeCommonGuards ( a : as ) =



configRecordType :: Expr.Expr Dhall.Parser.Src Dhall.TypeCheck.X
configRecordType :: Expr.Expr Dhall.Parser.Src Void
configRecordType =
let
predicate on =
Expand Down
2 changes: 1 addition & 1 deletion lib/DhallToCabal/ConfigTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ instance ( Semigroup a ) => Semigroup ( ConfigTree cond a ) where

instance ( Monoid a ) => Monoid ( ConfigTree cond a ) where
mempty = pure mempty
mappend = liftM2 mappend
mappend = (<>)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be breaking GHC 7.10 compatibility; the warning is unfortunate but it's the least evil. I don't actually care too much about old GHCs, but bounds will need to be adjusted and I think @jneira does care about GHC 7.10.

Copy link
Collaborator

@jneira jneira Nov 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, i have already to keep my etlas specific fork with changes over ghc and cabal versions so updating the bounds here could be fine



-- | Given a Dhall expression that is of the form @λ( config : Config ) -> a@,
Expand Down
4 changes: 2 additions & 2 deletions tests/DhallToCabal/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ module DhallToCabal.Tests
where

import Data.Maybe ( fromMaybe )
import Data.Void ( Void )
import Dhall.Core ( Const(..), Expr(..), Chunks(..) )

import qualified Data.Text as StrictText
import qualified Dhall
import qualified Dhall.Core
import qualified Dhall.Parser
import qualified Dhall.TypeCheck
import qualified DhallToCabal
import qualified Distribution.Text as Cabal ( simpleParse )
import qualified Test.Tasty
Expand Down Expand Up @@ -49,7 +49,7 @@ testExtraction
:: ( Eq a, Show a )
=> Test.Tasty.TestName
-> Dhall.Type a
-> Dhall.Core.Expr Dhall.Parser.Src Dhall.TypeCheck.X
-> Dhall.Core.Expr Dhall.Parser.Src Void
-> a
-> Test.Tasty.TestTree
testExtraction testName t expr expected =
Expand Down