Search results

Asynchronous effect monad

An Aff a is an asynchronous computation with effects. The computation may either error with an exception, or produce a result of type a. Aff effects are assembled from primitive Effect effects using makeAff or liftEffect.

Type synonym for using Aff as an effect.

Aff :: PitchClass
aff :: Octave -> Dur -> Music Pitch
affix :: ClassName

An asynchronous AJAX library built using Aff.

Note: this module is not intended to be used by end-users. Rather, use the environment-specific library instead:

  • purescript-affjax-node
  • purescript-affjax-web

You should use this module if you are writing a driver for a specific environment. See this module's source code for more details.

An affine space is a set of points with associated difference vectors.

Laws:

  • p .+^ (q .-. p) = q
  • (p .+^ u) .+^ v = p .+^ (u ^+^ v)
  • p .-. p = zero
affjax :: forall b a. Requestable a => Respondable b => AffjaxRequest a -> AffjaxF a b

Makes an Affjax request.

affjax :: forall err a. Validator Aff (Error err) (Request a) (Response a)

Many-to-many broadcasting

An AffGame is an Aff that takes a Reducer as an argument. Can be constructed from a TemplateAffGame using mkAffGame.

AffGame :: forall extra a. (Reducer extra Req -> Aff a) -> AffGame extra a

Affinity is a group of affinity scheduling rules.

Fields:

  • nodeAffinity: Describes node affinity scheduling rules for the pod.
  • podAffinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
  • podAntiAffinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
Affinity :: { nodeAffinity :: Maybe NodeAffinity, podAffinity :: Maybe PodAffinity, podAntiAffinity :: Maybe PodAntiAffinity } -> Affinity
AffjaxFP :: forall req res a. (AffjaxRequest req) -> (Either Error (AffjaxResponse res) -> a) -> AffjaxFP req res a
affAction :: forall a v. v -> Aff a -> Widget v a
affAction :: forall a r. r -> ReaderT r Aff a -> Effect Unit

Create an action dispatcher for Aff and any given the context (e.g. ReactThis)

An asynchronous AJAX library built using Aff that runs on the browser.

affjaxJson :: forall errs. Validator Aff (Error (HttpError + AffjaxError + ResponseFormatError + errs)) (Request Json) Json
affLocator :: (Element -> Aff Element) -> Aff Locator

Build locator from asynchronous function returning element. I.e. this locator will find first visible element with .common-element class

affLocator \el → do
  commonElements ← byCss ".common-element" >>= findElements el
  flagedElements ← traverse (\el → Tuple el <$> isVisible el) commonElements
  maybe err pure $ foldl foldFn Nothing flagedElements
  where
  err = throwError $ error "all common elements are not visible"
  foldFn Nothing (Tuple el true) = Just el
  foldFn a _ = a

An asynchronous AJAX library built using Aff that runs on Node.js.

Parallelize asynchronous computations with specified number of fibers

bottom :: forall a. Bounded a => a
ff :: forall a. HeytingAlgebra a => a
genericBottom :: forall a rep. Generic a rep => GenericBottom rep => a

A Generic implementation of the bottom member from the Bounded type class.

genericBottom' :: forall a. GenericBottom a => a
genericFF :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a

A Generic implementation of the ff member from the HeytingAlgebra type class.

genericFF' :: forall a. GenericHeytingAlgebra a => a
genericMempty :: forall a rep. Generic a rep => GenericMonoid rep => a

A Generic implementation of the mempty member from the Monoid type class.

genericMempty' :: forall a. GenericMonoid a => a
genericOne :: forall a rep. Generic a rep => GenericSemiring rep => a

A Generic implementation of the one member from the Semiring type class.

genericOne' :: forall a. GenericSemiring a => a
genericTop :: forall a rep. Generic a rep => GenericTop rep => a

A Generic implementation of the top member from the Bounded type class.

genericTop' :: forall a. GenericTop a => a
genericTT :: forall a rep. Generic a rep => GenericHeytingAlgebra rep => a

A Generic implementation of the tt member from the HeytingAlgebra type class.

