-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: master
Are you sure you want to change the base?
build with ghc-9.2 #167
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 (..)) | ||
|
@@ -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 | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather match above with It wasn't obvious to me why the branch is redundant. |
||
|
||
instance Monad m => Zip (Stream m) where | ||
zipWith = Stream.zipWith | ||
|
There was a problem hiding this comment.
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?