Search results

sequence :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)
P purescript-foldable-traversable M Data.Traversable
sequence1 :: forall t b f. Traversable1 t => Apply f => t (f b) -> f (t b)
P purescript-foldable-traversable M Data.Semigroup.Traversable
sequence1Default :: forall t a m. Traversable1 t => Apply m => t (m a) -> m (t a)

A default implementation of sequence1 using traverse1.

P purescript-foldable-traversable M Data.Semigroup.Traversable
sequenceDefault :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)

A default implementation of sequence using traverse.

P purescript-foldable-traversable M Data.Traversable
distribute :: forall f a g. Distributive f => Functor g => g (f a) -> f (g a)
P purescript-distributive M Data.Distributive
distributeDefault :: forall a f g. Distributive f => Functor g => g (f a) -> f (g a)

A default implementation of distribute, based on collect.

P purescript-distributive M Data.Distributive
parSequence :: forall a t m f. Parallel f m => Applicative f => Traversable t => t (m a) -> m (t a)
P purescript-parallel M Control.Parallel
sequence :: forall m p q a. Dissect p q => MonadRec m => p (m a) -> m (p a)

A tail-recursive sequence operation, implemented in terms of Dissect.

P purescript-dissect M Dissect.Class
sequence :: forall c b a. HasApply b => HasMap b => HasTraverse a => HasPure b => a (b c) -> b (a c)

Sequences actions and collects the results.

sequence [Just 1, Just 2] -- Just [1, 2]
P purescript-neon M Neon.Helper
oneOf :: forall f g a. Foldable f => Plus g => f (g a) -> g a

Combines a collection of elements using the Alt operation.

P purescript-foldable-traversable M Data.Foldable
oneOf :: forall m f a. MonadGen m => Foldable1 f => f (m a) -> m a

Creates a generator that outputs a value chosen from a selection of existing generators with uniform probability.

P purescript-gen M Control.Monad.Gen
parOneOf :: forall a t m f. Parallel f m => Alternative f => Foldable t => Functor t => t (m a) -> m a

Race a collection in parallel.

P purescript-parallel M Control.Parallel
unwrapCofree :: forall f w a. ComonadCofree f w => w a -> f (w a)
P purescript-free M Control.Comonad.Cofree.Class
wrapFree :: forall f m a. MonadFree f m => f (m a) -> m a
P purescript-free M Control.Monad.Free.Class
choice :: forall a g f. Foldable f => Alt g => Plus g => f (g a) -> g a
P purescript-simple-parser M Text.Parsing.Simple
oneOf :: forall a m f. Foldable f => Alternative m => f (m a) -> m a
P purescript-parsers M Text.Parsing.Combinators
restoreM :: forall base m stM a. MonadBaseControl base m stM => base (stM a) -> m a
P purescript-monad-control M Control.Monad.Trans.Control
join :: forall a m. Bind m => m (m a) -> m a

Collapse two applications of a monadic type constructor into one.

P purescript-prelude M Control.Bind
duplicate :: forall a w. Extend w => w a -> w (w a)

Duplicate a comonadic context.

duplicate is dual to Control.Bind.join.

P purescript-control M Control.Extend
keepLatest :: forall event a. IsEvent event => event (event a) -> event a
P purescript-hyrule M FRP.Event.Class
keepLatest :: forall event a. IsEvent event => event (event a) -> event a
P purescript-event M FRP.Event.Class
join :: forall v m c. HasBind c m => HasIdentity c => ObjectOf c (m v) => m (m v) -> m v
P purescript-subcategory M Control.Subcategory.Functor.HasBind
flatten :: forall b a. HasChain a => a (a b) -> a b

Removes a level of nesting from a container.

flatten [[1, 2], [3, 4]] -- [1, 2, 3, 4]
P purescript-neon M Neon.Helper
split :: forall f a. Applicative f => f a -> f (f a)
P purescript-merge M Data.Merge
warbler :: forall m a. Bind m => m (m a) -> m a

W combinator - warbler - omega

MM

Λ a b . (a → a → b) → a → b

λ f x . f x x

P purescript-birds M Aviary.Birds
unfoldable :: forall m f a. MonadRec m => MonadGen m => Unfoldable f => m a -> m (f a)

Creates a generator that produces unfoldable structures based on an existing generator for the elements.

The size of the unfoldable will be determined by the current size state for the generator. To generate an unfoldable structure of a particular size, use the resize function from the MonadGen class first.

P purescript-gen M Control.Monad.Gen
fork :: forall f m a. MonadFork f m => m a -> m (f a)
P purescript-fork M Control.Monad.Fork.Class
suspend :: forall f m a. MonadFork f m => m a -> m (f a)
P purescript-fork M Control.Monad.Fork.Class
integrateM :: forall a stM m base. Applicative base => MonadBaseControl base m stM => m (stM a) -> m a

Pack a state belonging to m back into it, instead of throwing it away

P purescript-monad-control M Control.Monad.Trans.Control
toBase :: forall b m a. MonadUnlift b m => m a -> m (b a)

Run the given action inside the base monad b.

P purescript-unlift M Control.Monad.Unlift
lift :: forall a g f. Applicative f => Applicative g => a -> f (g a)
P purescript-simple-parser M Text.Parsing.Util
elements :: forall m f a. MonadGen m => Foldable1 f => f a -> m a

Creates a generator that outputs a value chosen from a selection with uniform probability.

P purescript-gen M Control.Monad.Gen
inj :: forall f g a. Inject f g => f a -> g a
P purescript-functors M Data.Functor.Coproduct.Inject
join :: forall f m a. MonadFork f m => f a -> m a
P purescript-fork M Control.Monad.Fork.Class
liftBase :: forall b m a. MonadBase b m => b a -> m a
P purescript-monad-control M Control.Monad.Base
length :: forall sproxy proxy a b. Length a b => sproxy a -> proxy b
P purescript-typelevel-peano M Type.Data.Peano.Nat.Parse
parseInt :: forall sproxy proxy sym a. ParseInt sym a => sproxy sym -> proxy a

parse Int a Value-Level

parseInt (Proxy  :: _ "-1337") ~> N1337
parseInt (SProxy :: _ "-1337") ~> N1337
    -- N1137 would be type alias for Neg (Succ^1337 Z)
P purescript-typelevel-peano M Type.Data.Peano.Int.Parse
parseNat :: forall sproxy proxy sym a. ParseNat sym a => sproxy sym -> proxy a

value-level parse of number

parseNat (Proxy  "10") ~> D10
parseNat (SProxy "10") ~> D10
P purescript-typelevel-peano M Type.Data.Peano.Nat.Parse
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
P purescript-typelevel-lists M Type.Data.List
forever :: forall m a b. MonadRec m => m a -> m b

forever runs an action indefinitely, using the MonadRec instance to ensure constant stack usage.

For example:

main = forever $ trace "Hello, World!"
P purescript-tailrec M Control.Monad.Rec.Class
proof :: forall a b p. TypeEquals a b => p a -> p b
P purescript-type-equality M Type.Equality
coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
uninterruptible :: forall e f m a. MonadBracket e f m => m a -> m a
P purescript-fork M Control.Monad.Fork.Class
cleared :: forall f a b. Filterable f => f a -> f b

Filter out all values.

P purescript-filterable M Data.Filterable
folded :: forall event a. IsEvent event => Monoid a => event a -> event a

Combine subsequent events using a Monoid.

P purescript-hyrule M FRP.Event.Class
folded :: forall a event. IsEvent event => Monoid a => event a -> event a

Combine subsequent events using a Monoid.

P purescript-event M FRP.Event.Class
sort :: forall f a. Functor f => Foldable f => Unfoldable f => Ord a => f a -> f a

Sort any structure (which has Foldable, Unfoldable, and Functor instances) by converting to an OrdSeq and back again. I am fairly sure this is usually O(n*log(n)), although of course this depends on the Unfoldable and Foldable instances.

P purescript-sequences M Data.Sequence.Ordered
init :: forall xs ys lproxy. Init xs ys => lproxy xs -> lproxy ys
P purescript-typelevel-lists M Type.Data.List
restoreAfter :: forall m a. MonadCanvasAction m => m a -> m a

Runs save, then the provided action, then restore

P purescript-canvas-action M Graphics.CanvasAction
drain :: forall a s n n1. ToString n1 s => IsSymbol s => Analytic (a n) => Analytic (a n1) => Add n1 1 n => a n -> a n1

Decrement the dimension of a point/vector by removing its last coordinate.

P purescript-geometria M Data.Geometria.Types
forever :: forall b a m. Monad m => m a -> m b
P purescript-game M Game.Util
immerse :: forall a n n1. Analytic (a n) => Analytic (a n1) => Add n 1 n1 => a n -> a n1

Increments the dimension of a point/vector by adding a zero coordinate after the other coordinates.

P purescript-geometria M Data.Geometria.Types
lookAhead :: forall m a. LookAheadParsing m => m a -> m a
P purescript-parsers M Text.Parsing.Classes
once :: forall a m. MonadLogic m => m a -> m a
P purescript-logic M Control.Monad.Logic.Class
try :: forall m a. Parsing m => m a -> m a
P purescript-parsers M Text.Parsing.Classes
pure :: forall f a. Applicative f => a -> f a
P purescript-prelude M Control.Applicative
extract :: forall w a. Comonad w => w a -> a
P purescript-control M Control.Comonad
and :: forall a f. Foldable f => HeytingAlgebra a => f a -> a

The conjunction of all the values in a data structure. When specialized to Boolean, this function will test whether all of the values in a data structure are true.

P purescript-foldable-traversable M Data.Foldable
fold :: forall f m. Foldable f => Monoid m => f m -> m

Fold a data structure, accumulating values in some Monoid.

P purescript-foldable-traversable M Data.Foldable
fold1 :: forall t m. Foldable1 t => Semigroup m => t m -> m

Fold a data structure, accumulating values in some Semigroup.

P purescript-foldable-traversable M Data.Semigroup.Foldable
length :: forall a b f. Foldable f => Semiring b => f a -> b

Returns the size/length of a finite structure. Optimized for structures that are similar to cons-lists, because there is no general way to do better.

P purescript-foldable-traversable M Data.Foldable
maximum :: forall f a. Ord a => Foldable1 f => f a -> a
P purescript-foldable-traversable M Data.Semigroup.Foldable
minimum :: forall f a. Ord a => Foldable1 f => f a -> a
P purescript-foldable-traversable M Data.Semigroup.Foldable
or :: forall a f. Foldable f => HeytingAlgebra a => f a -> a

The disjunction of all the values in a data structure. When specialized to Boolean, this function will test whether any of the values in a data structure is true.

P purescript-foldable-traversable M Data.Foldable
product :: forall a f. Foldable f => Semiring a => f a -> a

Find the product of the numeric values in a data structure.

P purescript-foldable-traversable M Data.Foldable
sum :: forall a f. Foldable f => Semiring a => f a -> a

Find the sum of the numeric values in a data structure.

P purescript-foldable-traversable M Data.Foldable
singleton :: forall f a. Unfoldable1 f => a -> f a

Contain a single value. For example:

singleton "foo" == (NEL.singleton "foo" :: NEL.NonEmptyList String)
P purescript-unfoldable M Data.Unfoldable1
downFrom :: forall a u. Enum a => Unfoldable u => a -> u a

Produces all predecessors of an Enum value, excluding the start value.

P purescript-enums M Data.Enum
downFromIncluding :: forall a u. Enum a => Unfoldable1 u => a -> u a

Produces all predecessors of an Enum value, including the start value.

downFromIncluding top will return all values in an Enum, in reverse order.

P purescript-enums M Data.Enum
upFrom :: forall a u. Enum a => Unfoldable u => a -> u a

Produces all successors of an Enum value, excluding the start value.

P purescript-enums M Data.Enum
upFromIncluding :: forall a u. Enum a => Unfoldable1 u => a -> u a

Produces all successors of an Enum value, including the start value.

upFromIncluding bottom will return all values in an Enum.

P purescript-enums M Data.Enum
ask :: forall e w a. ComonadAsk e w => w a -> e
P purescript-transformers M Control.Comonad.Env.Class
pos :: forall s w a. ComonadStore s w => w a -> s
P purescript-transformers M Control.Comonad.Store.Class
throwError :: forall e m a. MonadThrow e m => e -> m a
P purescript-transformers M Control.Monad.Error.Class
getSingleton :: forall f a. SingletonFunctor f => f a -> a
P purescript-monad-control M Data.Functor.Singleton
colambek :: forall t f. Recursive t f => Corecursive t f => f t -> t
P purescript-matryoshka M Matryoshka.Unfold
embed :: forall t f. Corecursive t f => f t -> t
P purescript-matryoshka M Matryoshka.Class.Corecursive
lambek :: forall t f. Recursive t f => Corecursive t f => t -> f t
P purescript-matryoshka M Matryoshka.Fold
project :: forall t f. Recursive t f => t -> f t
P purescript-matryoshka M Matryoshka.Class.Recursive
sequenceProduct :: forall specI specO f. SequenceProduct specI specO f => specI -> f specO
P purescript-classless M Classless
pure :: forall v f c. HasPure c f => ObjectOf c v => v -> f v
P purescript-subcategory M Control.Subcategory.Functor.HasPure
bottom1_ :: forall f a. Bottom1_ f => a -> f a
P purescript-higher-order M Data.Operator.Bottom
bottom2 :: forall f a b. Bottom2 f a => a -> f b
P purescript-higher-order M Data.Operator.Bottom
from1 :: forall f rep a. Generic1 f rep => f a -> rep
P purescript-higher-order M Data.Operator.Generic.Rep
top1_ :: forall f a. Top1_ f => a -> f a
P purescript-higher-order M Data.Operator.Top
act :: forall m b a. Mother m => a -> m b
P mother-monad M Control.Monad.Mother.Class
array :: forall f t. Corecursive t (SqlF EJsonF) => Foldable f => f t -> t
P purescript-sql-squared M SqlSquared.Constructors
askFor :: forall a p. Ask a => p a -> a

Equivalent to ask except for accepting a Proxy for specifying the exact requested type

P purescript-ask M Control.Ask
constructRecord :: forall ty fn proxy. ConstructRecord ty fn => proxy ty -> fn
P purescript-mochi M Mochi
dsingleton :: forall cnt a. Diff cnt => a -> cnt a
P purescript-difference-containers M Containers.Difference
maximum :: forall a f. Ord a => Foldable1 f => f a -> a
P purescript-value-of-information M Data.Semigroup.Foldable.Extras
minimum :: forall a f. Ord a => Foldable1 f => f a -> a
P purescript-value-of-information M Data.Semigroup.Foldable.Extras
mockFun :: forall params fun verifyParams m. MockBuilder params fun verifyParams => MonadEffect m => params -> m fun
P purescript-pmock M Test.PMock
product :: forall b a. HasMultiply b => HasOne b => HasReduce a => a b -> b

Multiplies all of the elements of a container together.

product [2, 3] -- 6
product [] -- 1
P purescript-neon M Neon.Helper
pure :: forall d a. Syntax d => Eq a => a -> d a
P purescript-invertible-syntax M Text.Syntax.Classes
pure :: forall f a. Unital Function Unit Unit f => Functor f => a -> f a
P purescript-monoidal M Data.Functor.ApplicativeDo
pure :: forall a b. HasPure a => b -> a b
P purescript-neon M Neon.Class.HasPure
pure :: forall f a. Applicative f => a -> f a
P purescript-qualified-do M QualifiedDo.ParApply
query :: forall m q r. MonadSession m => AsQuery q => FromRows r => q -> m r

Executes a query and unmarshals the result into r

P purescript-postgresql M Control.Monad.Postgres.Session
read :: forall box val m. Read box val => MonadDelay m => box -> m val

Read the current value. Will never cause a refresh.

P purescript-toestand M Toestand.Classes
set :: forall g f t. Corecursive t (SqlF g) => Foldable f => f t -> t
P purescript-sql-squared M SqlSquared.Constructors
siteClock :: forall s m i c. Site s m i c => s -> m c
P purescript-logoot-core M Logoot.Types.Class.Site
siteId :: forall s m i c. Site s m i c => s -> m i
P purescript-logoot-core M Logoot.Types.Class.Site
sum :: forall b a. HasAdd b => HasReduce a => HasZero b => a b -> b

Adds all the elements of a container together. If the container is empty, returns zero.

[1, 2, 3] :sum -- 6
([] :: Array Int) :sum -- 0
["ab", "cd", "ef"] :sum -- "abcdef"
([] :: Array String) :sum -- ""
P purescript-neon M Neon.Helper
throw :: forall (t10 :: Type -> Type) (t11 :: Type) (a12 :: Type). MonadThrow Error t10 => Show a12 => a12 -> t10 t11
P purescript-droplet M Droplet.Driver.Internal.Migration
unconsableLength :: forall num a t. Unconsable t => Semiring num => t a -> num

Equivalent to length, maybe except of stack safety.

You may want to use this function instead of length if foldr for the particular data type you are using is not stack-safe.

P purescript-unconsable M Data.Unconsable
unfold :: forall f a s. Convert s (Statements a) => Unfoldable1 f => s -> f a
P purescript-qualified-do M QualifiedDo.Unfoldable
abs :: forall a. Ord a => Ring a => a -> a

The absolute value function. abs x is defined as if x >= zero then x else negate x.

P purescript-prelude M Data.Ord
from :: forall a rep. Generic a rep => a -> rep
P purescript-prelude M Data.Generic.Rep
genericNot :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a -> a

A Generic implementation of the not member from the HeytingAlgebra type class.

P purescript-prelude M Data.HeytingAlgebra.Generic
genericNot' :: forall a. GenericHeytingAlgebra a => a -> a
P purescript-prelude M Data.HeytingAlgebra.Generic
negate :: forall a. Ring a => a -> a

negate x can be used as a shorthand for zero - x.

P purescript-prelude M Data.Ring
not :: forall a. HeytingAlgebra a => a -> a
P purescript-prelude M Data.HeytingAlgebra
recip :: forall a. DivisionRing a => a -> a
P purescript-prelude M Data.DivisionRing
signum :: forall a. Ord a => Ring a => a -> a

The sign function; returns one if the argument is positive, negate one if the argument is negative, or zero if the argument is zero. For floating point numbers with signed zeroes, when called with a zero, this function returns the argument in order to preserve the sign. For any x, we should have signum x * abs x == x.

P purescript-prelude M Data.Ord
to :: forall a rep. Generic a rep => rep -> a
P purescript-prelude M Data.Generic.Rep
unwrap :: forall t a. Newtype t a => t -> a
P purescript-newtype M Data.Newtype
wrap :: forall t a. Newtype t a => a -> t
P purescript-newtype M Data.Newtype
unsafeCoerce :: forall a b. a -> b

A highly unsafe function, which can be used to persuade the type system that any type is the same as any other type. When using this function, it is your (that is, the caller's) responsibility to ensure that the underlying representation for both types is the same.

Because this function is extraordinarily flexible, type inference can greatly suffer. It is highly recommended to define specializations of this function rather than using it as-is. For example:

fromBoolean :: Boolean -> Json
fromBoolean = unsafeCoerce

This way, you won't have any nasty surprises due to the inferred type being different to what you expected.

After the v0.14.0 PureScript release, some of what was accomplished via unsafeCoerce can now be accomplished via coerce from purescript-safe-coerce. See that library's documentation for more context.

P purescript-unsafe-coerce M Unsafe.Coerce
inj :: forall a b. Inject a b => a -> b
P purescript-either M Data.Either.Inject
unsafePartial :: forall a. (Partial => a) -> a

Discharge a partiality constraint, unsafely.

P purescript-partial M Partial.Unsafe
from :: forall a b. TypeEquals a b => b -> a
P purescript-type-equality M Type.Equality
to :: forall a b. TypeEquals a b => a -> b
P purescript-type-equality M Type.Equality
convertDuration :: forall a b. Duration a => Duration b => a -> b

Converts directly between durations of differing types.

P purescript-datetime M Data.Time.Duration
negateDuration :: forall a. Duration a => a -> a

Negates a duration, turning a positive duration negative or a negative duration positive.

P purescript-datetime M Data.Time.Duration
coerce :: forall a b. Coercible a b => a -> b

Coerce a value of one type to a value of some other type, without changing its runtime representation. This function behaves identically to unsafeCoerce at runtime. Unlike unsafeCoerce, it is safe, because the Coercible constraint prevents any use of this function from compiling unless the compiler can prove that the two types have the same runtime representation.

One application for this function is to avoid doing work that you know is a no-op because of newtypes. For example, if you have an Array (Conj a) and you want an Array (Disj a), you could do Data.Array.map (un Conj >>> Disj), but this performs an unnecessary traversal of the array, with O(n) cost. coerce accomplishes the same with only O(1) cost:

mapConjToDisj :: forall a. Array (Conj a) -> Array (Disj a)
mapConjToDisj = coerce
P purescript-safe-coerce M Safe.Coerce
div10 :: forall x q. Div10 x q => x -> q
P purescript-typelevel M Data.Typelevel.Num.Ops
isDivBy :: forall d x. IsDivBy d x => d -> x
P purescript-typelevel M Data.Typelevel.Num.Ops
mul10 :: forall x q. Mul10 x q => x -> q
P purescript-typelevel M Data.Typelevel.Num.Ops
not :: forall b1 b2. Not b1 b2 => b1 -> b2
P purescript-typelevel M Data.Typelevel.Bool
pred :: forall x y. Pred x y => x -> y
P purescript-typelevel M Data.Typelevel.Num.Ops
succ :: forall x y. Succ x y => x -> y
P purescript-typelevel M Data.Typelevel.Num.Ops
cast :: forall a b. Castable a b => a -> b
P purescript-untagged-union M Untagged.Castable
ginverse :: forall g. Group g => g -> g
P purescript-group M Data.Group
coerce :: forall expected given. Coerce given expected => given -> expected
P purescript-undefined-is-not-a-problem M Data.Undefined.NoProblem.Closed
coerce :: forall expected given. Coerce given expected => given -> expected
P purescript-undefined-is-not-a-problem M Data.Undefined.NoProblem.Open
convertTo :: forall t f r. Recursive t f => Corecursive r f => t -> r
P purescript-matryoshka M Matryoshka.Refold
fill :: forall partial complete. Fillable partial complete => partial -> complete
P purescript-justifill M Justifill.Fillable
justify :: forall unjust just. Justifiable unjust just => unjust -> just
P purescript-justifill M Justifill.Justifiable
mnegateL :: forall r x. LeftModule x r => x -> x
P purescript-modules M Data.Ring.Module
mnegateR :: forall r x. RightModule x r => x -> x
P purescript-modules M Data.Ring.Module
nextPrime :: forall a. Ord a => Semiring a => EuclideanRing a => a -> a

Ad infinitum

P purescript-sparse-polynomials M Data.Sparse.Polynomial
pad :: forall @n a b. Pad n a b => a -> b
P purescript-sparse-polynomials M Data.Sparse.Polynomial
unpad :: forall @n a b. Unpad n a b => b -> a
P purescript-sparse-polynomials M Data.Sparse.Polynomial
area :: forall s n. ToSize n s => Semiring n => s -> n

Get the area of a size

P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertPos :: forall p1 p2 n. ToPos n p1 => FromPos n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertRegion :: forall p1 p2 n. ToRegion n p1 => FromRegion n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
convertSize :: forall p1 p2 n. ToSize n p1 => FromSize n p2 => p1 -> p2
P purescript-polymorphic-vectors M Data.Vector.Polymorphic
init :: forall fn a. Init fn a => fn -> a
P purescript-classless M Classless
initProduct :: forall f a. InitProduct f a => f -> a
P purescript-classless M Classless