Search results

liftEffect :: forall m a. MonadEffect m => Effect a -> m a
pull :: forall a m. MonadEffect m => Effect a -> m a
read :: forall g a. RWLockGuard g => g a -> Aff a
toAffE :: forall a. Effect (Promise a) -> Aff a

Utility to convert an Effect returning a Promise into an Aff (i.e. the inverse of fromAff)

toAffE :: forall a. Effect (Promise a) -> Aff a

Utility to convert an Effect returning a Promise into an Aff (i.e. the inverse of fromAff)

useCleaner :: forall m. MonadHooks m => Effect Unit -> m Unit

Add a cleaner

onCleanup :: forall m. MonadCleanup m => Effect Unit -> m Unit

Add a cleanup action.

release :: forall g a. RWLockGuard g => g a -> Aff Unit
useCleaner :: forall m. MonadHooks m => Effect Unit -> m Unit

Add a cleaner

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.

unsafePerformEffect :: forall a. Effect a -> a

Run an effectful computation.

Note: use of this function can result in arbitrary side-effects.

inj :: forall f g a. Inject f g => f a -> g a
join :: forall f m a. MonadFork f m => f a -> m a
uninterruptible :: forall e f m a. MonadBracket e f m => m a -> m a
spyM :: forall m a. Warn (Text "Debug function usage") => Monad m => m a -> m a
liftBase :: forall b m a. MonadBase b m => b 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.

localEffect :: forall a. Effect a -> a
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
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
hideM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
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
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
cleared :: forall f a b. Filterable f => f a -> f b

Filter out all values.

quickCheck :: forall p. Testable p => p -> Aff Unit

Runs a Testable with a random seed and 100 inputs.

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
init :: forall xs ys lproxy. Init xs ys => lproxy xs -> lproxy ys
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
awaitFinished :: forall s a. Write s a => s -> Aff Unit
awaitReadableOrClosed :: forall s a. Read s a => s -> Aff Unit
awaitWritableOrClosed :: forall s a. Write s a => s -> Aff Unit