genericTT' :: forall a. GenericHeytingAlgebra a => a
genericZero :: forall a rep. Generic a rep => GenericSemiring rep => a

A Generic implementation of the zero member from the Semiring type class.

genericZero' :: forall a. GenericSemiring a => a
mempty :: forall m. Monoid m => m
one :: forall a. Semiring a => a
top :: forall a. Bounded a => a
tt :: forall a. HeytingAlgebra a => a
zero :: forall a. Semiring a => a
crash :: forall a. Partial => a

A partial function which crashes on any input with a default message.

undefined :: forall a. a
all :: forall a. All a => a
auto :: forall a. Auto a => a
baseline :: forall a. Baseline a => a
bottom :: forall a. Bottom a => a
center :: forall a. Center a => a
flexEnd :: forall a. FlexEnd a => a
flexStart :: forall a. FlexStart a => a
hidden :: forall a. Hidden a => a
inherit :: forall a. Inherit a => a
initial :: forall a. Initial a => a
middle :: forall a. Middle a => a
none :: forall a. None a => a
normal :: forall a. Normal a => a
spaceAround :: forall a. SpaceAround a => a
spaceBetween :: forall a. SpaceBetween a => a
stretch :: forall a. Stretch a => a
top :: forall a. Top a => a
unset :: forall a. Unset a => a
visible :: forall a. Visible a => a
undefined :: forall anything. anything
idm :: forall m. Monoid m => m

Trivial option modifier.

zero :: forall a. Zero a => a
mzeroL :: forall x r. LeftModule x r => x
mzeroR :: forall x r. RightModule x r => x
def :: forall a. Default a => a
animationEvent :: forall a. a
bottom :: forall a. BoundedJoinSemilattice a => a
clipboardEvent :: forall a. a
compositionEvent :: forall a. a
dragEvent :: forall a. a
empty :: forall l. MList l => l

The /empty/ heterogeneous list of type @l@. Of course, @empty

event :: forall a. a
focusEvent :: forall a. a
hashChangeEvent :: forall a. a
historyEvent :: forall a. a
imageEvent :: forall a. a
keyboardEvent :: forall a. a
mediaEvent :: forall a. a
mouseEvent :: forall a. a
pageTransitionEvent :: forall a. a
pointerEvent :: forall a. a
popStateEvent :: forall a. a
progressEvent :: forall a. a
root :: forall m. XPathLike m => m

The root XPath representation.

selectionEvent :: forall a. a
start :: forall s c. HasStart c s => s
storageEvent :: forall a. a
todo :: forall a. a

A placeholder to use when you want your code to compile without finishing something. You will immediately get an error when trying to run any code with a todo, so you won't forget about it and run into errors later.

toggleEvent :: forall a. a
top :: forall a. BoundedMeetSemilattice a => a
touchEvent :: forall a. a
transitionEvent :: forall a. a
uiEvent :: forall a. a
unit :: forall u c. HasUnit c u => u
unsafeTodo :: forall a. a

Like todo but it doesn't throw an error.

wheelEvent :: forall a. a
bottom :: forall a. BoundedJoinSemilattice a => a
bottom :: forall a. Bottom a => a

i

i :: forall a. Interp a => a

Enables string interpolation using the following syntax:

i "there are " 52 " apples." == "there are 52 apples"
i 52 " apples and " 0 " oranges." == "52 apples and 0 oranges."
i true 4 42.0 'c' "string" == "true442.0'c'string"
mzeroL :: forall x r. LeftModule x r => x
mzeroR :: forall x r. RightModule x r => x
null :: forall t. Corecursive t EJsonF => t
reflectProxy :: forall a. ReflectProxy a => a
reflectRecordProxy :: forall a. ReflectRecordProxy a => a
top :: forall a. BoundedMeetSemilattice a => a
top :: forall a. Top a => a
activator :: forall r. Variadic Class r => r
ask :: forall a. Ask a => a

Retrives an implicit parameter from the context

