Search results

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.

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

Add a cleaner

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
quickCheck :: forall p. Testable p => p -> Aff Unit

Runs a Testable with a random seed and 100 inputs.

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
abort :: forall tx. IDBTransaction tx => tx -> Aff Unit

Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.

cancel :: forall a. Parent a => a -> Aff Unit
clear :: forall store. IDBObjectStore store => store -> Aff Unit

Deletes all records in store.

close :: forall db. IDBDatabase db => db -> Aff Unit

Closes the connection once all running transactions have finished.

closePort :: forall a. LateNode a => a -> Aff Unit
delay :: forall d. Duration d => d -> Aff Unit
delete :: forall cursor. IDBCursor cursor => cursor -> Aff Unit

Delete the record pointed at by the cursor with a new value.

key :: forall cursor. IDBConcreteCursor cursor => cursor -> Aff Key

Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.

primaryKey :: forall cursor. IDBConcreteCursor cursor => cursor -> Aff Key

Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.

release :: forall g a. RWLockGuard g => g a -> Aff Unit
pure :: forall f a. Applicative f => a -> f 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!"
singleton :: forall f a. Unfoldable1 f => a -> f a

Contain a single value. For example:

singleton "foo" == (NEL.singleton "foo" :: NEL.NonEmptyList String)
proof :: forall a b p. TypeEquals a b => p a -> p b
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.

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.

coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
throwError :: forall e m a. MonadThrow e m => e -> m a
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
cleared :: forall f a b. Filterable f => f a -> f b

Filter out all values.

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
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.

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
lambek :: forall t f. Recursive t f => Corecursive t f => t -> f t
project :: forall t f. Recursive t f => t -> f t
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
length :: forall xs r lproxy iproxy. Length xs r => lproxy xs -> iproxy r
localEffect :: forall a. Effect a -> a
sequenceProduct :: forall specI specO f. SequenceProduct specI specO f => specI -> f specO
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.

pure :: forall v f c. HasPure c f => ObjectOf c v => v -> f v
restoreAfter :: forall m a. MonadCanvasAction m => m a -> m a

Runs save, then the provided action, then restore

bottom1_ :: forall f a. Bottom1_ f => a -> f a
bottom2 :: forall f a b. Bottom2 f a => a -> f b
top1_ :: forall f a. Top1_ f => a -> f a
act :: forall m b a. Mother m => a -> m b
allOff :: forall m t. Bind m => MonadEffect m => EventTargetOp t => t -> m t

Removes all event handler functions from an event target. The target is returned.

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.

change :: forall t m. EventTargetOp t => MonadEffect m => t -> m t

Triggers the change event handlers tied to the 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.

collapse :: forall m n. MonadEffect m => HTMLElementOp n => n -> m n
collapseM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
conceal :: forall m n. MonadEffect m => HTMLElementOp n => n -> m n
concealM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
detach :: forall c m. MonadEffect m => NodeOp c => 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.

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.

disable :: forall el m. HTMLAbleOp el => MonadEffect m => el -> m el
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.

dsingleton :: forall cnt a. Diff cnt => a -> cnt a
empty :: forall m p. MonadEffect m => NodeOp p => p -> m p

Calls remove on the all of the node's children. The emptied node is returned.

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.

enable :: forall el m. HTMLAbleOp el => MonadEffect m => el -> m el
enableM :: forall m el. HTMLAbleOp el => MonadEffect m => m el -> m el
forever :: forall b a m. Monad m => m a -> m b
hide :: forall m n. MonadEffect m => HTMLElementOp n => n -> m n
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
mockFun :: forall params fun verifyParams m. MockBuilder params fun verifyParams => MonadEffect m => params -> m fun
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
pure :: forall d a. Syntax d => Eq a => a -> d a
pure :: forall f a. Unital Function Unit Unit f => Functor f => a -> f a
pure :: forall a b. HasPure a => b -> a b
pure :: forall f a. Applicative f => a -> f a
query :: forall m q r. MonadSession m => AsQuery q => FromRows r => q -> m r

Executes a query and unmarshals the result into r

read :: forall box val m. Read box val => MonadDelay m => box -> m val

Read the current value. Will never cause a refresh.

remove :: forall c m. MonadEffect m => NodeOp c => 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.

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.

repeat :: forall a u. Unfoldable1 u => a -> u a

Create an infinite Unfoldable1 by repeating a single element.

