HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleproduct-profunctors-0.11.1.1Haskell2010

Data.Profunctor.Product.Examples

  • 5 types
  • 5 values
newtypenewtype Replicator r (f :: Type -> Type) a b
#

Constructors

Instances5Profunctor, ProductProfunctor, Default, Functor, Applicative
valuereplicateT :: Default (Replicator r f) b b => r -> f b
#

A higher-order generalisation of replicate. For example

foo :: IO (String, String, String)
foo = replicateT getLine
> foo
Hello
world
!
("Hello","world","!")
newtypenewtype Take a z b
#

Constructors

Instances5Profunctor, ProductProfunctor, Default, Functor, Applicative
  • Profunctor (Take a)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • ProductProfunctor (Take a)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • Default (Take a) z aDefined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • Functor (Take a z)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • Applicative (Take a z)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
valuetakeT :: Default (Take a) b b => [a] -> Maybe b
#

A type safe generalisation of take. For example

> let count = [1..] :: [Int]
> takeT count :: Maybe (Int, Int)
Just (1,2)
> takeT count
    :: Maybe (Int, Int, (Int, (Int, Int), Int, Int),
              Const Int Bool, Identity (Int, Int), Tagged String Int)
Just (1,2,(3,(4,5),6,7),Const 8,Identity (9,10),Tagged 11)
newtypenewtype Traverse (f :: Type -> Type) a b
#

Constructors

Instances5Profunctor, ProductProfunctor, Default, Functor, Applicative
valuesequenceT :: Default (Sequence f) a b => a -> f b
#

A higher-order generalisation of sequenceA. For example

> sequenceT (print 3110, putStrLn World) :: IO ((), ())
3110
World
((),())
newtypenewtype Zipper a b
#

Constructors

Instances5Profunctor, ProductProfunctor, Default, Functor, Applicative
  • Profunctor ZipperDefined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • ProductProfunctor ZipperDefined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • a ~ b => Default Zipper [a] bDefined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • Functor (Zipper a)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples
  • Applicative (Zipper a)Defined in product-profunctors-0.11.1.1 · Data.Profunctor.Product.Examples