auto :: forall a. AutoEnum a => a
axes :: forall @n a. Axes n a => a
badge :: forall r. Variadic Badge r => r
big :: forall r. Variadic Class r => r
bottom :: forall a. HasBottom a => a
brandLogo :: forall r. Variadic Class r => r
breadcrumb :: forall r. Variadic Class r => r
browserDefault :: forall r. Variadic Class r => r
button :: forall r. Variadic Button r => r
card :: forall r. Variadic Card r => r
cardAction :: forall r. Variadic Class r => r
cardContent :: forall r. Variadic Class r => r
cardImage :: forall r. Variadic Class r => r
cardReveal :: forall r. Variadic Class r => r
cardStacked :: forall r. Variadic Class r => r
cardTabs :: forall r. Variadic Class r => r
cardTitle :: forall r. Variadic Class r => r
carousel :: forall r. Variadic Carousel r => r
carouselItem :: forall r. Variadic CarouselItem r => r
center :: forall a. CenterEnum a => a
center :: forall nt r. Newtype nt (Variant (center :: Unit | r)) => nt
chip :: forall r. Variadic Class r => r
circle :: forall r. Variadic Class r => r
circleClipper :: forall r. Variadic Class r => r
collection :: forall r. Variadic Collection r => r
collectionHeader :: forall r. Variadic Class r => r
collectionItem :: forall r. Variadic CollectionItem r => r
container :: forall r. Variadic Class r => r
default :: forall a. Default a => a
default :: forall a. Default a => a
default :: forall a. IsTreeItem a => a
defaultInput :: forall a. DefaultInput a => a
defaultValue :: forall a. DefaultValue a => a
defaultValue :: forall a. DomPropType a => a
determinate :: forall r. Variadic Class r => r
divider :: forall r. Variadic Class r => r
dropdownContent :: forall r. Variadic Class r => r

e

e :: forall nt optional. Newtype nt (RequiredAndOptional () optional) => nt
empty :: forall a. EmptyableSlot a => a
eof :: forall e. OwoifyError e => e

Representing that the source collection of strings has been exhausted.

filePath :: forall r. Variadic Class r => r
filePathWrapper :: forall r. Variadic Class r => r
filledIn :: forall r. Variadic Class r => r
flexEnd :: forall a. FlexStartEnd a => a
flexStart :: forall a. FlexStartEnd a => a
floatingActionButton :: forall r. Variadic Class r => r
footerCopyright :: forall r. Variadic Class r => r
formDefaults :: forall a. FormDefaults a => a
gapPatch :: forall r. Variadic Class r => r
helperText :: forall r. Variadic Class r => r
hidden :: forall a. VisibilityEnum a => a
hide :: forall r. Variadic Visibility r => r
indeterminate :: forall r. Variadic Class r => r
initial :: forall e. Events e => e
initial :: forall v. Initial v => v
inputField :: forall r. Variadic InputField r => r
invalid :: forall r. Variadic Class r => r
lever :: forall r. Variadic Class r => r
materialIcons :: forall r. Variadic Class r => r
materializeTextarea :: forall r. Variadic Class r => r
mkAutoHandlers :: forall args. MkAutoHandlers args => args
mkUpdate :: forall @spec tcore msg state args a. IsTransitSpec spec tcore => CurryN args (Variant state -> Variant msg -> Variant state) a => MkUpdate tcore Identity MaybeChurch args (Variant msg) (Variant state) => a

Creates a pure update function.

Returns state, silently returning the unchanged state on illegal transitions. Use mkUpdateEither if you need error handling.

Example:

update :: State -> Msg -> State
update = mkUpdate @MyTransit ...
mkUpdateM :: forall @spec tcore msg state args m a. IsTransitSpec spec tcore => CurryN args (Variant state -> Variant msg -> m (Variant state)) a => MkUpdate tcore m MaybeChurch args (Variant msg) (Variant state) => Functor m => a

Creates a monadic update function.

Returns m state, silently returning the unchanged state on illegal transitions. Use mkUpdateEitherM if you need error handling.

Example:

update :: State -> Msg -> Effect State
update = mkUpdateM @MyTransit ...
mkUpdateMaybe :: forall @spec tcore msg state args a. IsTransitSpec spec tcore => CurryN args (Variant state -> Variant msg -> Maybe (Variant state)) a => MkUpdate tcore Identity Maybe args (Variant msg) (Variant state) => a

