Skip to content

Commit

Permalink
Merge pull request #188 from fosskers/colin/bi-classes
Browse files Browse the repository at this point in the history
Bi* Classes
  • Loading branch information
snoyberg authored Jun 12, 2020
2 parents a4efa37 + 1478979 commit 6f91a61
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 66 deletions.
6 changes: 6 additions & 0 deletions rio/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for rio

## 0.1.17.0

* Expose `Bifunctor`, `Bifoldable`, and `Bitraversable`.
* The `first` and `second` functions exported by `RIO` formerly originated from
`Control.Arrow`. They now come from `Bifunctor`.

## 0.1.16.0

* Expand the number of `microlens` functions exported by the RIO prelude.
Expand Down
2 changes: 1 addition & 1 deletion rio/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rio
version: 0.1.16.0
version: 0.1.17.0
synopsis: A standard library for Haskell
description: See README and Haddocks at <https://www.stackage.org/package/rio>
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion rio/rio.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: rio
version: 0.1.16.0
version: 0.1.17.0
synopsis: A standard library for Haskell
description: See README and Haddocks at <https://www.stackage.org/package/rio>
category: Control
Expand Down
128 changes: 76 additions & 52 deletions rio/src/RIO/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,55 @@ module RIO.Prelude
, Control.Monad.when
, Control.Monad.unless

-- * @Bifunctor@
-- | Re-exported from "Data.Bifunctor":
, Data.Bifunctor.bimap
, Data.Bifunctor.first
, Data.Bifunctor.second

-- * @Bifoldable@
-- | Re-exported from "Data.Bifoldable":
, Data.Bifoldable.bifold
, Data.Bifoldable.bifoldMap
, Data.Bifoldable.bifoldr
, Data.Bifoldable.bifoldl
, Data.Bifoldable.bifoldr'
, Data.Bifoldable.bifoldr1
, Data.Bifoldable.bifoldrM
, Data.Bifoldable.bifoldl'
, Data.Bifoldable.bifoldl1
, Data.Bifoldable.bifoldlM
, Data.Bifoldable.bitraverse_
, Data.Bifoldable.bifor_
, Data.Bifoldable.bisequence_
, Data.Bifoldable.biasum
, Data.Bifoldable.biList
, Data.Bifoldable.binull
, Data.Bifoldable.bilength
, Data.Bifoldable.bielem
, Data.Bifoldable.bimaximum
, Data.Bifoldable.biminimum
, Data.Bifoldable.bisum
, Data.Bifoldable.biproduct
, Data.Bifoldable.biconcat
, Data.Bifoldable.biconcatMap
, Data.Bifoldable.biand
, Data.Bifoldable.bior
, Data.Bifoldable.biany
, Data.Bifoldable.biall
, Data.Bifoldable.bimaximumBy
, Data.Bifoldable.biminimumBy
, Data.Bifoldable.binotElem
, Data.Bifoldable.bifind

-- * @Bitraverse@
-- | Re-exported from "Data.Bitraversable":
, Data.Bitraversable.bitraverse
, Data.Bitraversable.bisequence
, Data.Bitraversable.bifor
, Data.Bitraversable.bimapAccumL
, Data.Bitraversable.bimapAccumR

-- * @MonadPlus@
-- | Re-exported from "Control.Monad":
, Control.Monad.mzero
Expand All @@ -273,8 +322,6 @@ module RIO.Prelude

-- * @Arrow@
-- | Re-exported from "Control.Arrow" and "Control.Category":
, Control.Arrow.first
, Control.Arrow.second
, (Control.Arrow.&&&)
, (Control.Arrow.***)
, (Control.Category.>>>)
Expand Down Expand Up @@ -385,61 +432,38 @@ import qualified RIO.Prelude.Renames
import qualified RIO.Prelude.Text
import qualified RIO.Prelude.Types

import Prelude ((*))
import qualified Prelude

import qualified Control.Applicative
import qualified Control.Arrow
import qualified Control.Category
import qualified Control.DeepSeq
import qualified Control.Monad
import qualified Control.Monad.Primitive (primitive)
import qualified Control.Monad.Reader
import qualified Control.Monad.ST
import qualified Data.Bifoldable
import qualified Data.Bifunctor
import qualified Data.Bitraversable
import qualified Data.Bool

import qualified Data.Maybe

import qualified Data.ByteString.Short
import qualified Data.Either

import qualified Data.Tuple

import qualified Data.Eq

import qualified Data.Ord

import qualified Data.Word

import qualified Data.Semigroup

import qualified Data.Monoid

import qualified Data.Functor

import qualified Control.Applicative

import qualified Control.Monad

import qualified Data.Foldable

import qualified Data.Traversable

import qualified Control.Arrow
import qualified Control.Category