reveal :: forall m n. MonadEffect m => HTMLElementOp n => n -> m n
revealM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
show :: forall m n. MonadEffect m => HTMLElementOp n => n -> m n
showM :: forall m n. MonadEffect m => HTMLElementOp n => m n -> m n
siteClock :: forall s m i c. Site s m i c => s -> m c
siteId :: forall s m i c. Site s m i c => s -> m i
throw :: forall (t10 :: Type -> Type) (t11 :: Type) (a12 :: Type). MonadThrow Error t10 => Show a12 => a12 -> t10 t11
try :: forall m a. Parsing m => m a -> m a
unfold :: forall f a s. Convert s (Statements a) => Unfoldable1 f => s -> f a
val :: forall el v m. HTMLValueContainerOp el v => MonadEffect m => el -> m v
valM :: forall m el v. MonadEffect m => HTMLValueContainerOp el v => m el -> m v
void :: forall f a. Functor f => f a -> f Unit

The void function is used to ignore the type wrapped by a Functor, replacing it with Unit and keeping only the type information provided by the type constructor itself.

void is often useful when using do notation to change the return type of a monadic computation:

main = forE 1 10 \n -> void do
  print n
  print (n * n)
put :: forall m s. MonadState s m => s -> m Unit

Set the state.

tell :: forall w m. MonadTell w m => w -> m Unit
debugShow :: forall m a. MonadEffect m => Show a => a -> m Unit
errorShow :: forall m a. MonadEffect m => Show a => a -> m Unit
infoShow :: forall m a. MonadEffect m => Show a => a -> m Unit
logShow :: forall m a. MonadEffect m => Show a => a -> m Unit
warnShow :: forall m a. MonadEffect m => Show a => a -> m Unit
new :: forall a. a -> Aff (AVar a)

Creates a fresh AVar with an initial value.

freeze :: forall buf m. MutableBuffer buf m => buf -> m ImmutableBuffer

Creates an immutable copy of a mutable buffer.

size :: forall buf m. MutableBuffer buf m => buf -> m Int

Returns the size of a buffer.

toArrayBuffer :: forall buf m. MutableBuffer buf m => buf -> m ArrayBuffer

Copies the data in the buffer to a new JS ArrayBuffer

unsafeFreeze :: forall buf m. MutableBuffer buf m => buf -> m ImmutableBuffer

O(1). Convert a mutable buffer to an immutable buffer, without copying. The mutable buffer must not be mutated afterwards.

discard :: forall a m. Monad m => a -> m Unit

Discards a value

expectError :: forall m t. MonadError Error m => m t -> m Unit
traceM :: forall m a. DebugWarning => Monad m => a -> m Unit

Log any PureScript value to the console and return the unit value of the Monad m.

delay :: forall m d. MonadAff m => Duration d => d -> m Unit
mwrite :: forall s m. ReferM s m => s -> m Unit
count :: forall event a. IsEvent event => event a -> event Int

Count the number of events received.

count :: forall a event. IsEvent event => event a -> event Int

Count the number of events received.

newSessionID :: forall store m session. SessionStore store m session => store -> m SessionID
badRequest :: forall m b. MonadAff m => Body b => b -> m Response

400

badRequest :: forall m b. MonadAff m => Body b => b -> m Response

400

clearRect :: forall m r. MonadCanvasAction m => ToRegion Number r => r -> m Unit

Clear a rectangular area

conflict :: forall m b. MonadAff m => Body b => b -> m Response

409

conflict :: forall m b. MonadAff m => Body b => b -> m Response

409

createCanvas :: forall m s. MonadEffect m => ToSize Number s => s -> m HTMLCanvasElement

Create an HTMLCanvasElement of the given size in any MonadEffect

createImageData :: forall m s. MonadCanvasAction m => ToSize Number s => s -> m ImageData
fillRect :: forall m r. MonadCanvasAction m => ToRegion Number r => r -> m Unit

Fill a rectangular area

found :: forall m b. MonadAff m => Body b => b -> m Response

302

found :: forall m b. MonadAff m => Body b => b -> m Response

302

getImageData :: forall m r. MonadCanvasAction m => ToRegion Number r => r -> m ImageData
iMUsed :: forall m b. MonadAff m => Body b => b -> m Response

226

iMUsed :: forall m b. MonadAff m => Body b => b -> m Response

226

internalServerError :: forall m b. MonadAff m => Body b => b -> m Response

500

internalServerError :: forall m b. MonadAff m => Body b => b -> m Response

500

movedPermanently :: forall m b. MonadAff m => Body b => b -> m Response

301

movedPermanently :: forall m b. MonadAff m => Body b => b -> m Response

301

multipleChoices :: forall m b. MonadAff m => Body b => b -> m Response

300

multipleChoices :: forall m b. MonadAff m => Body b => b -> m Response

300

multiStatus :: forall m b. MonadAff m => Body b => b -> m Response

207

multiStatus :: forall m b. MonadAff m => Body b => b -> m Response

207

nonAuthoritativeInformation :: forall m b. MonadAff m => Body b => b -> m Response

203

nonAuthoritativeInformation :: forall m b. MonadAff m => Body b => b -> m Response

203

ok :: forall m b. MonadAff m => Body b => b -> m Response

200