Creates a pure update function with error handling.

Returns Maybe state, returning Nothing for illegal transition requests.

Example:

update :: State -> Msg -> Maybe State
update = mkUpdateEither @MyTransit ...
mkUpdateMaybeM :: forall @spec tcore msg state args m a. IsTransitSpec spec tcore => CurryN args (Variant state -> Variant msg -> m (Maybe (Variant state))) a => MkUpdate tcore m Maybe args (Variant msg) (Variant state) => a

Creates a monadic update function with error handling.

Returns m (Maybe state), returning Nothing for illegal transition requests.

Example:

update :: State -> Msg -> Effect (Maybe State)
update = mkUpdateEitherM @MyTransit ...
navbarFixed :: forall r. Variadic Class r => r
navContent :: forall r. Variadic Class r => r
navExtended :: forall r. Variadic Class r => r
navTitle :: forall r. Variadic Class r => r
navWrapper :: forall r. Variadic Class r => r
noAutoInit :: forall r. Variadic Class r => r
none :: forall a. NoneEnum a => a
noPadding :: forall r. Variadic Class r => r
normal :: forall a. NormalEnum a => a
null :: forall t. Corecursive t (SqlF EJsonF) => t
one :: forall a. HasOne a => a
pageFooter :: forall r. Variadic Class r => r
pagination :: forall r. Variadic Class r => r
preloaderWrapper :: forall r. Variadic PreloaderWrapper r => r
progress :: forall r. Variadic Class r => r
render :: forall nt r. Newtype nt (Variant (render :: Unit | r)) => nt
return :: forall sym a. Return sym a => a

Returns to the specified state.

For states with payloads:

return @"StateName" { field: value }

For states with empty payloads:

return @"StateName"
returnVia :: forall symGuard sym a. ReturnVia symGuard sym a => a

Returns to the specified state via a guard condition.

For states with payloads:

returnVia @"GuardName" @"StateName" { field: value }

For states with empty payloads:

returnVia @"GuardName" @"StateName"
rounded :: forall r. Variadic Class r => r
routeEmpty :: forall r. IsRoute r => r
row :: forall r. Variadic Class r => r
secondaryContent :: forall r. Variadic Class r => r
section :: forall r. Variadic Class r => r
selectInputField :: forall r. Variadic Class r => r
show :: forall r. Variadic Visibility r => r
sidenav :: forall r. Variadic Sidenav r => r
sidenavBackground :: forall r. Variadic Class r => r
sidenavClose :: forall r. Variadic Class r => r
sidenavTrigger :: forall r. Variadic Class r => r
skipTokenImpl :: forall a. a

Utilities

slider :: forall r. Variadic Slider r => r
sliderCaption :: forall r. Variadic Class r => r
slides :: forall r. Variadic Class r => r
spinnerBlue :: forall r. Variadic Class r => r
spinnerBlueOnly :: forall r. Variadic Class r => r
spinnerGreen :: forall r. Variadic Class r => r
spinnerGreenOnly :: forall r. Variadic Class r => r
spinnerLayer :: forall r. Variadic Class r => r
spinnerRed :: forall r. Variadic Class r => r
spinnerRedOnly :: forall r. Variadic Class r => r
spinnerYellow :: forall r. Variadic Class r => r
spinnerYellowOnly :: forall r. Variadic Class r => r
subheader :: forall r. Variadic Class r => r
switch :: forall r. Variadic Class r => r
textInputActive :: forall r. Variadic Class r => r
todo :: forall a. a

A wildly unsafe function that can be used to stand in for any value.

todo :: Unit -- unit
todo :: Boolean -- ?

This should never end up in production, but it can be useful when developing a function.

tooltipped :: forall r. Variadic Class r => r
top :: forall a. HasTop a => a
undefined :: forall a. a
undefinedk :: forall k. k
unsafeCopy :: forall t501. t501
unsafeDomain :: forall t503. t503

No further results.