Search results
fromMaybe :: forall a. a -> Maybe a -> a
Takes a default value, and a Maybe value. If the Maybe value is
Nothing the default value is returned, otherwise the value inside the
Just is returned.
fromMaybe x Nothing == x
fromMaybe x (Just y) == y
withDefault :: forall a. a -> Maybe a -> a
If the given value is Nothing, return the default. Otherwise return the
value.
withDefault 2 Nothing -- 2
withDefault 2 (Just 1) -- 1
unsafeFromJustBecause :: forall a. String -> Maybe a -> a
unsafeFromJustBecause :: forall a. String -> Maybe a -> a
withOptionalStyle :: forall h. HasStyle h => h -> Maybe Style -> h
Formal :: Expr -> (Maybe Expr) -> Expr
AddImport :: String -> (Maybe String) -> ImportCommand
AnPlusB :: Int -> (Maybe Int) -> Position
createResponse :: forall payload. payload -> Maybe Options -> Response
Executable :: String -> (Maybe String) -> Executable
fullscreen :: P5 -> (Maybe Boolean) -> Boolean
p5js.org documentation
Feature :: String -> (Maybe Value) -> Feature
FontFaceSrcUrl :: String -> (Maybe FontFaceFormat) -> FontFaceSrc
newLease :: Id -> Maybe String -> Lease
Header :: HLevel -> (Maybe Anchor) -> Format
Header :: HLevel -> (Maybe Anchor) -> Format
mkMetajeloXpathEval :: Document -> Maybe NSResolver -> MJXpathEvals
BodyArrayBuffer :: ArrayBuffer -> (Maybe ContentType) -> Body
BodyString :: String -> (Maybe ContentType) -> Body
bounces :: Mailgun -> Maybe String -> Bounces
bounces api.
Color :: Hue -> (Maybe Shade) -> Color
complaints :: Mailgun -> Maybe String -> Complaints
complaints api.
createConsoleHandler :: LevelName -> Maybe ConsoleHandlerOptions -> Handler
createRotatingFileHandler :: LevelName -> Maybe RotatingFileHandlerOptions -> Handler
createWriterHandler :: LevelName -> Maybe WriterHandlerOptions -> Handler
credentials :: Domain -> Maybe String -> Credentials
domain :: Mailgun -> Maybe String -> Domain
This API allows you to create, access, and validate domains programmcatically.
isProbablePrime :: BigInt -> Maybe Int -> Boolean
Leaf :: String -> (Maybe Cache) -> RawField
Link :: LinkTarget -> (Maybe String) -> Words
mailingList :: Mailgun -> Maybe String -> MailingList
mailing list api.
members :: MailingList -> Maybe String -> Members
members api.
routes :: Mailgun -> Maybe String -> Routes
routes api
tags :: Mailgun -> Maybe String -> Tags
unsubscribes :: Mailgun -> Maybe String -> Unsubscribes
unsubscribes api
intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> m
Fold a data structure, accumulating values in some Monoid,
combining adjacent elements using the specified separator.
For example:
> intercalate ", " ["Lorem", "ipsum", "dolor"]
= "Lorem, ipsum, dolor"
> intercalate "*" ["a", "b", "c"]
= "a*b*c"
> intercalate [1] [[2, 3], [4, 5], [6, 7]]
= [2, 3, 1, 4, 5, 1, 6, 7]
intercalate :: forall f m. Foldable1 f => Semigroup m => m -> f m -> m
Fold a data structure using a Semigroup instance,
combining adjacent elements using the specified separator.
surround :: forall f m. Foldable f => Semigroup m => m -> f m -> m
fold but with each element surrounded by some fixed value.
For example:
> surround "*" []
= "*"
> surround "*" ["1"]
= "*1*"
> surround "*" ["1", "2"]
= "*1*2*"
> surround "*" ["1", "2", "3"]
= "*1*2*3*"
consMax :: forall a f. Foldable f => Ord a => a -> f a -> a
consMin :: forall a f. Foldable f => Ord a => a -> f a -> a
peek :: forall s w a. ComonadStore s w => s -> w a -> a
track :: forall t w a. ComonadTraced t w => t -> w a -> a
elem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean
Test whether a value is an element of a data structure.
notElem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean
Test whether a value is not an element of a data structure.
buildLeaf :: forall e f p v. ElementBuilder e f p v => e -> f p -> v
contains :: forall b a. HasEqual b => HasReduce a => b -> a b -> Boolean
Returns true if the container contains the element.
[1, 2, 3] :contains 2 -- true
[1, 0, 3] :contains 2 -- false
withOptionalAttribute :: forall msg h. HasAttribute h (Property msg) => h -> Maybe (Property msg) -> h
Add an optional attribute (operator !?)
liftMaybe :: forall m e a. MonadThrow e m => e -> Maybe a -> m a
Lift a Maybe value to a MonadThrow monad.
compareLength :: forall a t num. Semiring num => Ord num => Unconsable t => num -> t a -> Ordering
Given Foldable instance F which is also an instance of
Unconsable, for all t :: F a and for all n,
compareLength n t = compare n (length t).
continue :: forall k cursor. IDBKey k => IDBCursor cursor => cursor -> Maybe k -> Aff Unit
Advances the cursor to the next record in range matching or after key.
joinWith :: forall a f. Show a => Foldable f => String -> f a -> String
join1With :: forall f. Foldable1 f => String -> f NonEmptyString -> NonEmptyString
Joins non-empty strings in a non-empty container together as a new non-empty string, inserting a possibly empty string as separator between them. The result is guaranteed to be non-empty.
-- array syntax is used for demonstration here, it would need to be a real `Foldable1`
join1With ", " [NonEmptyString "apple", NonEmptyString "banana"] == NonEmptyString "apple, banana"
join1With "" [NonEmptyString "apple", NonEmptyString "banana"] == NonEmptyString "applebanana"
joinWith :: forall f. Foldable f => String -> f NonEmptyString -> String
Joins the strings in a container together as a new string, inserting the first argument as separator between them. The result is not guaranteed to be non-empty.
joinWith ", " [NonEmptyString "apple", NonEmptyString "banana"] == "apple, banana"
joinWith ", " [] == ""
joinWith1 :: forall f. Foldable1 f => NonEmptyString -> f String -> NonEmptyString
Joins possibly empty strings in a non-empty container together as a new non-empty string, inserting a non-empty string as a separator between them. The result is guaranteed to be non-empty.
-- array syntax is used for demonstration here, it would need to be a real `Foldable1`
joinWith1 (NonEmptyString ", ") ["apple", "banana"] == NonEmptyString "apple, banana"
joinWith1 (NonEmptyString "/") ["a", "b", "", "c", ""] == NonEmptyString "a/b//c/"
new' :: forall a. EventType -> Maybe a -> Effect CustomEvent
Create a new CustomEvent, storing some data in its detail field,
and using defaults for everything else.
forceMaybe' :: forall m a. MonadThrow Error m => String -> Maybe a -> m a
hoistMaybe :: forall a m. MonadP m => ParseError -> Maybe a -> m a
Event :: forall msg. String -> (Maybe msg) -> TestProp msg
create :: String -> Maybe String -> Effect EditSession
alert :: String -> Maybe String -> Effect Unit
bindVertexArray :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLVertexArrayObject -> Effect Unit
Usage: bindVertexArray gl array
void bindVertexArray (WebGLVertexArrayObject? array);
Documentation: WebGL 2.0 spec, section 3.7.17
categoryLink :: forall t a. TagLike t => t -> Maybe Int -> Markup a
count :: forall index. IDBIndex index => index -> Maybe KeyRange -> Aff Int
Retrieves the number of records matching the key range in query.
deleteBuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLBuffer -> Effect Unit
Usage: deleteBuffer gl buffer
void deleteBuffer (WebGLBuffer? buffer);
Documentation: WebGL 1.0 spec, section 5.14.5
deleteFramebuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLFramebuffer -> Effect Unit
Usage: deleteFramebuffer gl framebuffer
void deleteFramebuffer (WebGLFramebuffer? framebuffer);
Documentation: WebGL 1.0 spec, section 5.14.6
deleteProgram :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLProgram -> Effect Unit
Usage: deleteProgram gl program
void deleteProgram (WebGLProgram? program);
Documentation: WebGL 1.0 spec, section 5.14.9
deleteQuery :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLQuery -> Effect Unit
Usage: deleteQuery gl query
void deleteQuery (WebGLQuery? query);
Documentation: WebGL 2.0 spec, section 3.7.12
deleteRenderbuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLRenderbuffer -> Effect Unit
Usage: deleteRenderbuffer gl renderbuffer
void deleteRenderbuffer (WebGLRenderbuffer? renderbuffer);
Documentation: WebGL 1.0 spec, section 5.14.7
deleteSampler :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLSampler -> Effect Unit
Usage: deleteSampler gl sampler
void deleteSampler (WebGLSampler? sampler);
Documentation: WebGL 2.0 spec, section 3.7.13
deleteShader :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLShader -> Effect Unit
Usage: deleteShader gl shader
void deleteShader (WebGLShader? shader);
Documentation: WebGL 1.0 spec, section 5.14.9
deleteSync :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLSync -> Effect Unit
Usage: deleteSync gl sync
void deleteSync (WebGLSync? sync);
Documentation: WebGL 2.0 spec, section 3.7.14
deleteTexture :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLTexture -> Effect Unit
Usage: deleteTexture gl texture
void deleteTexture (WebGLTexture? texture);
Documentation: WebGL 1.0 spec, section 5.14.8
deleteTransformFeedback :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLTransformFeedback -> Effect Unit
Usage: deleteTransformFeedback gl tf
void deleteTransformFeedback (WebGLTransformFeedback? tf);
Documentation: WebGL 2.0 spec, section 3.7.15
deleteVertexArray :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLVertexArrayObject -> Effect Unit
Usage: deleteVertexArray gl vertexArray
void deleteVertexArray (WebGLVertexArrayObject? vertexArray);
Documentation: WebGL 2.0 spec, section 3.7.17
DropDownChanged :: forall v. String -> (Maybe v) -> SlamDownMessage v
hcat :: forall f. Foldable f => Alignment -> f Box -> Box
Glue a list of boxes together horizontally, with the given alignment.
isBuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLBuffer -> Effect GLboolean
Usage: isBuffer gl buffer
[WebGLHandlesContextLoss] GLboolean isBuffer (WebGLBuffer? buffer);
Documentation: WebGL 1.0 spec, section 5.14.5
isFramebuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLFramebuffer -> Effect GLboolean
Usage: isFramebuffer gl framebuffer
[WebGLHandlesContextLoss] GLboolean
isFramebuffer (WebGLFramebuffer? framebuffer);
Documentation: WebGL 1.0 spec, section 5.14.6
isProgram :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLProgram -> Effect GLboolean
Usage: isProgram gl program
[WebGLHandlesContextLoss] GLboolean isProgram (WebGLProgram? program);
Documentation: WebGL 1.0 spec, section 5.14.9
isQuery :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLQuery -> Effect GLboolean
Usage: isQuery gl query
[WebGLHandlesContextLoss] GLboolean isQuery (WebGLQuery? query);
Documentation: WebGL 2.0 spec, section 3.7.12
isRenderbuffer :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLRenderbuffer -> Effect GLboolean
Usage: isRenderbuffer gl renderbuffer
[WebGLHandlesContextLoss] GLboolean
isRenderbuffer (WebGLRenderbuffer? renderbuffer);
Documentation: WebGL 1.0 spec, section 5.14.7
isSampler :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLSampler -> Effect GLboolean
Usage: isSampler gl sampler
[WebGLHandlesContextLoss] GLboolean isSampler (WebGLSampler? sampler);
Documentation: WebGL 2.0 spec, section 3.7.13
isShader :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLShader -> Effect GLboolean
Usage: isShader gl shader
[WebGLHandlesContextLoss] GLboolean isShader (WebGLShader? shader);
Documentation: WebGL 1.0 spec, section 5.14.9
isSync :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLSync -> Effect GLboolean
Usage: isSync gl sync
[WebGLHandlesContextLoss] GLboolean isSync (WebGLSync? sync);
Documentation: WebGL 2.0 spec, section 3.7.14
isTexture :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLTexture -> Effect GLboolean
Usage: isTexture gl texture
[WebGLHandlesContextLoss] GLboolean isTexture (WebGLTexture? texture);
Documentation: WebGL 1.0 spec, section 5.14.8
isTransformFeedback :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLTransformFeedback -> Effect GLboolean
Usage: isTransformFeedback gl tf
[WebGLHandlesContextLoss] GLboolean
isTransformFeedback (WebGLTransformFeedback? tf);
Documentation: WebGL 2.0 spec, section 3.7.15
isVertexArray :: forall c. IsWebGL2RenderingContext c => c -> Maybe WebGLVertexArrayObject -> Effect GLboolean
Usage: isVertexArray gl vertexArray
[WebGLHandlesContextLoss] GLboolean
isVertexArray (WebGLVertexArrayObject? vertexArray);
Documentation: WebGL 2.0 spec, section 3.7.17
maybeFail :: forall a. String -> Maybe a -> Parser a
maybeThrow :: forall a m. MonadEffect m => String -> Maybe a -> m a
PAppend :: forall v. String -> (Maybe v) -> OrgProperty v
useProgram :: forall c. IsWebGLRenderingContext c => c -> Maybe WebGLProgram -> Effect Unit
Usage: useProgram gl program
void useProgram (WebGLProgram? program);
Documentation: WebGL 1.0 spec, section 5.14.9
vcat :: forall f. Foldable f => Alignment -> f Box -> Box
Glue a list of boxes together vertically, with the given alignment.
RefUpdate :: forall action. RefLabel -> (Maybe Element) -> Input action
renderTree :: Tree -> Maybe NodeID -> MermaidTreeM NodeID
Render a tree node to Mermaid
lock :: Mutex -> Maybe String -> Aff Unit
lock :: Locker -> Maybe String -> Aff Boolean
unlock :: forall m. MonadEffect m => Mutex -> Maybe String -> m Unit
unlock :: forall m. MonadEffect m => Unlocker -> Maybe String -> m Unit
wait :: Turn -> Maybe String -> Aff Unit
BasicAuth :: (Maybe String) -> (Maybe String) -> Auth