Search results
sequence :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)
sequence1 :: forall t b f. Traversable1 t => Apply f => t (f b) -> f (t b)
sequence1Default :: forall t a m. Traversable1 t => Apply m => t (m a) -> m (t a)
A default implementation of sequence1 using traverse1.
sequenceDefault :: forall t a m. Traversable t => Applicative m => t (m a) -> m (t a)
A default implementation of sequence using traverse.
distribute :: forall f a g. Distributive f => Functor g => g (f a) -> f (g a)
distributeDefault :: forall a f g. Distributive f => Functor g => g (f a) -> f (g a)
A default implementation of distribute, based on collect.
parSequence :: forall a t m f. Parallel f m => Applicative f => Traversable t => t (m a) -> m (t a)
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.
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]
oneOf :: forall f g a. Foldable f => Plus g => f (g a) -> g a
Combines a collection of elements using the Alt operation.
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.
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.
unwrapCofree :: forall f w a. ComonadCofree f w => w a -> f (w a)
wrapFree :: forall f m a. MonadFree f m => f (m a) -> m a
choice :: forall a g f. Foldable f => Alt g => Plus g => f (g a) -> g a
oneOf :: forall a m f. Foldable f => Alternative m => f (m a) -> m a
sumV :: forall f g a. Foldable f => Additive g => Semiring a => f (g a) -> g a
Sum a collection of vectors
restoreM :: forall base m stM a. MonadBaseControl base m stM => base (stM a) -> m a
join :: forall a m. Bind m => m (m a) -> m a
Collapse two applications of a monadic type constructor into one.
duplicate :: forall a w. Extend w => w a -> w (w a)
Duplicate a comonadic context.
duplicate is dual to Control.Bind.join.
keepLatest :: forall event a. IsEvent event => event (event a) -> event a
keepLatest :: forall event a. IsEvent event => event (event a) -> event a
join :: forall v m c. HasBind c m => HasIdentity c => ObjectOf c (m v) => m (m v) -> m v
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]
split :: forall f a. Applicative f => f a -> f (f a)
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
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.
fork :: forall f m a. MonadFork f m => m a -> m (f a)
suspend :: forall f m a. MonadFork f m => m a -> m (f a)
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
toBase :: forall b m a. MonadUnlift b m => m a -> m (b a)
Run the given action inside the base monad b.
lift :: forall a g f. Applicative f => Applicative g => a -> f (g a)
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.
inj :: forall f g a. Inject f g => f a -> g a
join :: forall f m a. MonadFork f m => f a -> m a
liftBase :: forall b m a. MonadBase b m => b a -> m a
length :: forall sproxy proxy a b. Length a b => sproxy a -> proxy b
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)
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
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
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!"
proof :: forall a b p. TypeEquals a b => p a -> p b
coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
uninterruptible :: forall e f m a. MonadBracket e f m => m a -> m a
cleared :: forall f a b. Filterable f => f a -> f b
Filter out all values.
spyM :: forall m a. Warn (Text "Debug function usage") => Monad m => m a -> m a
folded :: forall event a. IsEvent event => Monoid a => event a -> event a
Combine subsequent events using a Monoid.
folded :: forall a event. IsEvent event => Monoid a => event a -> event a
Combine subsequent events using a Monoid.
init :: forall xs ys lproxy. Init xs ys => lproxy xs -> lproxy ys
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.
restoreAfter :: forall m a. MonadCanvasAction m => m a -> m a
Runs save, then the provided action, then restore
allOffM :: forall m t. Bind m => MonadEffect m => EventTargetOp t => m t -> m t
Removes all event handler functions from an event target. The target is returned.
changeM :: forall m t. Bind m => EventTargetOp t => MonadEffect m => m t -> m t
Triggers the change event handlers tied to the event target. The target is returned.
collapseM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
concealM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
detachM :: forall c m. MonadEffect m => NodeOp c => m c -> m c
Detatches a node from its parent node and returns the detached node. Descendant nodes and event listeners are not affected. The detatched node is returned.
disableM :: forall m el. HTMLAbleOp el => MonadEffect m => m el -> m el
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.
emptyM :: forall m p. MonadEffect m => NodeOp p => m p -> m p
Calls remove on the all of the node's children. The emptied node is
returned.
enableM :: forall m el. HTMLAbleOp el => MonadEffect m => m el -> m el
forever :: forall b a m. Monad m => m a -> m b
hideM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
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.
lookAhead :: forall m a. LookAheadParsing m => m a -> m a
negated :: forall f a. Functor f => Ring a => f a -> f a
Negate a vector
negated (V2 1.0 (-2.0)) = V2 (-1.0) 2.0
once :: forall a m. MonadLogic m => m a -> m a
removeM :: forall c m. MonadEffect m => NodeOp c => m c -> m c
Calls detach on the node and its descendants, and in addition removes all
event listeners from the detached node and descendants. The event listners
are removed provided that they were added using Web.Event.Class.EventTargetOp.on or
derivation thereof such as Web.Event.Class.EventTargetOp.change or
Web.Event.Class.EventTargetOp.ready. The removed node is returned.
revealM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
showM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
try :: forall m a. Parsing m => m a -> m a
valM :: forall m el v. MonadEffect m => HTMLValueContainerOp el v => m el -> m v
pure :: forall f a. Applicative f => a -> f a
extract :: forall w a. Comonad w => w a -> a
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.
fold :: forall f m. Foldable f => Monoid m => f m -> m
Fold a data structure, accumulating values in some Monoid.
fold1 :: forall t m. Foldable1 t => Semigroup m => t m -> m
Fold a data structure, accumulating values in some Semigroup.
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.
maximum :: forall f a. Ord a => Foldable1 f => f a -> a
minimum :: forall f a. Ord a => Foldable1 f => f a -> a
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.
product :: forall a f. Foldable f => Semiring a => f a -> a
Find the product of the numeric values in a data structure.
sum :: forall a f. Foldable f => Semiring a => f a -> a
Find the sum of the numeric values in a data structure.
singleton :: forall f a. Unfoldable1 f => a -> f a
Contain a single value. For example:
singleton "foo" == (NEL.singleton "foo" :: NEL.NonEmptyList String)
downFrom :: forall a u. Enum a => Unfoldable u => a -> u a
Produces all predecessors of an Enum value, excluding the start value.
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.
upFrom :: forall a u. Enum a => Unfoldable u => a -> u a
Produces all successors of an Enum value, excluding the start value.
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.
ask :: forall e w a. ComonadAsk e w => w a -> e
pos :: forall s w a. ComonadStore s w => w a -> s
throwError :: forall e m a. MonadThrow e m => e -> m a
aread :: forall s r m. Refer s r => MonadEffect m => r -> m s
fread :: forall m r s. MonadEffect m => Refer s r => r -> m s
getSingleton :: forall f a. SingletonFunctor f => f a -> a
colambek :: forall t f. Recursive t f => Corecursive t f => f t -> t
embed :: forall t f. Corecursive t f => f t -> t
lambek :: forall t f. Recursive t f => Corecursive t f => t -> f t
project :: forall t f. Recursive t f => t -> f t
sequenceProduct :: forall specI specO f. SequenceProduct specI specO f => specI -> f specO
pure :: forall v f c. HasPure c f => ObjectOf c v => v -> f v
bottom1_ :: forall f a. Bottom1_ f => a -> f a