import qualified Data.Function

import qualified Data.Functor
import qualified Data.List

import qualified Data.Maybe
import qualified Data.Monoid
import qualified Data.Ord
import qualified Data.Semigroup
import qualified Data.String

import qualified Text.Show

import qualified Text.Read

import qualified Control.DeepSeq

import qualified Data.Void

import qualified Control.Monad.Reader

import qualified Data.ByteString.Short

import qualified Data.Text.Encoding (decodeUtf8', decodeUtf8With, encodeUtf8,
encodeUtf8Builder)
import qualified Data.Text.Encoding
(decodeUtf8', decodeUtf8With, encodeUtf8, encodeUtf8Builder)
import qualified Data.Text.Encoding.Error (lenientDecode)

import qualified Control.Monad.Primitive (primitive)
import qualified Control.Monad.ST
import qualified Data.Traversable
import qualified Data.Tuple
import qualified Data.Void
import qualified Data.Word
import Prelude ((*))
import qualified Prelude
import qualified Text.Read
import qualified Text.Show
35 changes: 23 additions & 12 deletions rio/src/RIO/Prelude/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,15 @@ module RIO.Prelude.Types
-- **** @Functor@
-- | Re-exported from "Data.Functor":
, Data.Functor.Functor
-- **** @Bifunctor@
-- | Re-exported from "Data.Bifunctor":
, Data.Bifunctor.Bifunctor
-- **** @Foldable@
-- | Re-exported from "Data.Foldable":
, Data.Foldable.Foldable
-- **** @Bifoldable@
-- | Re-exported from "Data.Bifoldable":
, Data.Bifoldable.Bifoldable
-- **** @Semigroup@
-- | Re-exported from "Data.Semigroup":
, Data.Semigroup.Semigroup
Expand All @@ -151,6 +157,9 @@ module RIO.Prelude.Types
-- **** @Traversable@
-- | Re-exported from "Data.Traversable":
, Data.Traversable.Traversable
-- **** @Bitraversable@
-- | Re-exported from "Data.Bitraversable":
, Data.Bitraversable.Bitraversable
-- **** @Monad@
-- | Re-exported from "Control.Monad":
, Control.Monad.Monad
Expand Down Expand Up @@ -287,17 +296,6 @@ module RIO.Prelude.Types
, Control.Monad.Primitive.PrimMonad (PrimState)
) where

import qualified Control.Monad.Primitive (PrimMonad(..))
import qualified Data.ByteString (ByteString)
import qualified Data.ByteString.Builder (Builder)
import qualified Data.Monoid (Monoid)
import qualified Data.Semigroup (Semigroup)
import qualified Data.String (IsString, String)
import qualified Data.Text (Text)
import qualified Data.Typeable
import qualified System.IO

import qualified Data.Vector.Unboxed (Unbox)
import qualified RIO.Prelude.Renames

import qualified Control.Applicative
Expand All @@ -308,9 +306,15 @@ import qualified Control.Exception.Base
import qualified Control.Monad
import qualified Control.Monad.Catch
import qualified Control.Monad.Fail
import qualified Control.Monad.Primitive (PrimMonad(..))
import qualified Control.Monad.Reader
import qualified Control.Monad.ST
import qualified Data.Bifoldable
import qualified Data.Bifunctor
import qualified Data.Bitraversable
import qualified Data.Bool
import qualified Data.ByteString (ByteString)
import qualified Data.ByteString.Builder (Builder)
import qualified Data.ByteString.Short
import qualified Data.Char
import qualified Data.Data
Expand All @@ -331,14 +335,20 @@ import qualified Data.List
import qualified Data.List.NonEmpty
import qualified Data.Map.Strict
import qualified Data.Maybe
import qualified Data.Monoid (Monoid)
import qualified Data.Ord
import qualified Data.Proxy
import qualified Data.Ratio
import qualified Data.Semigroup (Semigroup)
import qualified Data.Sequence
import qualified Data.Set
import qualified Data.String (IsString, String)
import qualified Data.Text (Text)
import qualified Data.Text.Encoding.Error
import qualified Data.Traversable
import qualified Data.Typeable
import qualified Data.Vector
import qualified Data.Vector.Unboxed (Unbox)
import qualified Data.Void
import qualified Data.Word
import qualified Foreign.Storable
Expand All @@ -347,8 +357,9 @@ import qualified GHC.Stack
import qualified Numeric.Natural
import qualified Prelude
import qualified System.Exit
import qualified System.IO
import qualified Text.Read
import qualified Text.Show

-- Bring instances for some of the unliftio types in scope, so they can be documented here.
import UnliftIO ()
import UnliftIO ()

0 comments on commit 6f91a61

Please sign in to comment.