Skip to content

build with ghc-9.2 #167

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

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion monad-chronicle/monad-chronicle.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library

-- ghc boot libs
build-depends:
base >=4.5.1.0 && <4.16
base >=4.5.1.0 && <4.17
, mtl >=2.1.3 && <2.3
, transformers >=0.3.0.0 && <0.6

Expand Down
2 changes: 1 addition & 1 deletion semialign-indexed/semialign-indexed.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ library
default-language: Haskell2010
ghc-options: -Wall
reexported-modules: Data.Semialign.Indexed
build-depends: base >=4.10.0.0 && <4.16
build-depends: base >=4.10.0.0 && <4.17
build-depends: semialign >=1.2 && <1.2.1
build-depends: lens ==5.*
2 changes: 1 addition & 1 deletion semialign-optics/semialign-optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ library
default-language: Haskell2010
ghc-options: -Wall
reexported-modules: Data.Semialign.Indexed
build-depends: base >=4.10.0.0 && <4.16
build-depends: base >=4.10.0.0 && <4.17
build-depends: semialign >=1.2 && <1.2.1
build-depends: optics-core ==0.4.*
2 changes: 1 addition & 1 deletion semialign/semialign.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ library

-- ghc boot libs
build-depends:
base >=4.5.1.0 && <4.16
base >=4.5.1.0 && <4.17
, containers >=0.4.2.1 && <0.7
, transformers >=0.3.0.0 && <0.7

Expand Down
9 changes: 8 additions & 1 deletion semialign/src/Data/Semialign/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ import Data.List.NonEmpty (NonEmpty (..))
import Data.Maybe (catMaybes)
import Data.Monoid (Monoid (..))
import Data.Proxy (Proxy (..))
import Data.Semigroup (Option (..), Semigroup (..))
#if !MIN_VERSION_base(4,16,0)
import Data.Semigroup (Option (..))
#endif
import Data.Semigroup (Semigroup (..))
import Data.Sequence (Seq)
import Data.Tagged (Tagged (..))
import Data.Vector.Fusion.Stream.Monadic (Step (..), Stream (..))
Expand Down Expand Up @@ -481,12 +484,14 @@ instance SemialignWithIndex Int NonEmpty
instance ZipWithIndex Int NonEmpty
instance RepeatWithIndex Int NonEmpty

#if !MIN_VERSION_base(4,16,0)
deriving instance Semialign Option
deriving instance Align Option
deriving instance Unalign Option
deriving instance Zip Option
deriving instance Repeat Option
deriving instance Unzip Option
#endif

{-
deriving instance SemialignWithIndex () Option

Choose a reason for hiding this comment

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

Do you want to move the #endif to below this block comment, so that if it's ever uncommented it will do the right thing?

Expand Down Expand Up @@ -742,7 +747,9 @@ instance Monad m => Semialign (Stream m) where
Done -> case (av, adone) of
(Just x, False) -> Yield (f $ This x) (sa, sb, Nothing, adone)
(_, True) -> Done
#if !MIN_VERSION_base(4,16,0)
_ -> Skip (sa, sb, Nothing, False)
#endif

Choose a reason for hiding this comment

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

Why did you need to do this? It compiles fine for me without making this change.

Copy link
Author

Choose a reason for hiding this comment

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

Without this I get a warning from GHC about a redundant pattern match. Newer versions of GHC are smarter in recognizing those than previous versions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather match above with av@(Just x)

It wasn't obvious to me why the branch is redundant.


instance Monad m => Zip (Stream m) where
zipWith = Stream.zipWith
Expand Down
2 changes: 2 additions & 0 deletions semialign/src/Data/Zip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ instance (Zip f, Semigroup a) => Semigroup (Zippy f a) where

instance (Repeat f, Monoid a) => Monoid (Zippy f a) where
mempty = Zippy $ repeat mempty
#if !MIN_VERSION_base(4,16,0)
mappend (Zippy x) (Zippy y) = Zippy $ zipWith mappend x y
#endif

#ifdef MIN_VERSION_semigroupoids
instance Zip f => Apply (Zippy f) where
Expand Down
4 changes: 2 additions & 2 deletions these-lens/these-lens.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ library
exposed-modules: Data.These.Lens

-- ghc boot libs
build-depends: base >=4.5.1.0 && <4.16
build-depends: base >=4.5.1.0 && <4.17
build-depends: these >=1 && <1.2

-- other dependencies
build-depends: lens >=4.17.1 && <5.1
build-depends: lens >=4.17.1 && <5.2
2 changes: 1 addition & 1 deletion these-optics/these-optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ library
exposed-modules: Data.These.Optics

-- ghc boot libs
build-depends: base >=4.9 && <4.16
build-depends: base >=4.9 && <4.17

-- these
build-depends: these >=1 && <1.2
Expand Down
2 changes: 1 addition & 1 deletion these-tests/these-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library
default-language: Haskell2010
hs-source-dirs: src
exposed-modules: Dummy
build-depends: base <4.16
build-depends: base <4.17

test-suite test
default-language: Haskell2010
Expand Down
2 changes: 1 addition & 1 deletion these/these.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ library

-- ghc boot libs
build-depends:
base >=4.5.1.0 && <4.16
base >=4.5.1.0 && <4.17
, binary >=0.5.1.0 && <0.10
, deepseq >=1.3.0.0 && <1.5

Expand Down