Search results
assure :: forall a e g f. ErrorControl f g e => Monad f => g a -> (a -> Maybe e) -> f a
bind :: forall m a b. Bind m => m a -> (a -> m b) -> m b
discard :: forall a f b. Discard a => Bind f => f a -> (a -> f b) -> f b
bind' :: forall v1 v0 m c. HasBind c m => ObjectOf c v0 => ObjectOf c (m v1) => Restrictable Function c => m v0 -> (v0 -> (m v1)) -> m v1
bind :: forall c b a. HasChain a => a b -> (b -> a c) -> a c
A version of chain
with the arguments flipped. This is provided only to
support desugaring do
notation. It is not recommended to use explicitly.
fairConjunction :: forall b a m. MonadLogic m => m a -> (a -> m b) -> m b
hummingbird :: forall m b a. Bind m => m a -> (a -> m b) -> m b
H combinator - hummingbird
BW(BC)
Λ a b c (a → b → a → c) → a → b → c
λ f x y . f x y x
when :: forall b a m. MonadLogic m => m a -> (a -> m b) -> m b
catchError :: forall e m a. MonadError e m => m a -> (e -> m a) -> m a
controlError :: forall f g e a. ErrorControl f g e => f a -> (e -> g a) -> g a
mapFlipped :: forall f a b. Functor f => f a -> (a -> b) -> f b
mapFlipped
is map
with its arguments reversed. For example:
[1, 2, 3] <#> \n -> n * n
flippedMap :: forall f a b. Functor f => f a -> (a -> b) -> f b
delay :: forall m a b. Delay m => a -> (a -> m b) -> m b
fromMaybeS :: forall a f. Selective f => f a -> f (Maybe a) -> f a
fromMaybeS :: forall @f @a. Select f => f a -> f (Maybe a) -> f a
If the second action is Nothing
, run and return the first
cmapFlipped :: forall a b f. Contravariant f => f a -> (b -> a) -> f b
cmapFlipped
is cmap
with its arguments reversed.
intercept :: forall a e g f. ErrorControl f g e => f a -> (e -> a) -> g a
applyFlipped :: forall a b. a -> (a -> b) -> b
Applies an argument to a function. This is primarily used as the (#)
operator, which allows parentheses to be omitted in some cases, or as a
natural way to apply a value to a chain of composed functions.
applySecond :: forall a b f. Apply f => f a -> f b -> f b
Combine two effectful actions, keeping only the result of the second.
voidLeft :: forall f a b. Functor f => f a -> b -> f b
A version of voidRight
with its arguments flipped.
fromMaybe' :: forall a. Maybe a -> a -> a
An infix form of fromMaybe
with arguments flipped.
mulNat :: forall proxy a b c. ProductNat a b c => proxy a -> proxy b -> proxy c
plus :: forall proxy a b c. SumInt a b c => proxy a -> proxy b -> proxy c
plusNat :: forall proxy a b c. SumNat a b c => proxy a -> proxy b -> proxy c
powNat :: forall proxy a b c. ExponentiationNat a b c => proxy a -> proxy b -> proxy c
> powNat d2 d3
8 -- : NProxy D8
a raised to the power of b a^b = c
prod :: forall proxy a b c. ProductInt a b c => proxy a -> proxy b -> proxy c
sampleOnLeft_ :: forall event a b. IsEvent event => event a -> event b -> event b
divides :: forall a. Divisible a => a -> a -> Maybe a
downcast :: forall ctor from to. ctor -> from -> Maybe to
Attempt to cast to a type given a constructor for it
applySecond :: forall v1 v0 f c. HasApply c f => HasConst c => HasIdentity c => HasMap c f => ObjectOf c v0 => ObjectOf c v1 => ObjectOf c (c v1 v1) => ObjectOf c (c v0 (c v1 v1)) => ObjectOf c (c (c v1 v1) (c v0 (c v1 v1))) => f v0 -> f v1 -> f v1
concat :: forall xs ys zs lproxy. Concat xs ys zs => lproxy xs -> lproxy ys -> lproxy zs
downcast :: forall ctor from to. ctor -> from -> Maybe to
Attempt to cast to a type given a constructor for it
drop :: forall n xs ys lproxy iproxy. Drop n xs ys => iproxy n -> lproxy xs -> lproxy ys
lookup :: forall c k r. Lookup c k r => c -> k -> Maybe r
Given some type and a key on that type, extract some value that corresponds to that key.
lookup :: forall c k r. Lookup c k r => c -> k -> Maybe r
Given some type and a key on that type, extract some value that corresponds to that key.
map :: forall f xs ys fproxy kproxy lproxy. Map f xs ys => fproxy f -> kproxy xs -> lproxy ys
take :: forall n xs ys lproxy iproxy. Take n xs ys => iproxy n -> lproxy xs -> lproxy ys
zip :: forall x y z lproxy. Zip x y z => lproxy x -> lproxy y -> lproxy z
getOrAlt :: forall v s r' r l h g f. Alternative h => Cons s v r' r => RowToList r l => RGetOrAlt f g s l r => g s -> f r -> h v
max :: forall a. PartialOrd a => a -> a -> Maybe a
min :: forall a. PartialOrd a => a -> a -> Maybe a
pMax :: forall a. PartialOrd a => a -> a -> Maybe a
pMin :: forall a. PartialOrd a => a -> a -> Maybe a
rsingleton :: forall f g s v r. RSingleton f g s => Cons s v () r => Lacks s () => g s -> v -> f r
singleton :: forall v s r g f. Cons s v () r => Lacks s () => RSingleton f g s => g s -> v -> f r
_call :: forall b a. a -> (a -> b) -> b
after :: forall k f. Eq k => Foldable f => k -> f k -> Maybe k
always_ :: forall a i. i -> a -> Maybe i
before :: forall k f. Eq k => Foldable f => k -> f k -> Maybe k
bind :: forall a. Semigroup a => a -> (a -> a) -> a
extract :: forall r x a. TypeEquals r x => r -> (x -> a) -> a
functorDecorateFlipped :: forall b a f. Functor f => Decorate b a => f a -> b -> f b
nmapFlipped :: forall b a fb fa. NestedFunctor fa fb a b => fa -> (a -> b) -> fb
t :: forall b a. a -> (a -> b) -> b
Reverse application which is
probably exist inside Lens
module
t :: forall b a. a -> (a -> b) -> b
thrush :: forall b a. a -> (a -> b) -> b
T combinator - thrush
CI
Λ a b . a → (a → b) → b
λ x f . f x
applyFirst :: forall a b f. Apply f => f a -> f b -> f a
Combine two effectful actions, keeping only the result of the first.
alt :: forall f a. Alt f => f a -> f a -> f a
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]
choose :: forall m a. MonadGen m => m a -> m a -> m a
Creates a generator that outputs a value chosen from one of two existing existing generators with even probability.
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
.
sampleOnRight_ :: forall event a b. IsEvent event => event a -> event b -> event a
Create an Event
which samples the latest values from the first event
at the times when the second event fires, ignoring the values produced by
the second event.
sampleOn_ :: forall b a event. IsEvent event => event a -> event b -> event a
Create an Event
which samples the latest values from the first event
at the times when the second event fires, ignoring the values produced by
the second event.
applyFirst :: forall v1 v0 f c. HasApply c f => HasConst c => HasMap c f => ObjectOf c v0 => ObjectOf c v1 => ObjectOf c (c v1 v0) => f v0 -> f v1 -> f v0
flipScalarMul :: forall k f. VectorField f k => f k -> k -> f k
max1 :: forall f a. Ord1 f => f a -> f a -> f a
min1 :: forall f a. Ord1 f => f a -> f a -> f a
onIntegrityError :: forall m a. MonadError PGError m => m a -> m a -> m a
optional :: forall f a. Alt f => Applicative f => f a -> f (Maybe a)
alt :: forall f a. Alternative f => f a -> f a -> f a
dappend :: forall cnt a. Diff cnt => cnt a -> cnt a -> cnt a
fromFoldableL :: forall a c f. Foldable f => Consable c => c a -> f a -> c a
Conversion from Foldable
to Consable
using foldl
.
fromFoldableL [] [1,2,3,4] == [4,3,2,1]
fromFoldableL [0] [1,2,3,4] == [4,3,2,1,0]
fromFoldableR :: forall a c f. Foldable f => Consable c => c a -> f a -> c a
Conversion from Foldable
to Consable
using foldr
.
fromFoldableR [] [1,2,3,4] == [1,2,3,4]
fromFoldableR [5] [1,2,3,4] == [1,2,3,4,5]
interleave :: forall m a. MonadLogic m => m a -> m a -> m a
optionMaybe :: forall a m. Alternative m => m a -> m (Maybe a)
snoc :: forall f a. Container f => f a -> a -> f a
voidRight :: forall f a b. Functor f => a -> f b -> f a
Ignore the return value of a computation, using the specified return value instead.
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.
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]
enumFromTo :: forall a u. Enum a => Unfoldable1 u => a -> a -> u a
Returns a contiguous sequence of elements from the first value to the second value (inclusive).
enumFromTo 0 3 = [0, 1, 2, 3]
enumFromTo 'c' 'a' = ['c', 'b', 'a']
The example shows Array
return values, but the result can be any type
with an Unfoldable1
instance.
seek :: forall s a w. ComonadStore s w => s -> w a -> w a
Reposition the focus at the specified position.
filled :: forall m a style. MonadCanvasAction m => CanvasStyle style => style -> m a -> m a
Run a MonadCanvasAction
with the given fillStyle, resetting it to the
previous value after
putCtx :: forall a html ctx. Ctx ctx html => ctx -> html a -> html a
stroked :: forall m a style. MonadCanvasAction m => CanvasStyle style => style -> m a -> m a
Run a MonadCanvasAction
with the given strokeStyle, resetting it to the
previous value after
tellAccum :: forall acc html a. TellAccum acc html => acc -> html a -> html a
get :: forall v s r' r l g f. Cons s v r' r => RGet f g s l r => RowToList r l => g s -> f r -> v
match :: forall v r1 r0 l1 l0 g f. RMatch f g v l0 r0 l1 r1 => RowToList r0 l0 => RowToList r1 l1 => f r0 -> g r1 -> v
scalarMul :: forall f k. VectorField f k => k -> f k -> f k
- ∀v in V: one * v == v
- ∀a b in K, v in V: a * (b .* v) = (a * b) .* v
- ∀a b in K, v in V:
- a .* (u + v) = a .* u + a .* v
- (a + b) .* v = a .* v + b .* v
cons :: forall t a. Consable t => a -> t a -> t a
cons :: forall f a. Container f => a -> f a -> f a
convertOption :: forall field from to sproxy. ConvertOption field from to => sproxy field -> from -> to
fromJust :: forall a. Maybe a -> a
fromJust' :: forall a. Maybe a -> a
The partial and unsafe version of fromJust
.
functorDecorate :: forall b a f. Functor f => Decorate a b => a -> f b -> f a
index :: forall f a b. Representable f a => f b -> (a -> b)
insert :: forall f a. Container f => Ord a => a -> f a -> f a
invokeAction :: forall m res args ctrl act. RemoteAction act ctrl args res => MonadReader Visualforce m => MonadAff m => MonadError RemoteActionError m => IsSymbol ctrl => Encode args => Decode res => act -> args -> m res
Function that invoke the action defined by referring to contraints which holds details about the correct controller to invoke. Example:
data PCMRequests = ..
data CreatePCMRequests = CreatePCMRequests
instance remoteActionCreatePCMs :: RemoteAction CreatePCMRequests "PCMMassController.createRecords" PCMRequests Unit
createPCMRequest :: Visualforce -> PCMRequests -> Aff (Either RemoteActionError Unit)
createPCMRequest vf rec = runReaderT (runExceptT $ invokeAction CreatePCMRequests rec) vf
option :: forall a m. Alternative m => a -> m a -> m a
replaceInArray :: forall a f. HasUuid a => Functor f => a -> f a -> f a
splice :: forall f t. Corecursive t (SqlF f) => Maybe t -> t