From b6c7b4c973a2b6986ca02ebf57e77c8f091117ef Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Tue, 1 Aug 2023 11:07:57 +0100 Subject: [PATCH 1/4] Don't import Data.Functor.unzip This avoids a name clash. --- classy-prelude/src/ClassyPrelude.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classy-prelude/src/ClassyPrelude.hs b/classy-prelude/src/ClassyPrelude.hs index 139f9bc7..ae14fb22 100644 --- a/classy-prelude/src/ClassyPrelude.hs +++ b/classy-prelude/src/ClassyPrelude.hs @@ -153,7 +153,7 @@ module ClassyPrelude import qualified Prelude import Control.Applicative ((<**>),liftA,liftA2,liftA3,Alternative (..), optional) -import Data.Functor +import Data.Functor hiding (unzip) import Control.Exception (assert) import Control.DeepSeq (deepseq, ($!!), force, NFData (..)) import Control.Monad (when, unless, void, liftM, ap, forever, join, replicateM_, guard, MonadPlus (..), (=<<), (>=>), (<=<), liftM2, liftM3, liftM4, liftM5) From eb49a0dfe1d5d5287481d3b6dad9cd7732a9a81d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 1 Aug 2023 16:01:37 +0300 Subject: [PATCH 2/4] Remove newstack --- .github/workflows/tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 729e6efd..42303cbf 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,5 @@ jobs: shell: bash run: | set -ex - mkdir -p ../_newstack - stack upgrade --force-download --local-bin-path ../_newstack - ../_newstack/stack --version - ../_newstack/stack test --fast --no-terminal --stack-yaml=${{ matrix.stack-yaml }} --resolver=${{ matrix.resolver }} + stack --version + stack test --fast --no-terminal --stack-yaml=${{ matrix.stack-yaml }} --resolver=${{ matrix.resolver }} From 7249f3a238f95982891cd3b5ac4a18c6cb844509 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 1 Aug 2023 16:02:44 +0300 Subject: [PATCH 3/4] Version bump for #215 --- classy-prelude/ChangeLog.md | 5 +++++ classy-prelude/package.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/classy-prelude/ChangeLog.md b/classy-prelude/ChangeLog.md index 670ed9d9..183823a0 100644 --- a/classy-prelude/ChangeLog.md +++ b/classy-prelude/ChangeLog.md @@ -1,6 +1,11 @@ # ChangeLog for classy-prelude +## 1.5.0.3 + +* Don't import Data.Functor.unzip [#215](https://github.com/snoyberg/mono-traversable/pull/215) + ## 1.5.0.2 + * Fix building with time >= 1.10 [#207](https://github.com/snoyberg/mono-traversable/pull/207). ## 1.5.0.1 diff --git a/classy-prelude/package.yaml b/classy-prelude/package.yaml index cc667a9d..dd33b8dc 100644 --- a/classy-prelude/package.yaml +++ b/classy-prelude/package.yaml @@ -1,5 +1,5 @@ name: classy-prelude -version: 1.5.0.2 +version: 1.5.0.3 synopsis: A typeclass-based Prelude. description: See docs and README at category: Control, Prelude From d1ea1d7d28b00645be67caf51a8176621a7420eb Mon Sep 17 00:00:00 2001 From: William Rusnack Date: Tue, 13 Feb 2024 13:00:19 -0500 Subject: [PATCH 4/4] added MonoPointed instance for bytestring Builder --- mono-traversable/src/Data/MonoTraversable.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mono-traversable/src/Data/MonoTraversable.hs b/mono-traversable/src/Data/MonoTraversable.hs index 8e88451a..078f7438 100644 --- a/mono-traversable/src/Data/MonoTraversable.hs +++ b/mono-traversable/src/Data/MonoTraversable.hs @@ -33,6 +33,7 @@ import Control.Category import Control.Monad (Monad (..)) import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L +import qualified Data.ByteString.Builder as B import qualified Data.Foldable as F import Data.Functor import Data.Maybe (fromMaybe) @@ -106,6 +107,7 @@ import Control.Monad.Trans.Identity (IdentityT) type family Element mono type instance Element S.ByteString = Word8 type instance Element L.ByteString = Word8 +type instance Element B.Builder = Word8 type instance Element T.Text = Char type instance Element TL.Text = Char type instance Element [a] = a @@ -1140,6 +1142,9 @@ instance MonoPointed S.ByteString where instance MonoPointed L.ByteString where opoint = L.singleton {-# INLINE opoint #-} +instance MonoPointed B.Builder where + opoint = B.word8 + {-# INLINE opoint #-} instance MonoPointed T.Text where opoint = T.singleton {-# INLINE opoint #-}