Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sheaf
head.hackage
Commits
957ee321
Commit
957ee321
authored
5 years ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
Update streaming-0.2.2.0 patch from upstream
From streaming commit a59174400842f6446eefd4b83e1951696ecdf4e1
parent
7c7facab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/streaming-0.2.2.0.patch
+50
-8
50 additions, 8 deletions
patches/streaming-0.2.2.0.patch
with
50 additions
and
8 deletions
patches/streaming-0.2.2.0.patch
+
50
−
8
View file @
957ee321
diff -ru streaming-0.2.2.0.orig/src/Streaming/Internal.hs streaming-0.2.2.0/src/Streaming/Internal.hs
commit 93324cf750bc289bb1cb8c1f0087367a8510c23d
--- streaming-0.2.2.0.orig/src/Streaming/Internal.hs 1969-12-31 19:00:00.000000000 -0500
Author: Ben Gamari <ben@smart-cactus.org>
+++ streaming-0.2.2.0/src/Streaming/Internal.hs 2019-05-02 15:48:52.108061100 -0400
Date: Mon Jul 15 13:34:47 2019 -0400
@@ -91,6 +91,7 @@
Adjust for base 4.13 MonadFail changes.
Adds a MonadFail instance for Stream as well
as removing fail from the Monad instance under
base 4.13.
diff --git a/changelog.md b/changelog.md
index 666ee3a..dac7930 100644
--- a/changelog.md
+++ b/changelog.md
@@ -19,6 +19,10 @@
Generalise type signature of `toList_`.
+ Compatibility with base 4.13.
+
+ Provide a MonadFail instance for Stream.
+
- 0.2.1.0
Adding `Semigroup` instances for GHC 8.4.
diff --git a/src/Streaming/Internal.hs b/src/Streaming/Internal.hs
index a789f68..cd6f7b4 100644
--- a/src/Streaming/Internal.hs
+++ b/src/Streaming/Internal.hs
@@ -91,6 +91,7 @@
import Control.Monad.Trans
import Control.Monad.Reader.Class
import Control.Monad.Reader.Class
import Control.Monad.State.Class
import Control.Monad.State.Class
import Control.Monad.Error.Class
import Control.Monad.Error.Class
+import
qualified
Control.Monad.Fail as Fail
+import Control.Monad.Fail as Fail
import Control.Applicative
import Control.Applicative
import Data.Function ( on )
import Data.Function ( on )
import Control.Monad.Morph
import Control.Monad.Morph
@@ -244,9 +245,14 @@
@@ -244,9 +245,14 @@
instance (Functor f, Monad m) => Monad (Stream f m) where
Return r -> f r
Return r -> f r
{-# INLINABLE (>>=) #-}
{-# INLINABLE (>>=) #-}
- fail = lift . fail
- {-#INLINE fail #-}
+#if !(MIN_VERSION_base(4,13,0))
+#if !(MIN_VERSION_base(4,13,0))
fail = lift . fail
+
fail = lift .
Prelude.
fail
{-#INLINE fail #-}
+
{-#
INLINE fail #-}
+#endif
+#endif
+instance (Functor f, MonadFail m) => MonadFail (Stream f m) where
+instance (Functor f, MonadFail m) => MonadFail (Stream f m) where
...
@@ -24,3 +52,17 @@ diff -ru streaming-0.2.2.0.orig/src/Streaming/Internal.hs streaming-0.2.2.0/src/
...
@@ -24,3 +52,17 @@ diff -ru streaming-0.2.2.0.orig/src/Streaming/Internal.hs streaming-0.2.2.0/src/
-- _bind
-- _bind
-- :: (Functor f, Monad m)
-- :: (Functor f, Monad m)
diff --git a/streaming.cabal b/streaming.cabal
index cfc3a13..a1d0433 100644
--- a/streaming.cabal
+++ b/streaming.cabal
@@ -222,5 +222,9 @@
library
, transformers-base < 0.5
, ghc-prim
, containers
+
+ if !impl(ghc >= 8.0)
+ build-depends: fail == 4.9.*
+
hs-source-dirs: src
default-language: Haskell2010
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment