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
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
optional :: forall f a. Alt f => Applicative f => f a -> f (Maybe a)

One or none.

optional empty = pure Nothing

The behaviour of optional (pure x) depends on whether the Alt instance satisfy the left catch law (pure a <|> b = pure a).

Either e does:

optional (Right x) = Right (Just x)

But Array does not:

optional [x] = [Just x, Nothing]
P purescript-maybe M Data.Maybe
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
genMaybe :: forall m a. MonadGen m => m a -> m (Maybe a)

Creates a generator that outputs Maybe values, choosing a value from another generator for the inner value. The generator has a 75% chance of returning a Just over a Nothing.

P purescript-gen M Control.Monad.Gen.Common
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
wrapFree :: forall f m a. MonadFree f m => f (m a) -> m a
P purescript-free M Control.Monad.Free.Class
keepLatest :: forall event a. IsEvent event => event (event a) -> event a
P purescript-hyrule M FRP.Event.Class
optional :: forall f a. Alt f => Applicative f => f a -> f (Maybe a)
P purescript-optparse M Options.Applicative.Types
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
choice :: forall a g f. Foldable f => Alt g => Plus g => f (g a) -> g a
P purescript-simple-parser M Text.Parsing.Simple
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
oneOf :: forall a m f. Foldable f => Alternative m => f (m a) -> m a
P purescript-parsers M Text.Parsing.Combinators
optionMaybe :: forall a m. Alternative m => m a -> m (Maybe a)
P purescript-parsers M Text.Parsing.Combinators
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
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
restoreM :: forall base m stM a. MonadBaseControl base m stM => base (stM a) -> m a
P purescript-monad-control M Control.Monad.Trans.Control
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
fromMaybe :: forall f a. Unfoldable f => Maybe a -> f a

Convert a Maybe to any Unfoldable, such as lists or arrays.

fromMaybe (Nothing :: Maybe Int) == []
fromMaybe (Just 1) == [1]
P purescript-unfoldable M Data.Unfoldable
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
unwrapCofree :: forall f w a. ComonadCofree f w => w a -> f (w a)
P purescript-free M Control.Comonad.Cofree.Class
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
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
split :: forall f a. Applicative f => f a -> f (f a)
P purescript-merge M Data.Merge
pure :: forall f a. Applicative f => a -> f a
P purescript-prelude M Control.Applicative
fromJust :: forall a. Partial => Maybe a -> a

A partial function that extracts the value from the Just data constructor. Passing Nothing to fromJust will throw an error at runtime.

P purescript-maybe M Data.Maybe
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
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
proof :: forall a b p. TypeEquals a b => p a -> p b
P purescript-type-equality M Type.Equality
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
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
coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
P purescript-contravariant M Data.Functor.Contravariant
throwError :: forall e m a. MonadThrow e m => e -> m a
P purescript-transformers M Control.Monad.Error.Class
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
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
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
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
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
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
sequenceProduct :: forall specI specO f. SequenceProduct specI specO f => specI -> f specO
P purescript-classless M Classless
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
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
P purescript-typelevel-lists M Type.Data.List
pure :: forall v f c. HasPure c f => ObjectOf c v => v -> f v
P purescript-subcategory M Control.Subcategory.Functor.HasPure
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
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
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
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
dsingleton :: forall cnt a. Diff cnt => a -> cnt a
P purescript-difference-containers M Containers.Difference
forever :: forall b a m. Monad m => m a -> m b
P purescript-game M Game.Util
fromJust :: forall a. Maybe a -> a
P purescript-cypress M Cypress.Actions
fromJust' :: forall a. Maybe a -> a

The partial and unsafe version of fromJust.

P purescript-sudoku M Sudoku.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
mockFun :: forall params fun verifyParams m. MockBuilder params fun verifyParams => MonadEffect m => params -> m fun
P purescript-pmock M Test.PMock
once :: forall a m. MonadLogic m => m a -> m a
P purescript-logic M Control.Monad.Logic.Class
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
repeat :: forall a u. Unfoldable1 u => a -> u a

Create an infinite Unfoldable1 by repeating a single element.

P purescript-trivial-unfold M Data.Unfoldable1.Trivial1
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
splice :: forall f t. Corecursive t (SqlF f) => Maybe t -> t
P purescript-sql-squared M SqlSquared.Constructors
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
toDefault :: forall a. Default a => Maybe a -> a

Turns Nothing into a “default” (zero) value.

The Protobuf spec requires that a no presence field set to its “default” (zero) value must not be serialized to the wire.

When receiving messages we can use this function to interpret a missing no presence field as a “default” value.

P purescript-protobuf M Protobuf.Internal.Common
try :: forall m a. Parsing m => m a -> m a
P purescript-parsers M Text.Parsing.Classes
unfold :: forall f a s. Convert s (Statements a) => Unfoldable1 f => s -> f a
P purescript-qualified-do M QualifiedDo.Unfoldable
unsafeMaybeToNullableAttr :: forall a. Maybe a -> a

WARNING: This is for JS interop -- don't use this to unwrap Maybes!

Unsafely nulls out a value so the resulting html attributes are less noisy Ex: R.input { type: unsafeMaybeToNullableAttr Nothing } avoids rendering the type attribute while still validating the type of the Maybe's content matches the type of the DOM field. It's only slightly safer than using unsafeCreateDOMComponent to avoid DOM type checking entirely.

P purescript-lumi-components M Lumi.Components
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