Skip to content

Commit

Permalink
Merge pull request #225 from BebeSparkelSparkel/monopointed-text-builder
Browse files Browse the repository at this point in the history
Added MonoPointed instance for text Builder
  • Loading branch information
BebeSparkelSparkel authored Jul 12, 2024
2 parents 6f27a4f + 8c44b69 commit 17998c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mono-traversable/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ChangeLog for mono-traversable

## 1.0.18.0

* Added MonoPointed instance for text Builder
[#225](https://github.com/snoyberg/mono-traversable/pull/225)

## 1.0.17.0

* Added `inits`, `tails`, `initTails` to class `IsSequence` with tests and benchmarks for `initTails`.
Expand Down
2 changes: 1 addition & 1 deletion mono-traversable/mono-traversable.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: mono-traversable
version: 1.0.17.1
version: 1.0.18.0
synopsis: Type classes for mapping, folding, and traversing monomorphic containers
description: Please see the README at <https://www.stackage.org/package/mono-traversable>
category: Data
Expand Down
2 changes: 1 addition & 1 deletion mono-traversable/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mono-traversable
version: 1.0.17.1
version: 1.0.18.0
synopsis: Type classes for mapping, folding, and traversing monomorphic containers
description: Please see the README at <https://www.stackage.org/package/mono-traversable>
category: Data
Expand Down
7 changes: 7 additions & 0 deletions mono-traversable/src/Data/MonoTraversable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import Data.Monoid (Monoid (..), Any (..), All (..))
import Data.Proxy
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Builder as TB
import Data.Traversable
import Data.Word (Word8)
import Data.Int (Int, Int64)
Expand Down Expand Up @@ -111,6 +112,8 @@ type instance Element L.ByteString = Word8
type instance Element B.Builder = Word8
type instance Element T.Text = Char
type instance Element TL.Text = Char
-- | @since 1.0.18.0
type instance Element TB.Builder = Char
type instance Element [a] = a
type instance Element (IO a) = a
type instance Element (ZipList a) = a
Expand Down Expand Up @@ -1153,6 +1156,10 @@ instance MonoPointed T.Text where
instance MonoPointed TL.Text where
opoint = TL.singleton
{-# INLINE opoint #-}
-- | @since 1.0.18.0
instance MonoPointed TB.Builder where
opoint = TB.singleton
{-# INLINE opoint #-}

-- Applicative
instance MonoPointed [a]
Expand Down

0 comments on commit 17998c3

Please sign in to comment.