ok :: forall m b. MonadAff m => Body b => b -> m Response

200

partialContent :: forall m b. MonadAff m => Body b => b -> m Response

206

partialContent :: forall m b. MonadAff m => Body b => b -> m Response

206

permanentRedirect :: forall m b. MonadAff m => Body b => b -> m Response

308

permanentRedirect :: forall m b. MonadAff m => Body b => b -> m Response

308

seeOther :: forall m b. MonadAff m => Body b => b -> m Response

303

seeOther :: forall m b. MonadAff m => Body b => b -> m Response

303

setFillStyle :: forall m r. MonadCanvasAction m => CanvasStyle r => r -> m Unit
setShadowColor :: forall m color. MonadCanvasAction m => CanvasColor color => color -> m Unit
setShadowOffset :: forall m p. MonadCanvasAction m => ToPos Number p => p -> m Unit

Set x and y shadow offset at the same time

setStrokeStyle :: forall m r. MonadCanvasAction m => CanvasStyle r => r -> m Unit
strokeRect :: forall m r. MonadCanvasAction m => ToRegion Number r => r -> m Unit

Stroke a rectangular area

temporaryRedirect :: forall m b. MonadAff m => Body b => b -> m Response

307

temporaryRedirect :: forall m b. MonadAff m => Body b => b -> m Response

307

useProxy :: forall m b. MonadAff m => Body b => b -> m Response

305

useProxy :: forall m b. MonadAff m => Body b => b -> m Response

305

to1 :: forall f rep. Generic1 f rep => rep -> f Unit
act_ :: forall a m. Mother m => a -> m Unit
baseURI :: forall m n. MonadEffect m => NodeOp n => n -> m String
childNodes :: forall m n. MonadEffect m => NodeOp n => n -> m NodeList
classList :: forall m e. MonadEffect m => ElementOp e => e -> m DOMTokenList
clone :: forall m n. MonadEffect m => NodeOp n => n -> m Node
cp :: forall @args input m. CmdArgs "cp" args => KnownTemplateArgs args input => MonadAff m => input -> m Unit
cpArgs :: forall args m. ToArgs args => MonadAff m => args -> m Unit
data_ :: forall m c. MonadEffect m => CharacterDataOp c => c -> m String
deepClone :: forall m n. MonadEffect m => NodeOp n => n -> m Node
delay :: forall m d. MonadAff m => Duration d => d -> m Unit
don't :: forall a m. Applicative m => m a -> m Unit
emptyHandler :: forall m a. Applicative m => a -> m Unit

an empty event handler

errorShow :: forall eff m a. Show a => MonadEff (console :: CONSOLE | eff) m => a -> m Unit
exec :: forall m q. MonadSession m => AsQuery q => q -> m Int

Executes a query and returns the number of rows affected

exec_ :: forall m q. MonadSession m => AsQuery q => q -> m Unit

Executes a query and discards the result

find :: forall @args input m. CmdArgs "find" args => KnownTemplateArgs args input => MonadAff m => input -> m String
findArgs :: forall args m. ToArgs args => MonadAff m => args -> m String
getMatricesAtVertices :: forall a f. HasMatrix a => HasVertices a f => Functor f => a -> f Matrix4
gh :: forall @args input m. CmdArgs "gh" args => KnownTemplateArgs args input => MonadAff m => input -> m String
ghArgs :: forall args m. ToArgs args => MonadAff m => args -> m String
git :: forall @args input m. CmdArgs "git" args => KnownTemplateArgs args input => MonadAff m => input -> m String
gitArgs :: forall args m. ToArgs args => MonadAff m => args -> m String
grep :: forall @args input m. CmdArgs "grep" args => KnownTemplateArgs args input => MonadAff m => input -> m String
grepArgs :: forall args m. ToArgs args => MonadAff m => args -> m String
gum :: forall args m. ToArgs args => MonadAff m => args -> m String
gum_ :: forall args m. ToArgs args => MonadAff m => args -> m Unit
hasChildNodes :: forall m n. MonadEffect m => NodeOp n => n -> m Boolean
head :: forall @args input m. CmdArgs "head" args => KnownTemplateArgs args input => MonadAff m => input -> m String
headArgs :: forall args m. ToArgs args => MonadAff m => args -> m String
infoShow :: forall eff m a. Show a => MonadEff (console :: CONSOLE | eff) m => a -> m Unit
isDate :: forall m e a. MonadEff (DateFnsEff e) m => a -> m Boolean
isEnabled :: forall el m. HTMLAbleOp el => MonadEffect m => el -> m Boolean
isEnabledM :: forall m el. MonadEffect m => HTMLAbleOp el => m el -> m Boolean

Is this input enabled?

jj :: forall @args input m. CmdArgs "jj" args => KnownTemplateArgs args input => MonadAff m => input -> m String