Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
haskell-gi Data.GI.GIR.Arg No documentation available.
maybeAuthorized :: Yesod site => Route site -> Bool -> HandlerT site IO (Maybe (Route site))yesod-core Yesod.Core Return the same URL if the user is authorized to see it. Built on top of isAuthorized. This is useful for building page that only contain links to pages the user is allowed to see.
maybeCryptoError :: CryptoFailable a -> Maybe acryptonite Crypto.Error Transform a CryptoFailable to a Maybe
maybeTagText :: Tag str -> Maybe strtagsoup Text.HTML.TagSoup maybeTagWarning :: Tag str -> Maybe strtagsoup Text.HTML.TagSoup Extract the string from within TagWarning, otherwise Nothing
-
strict Data.Strict.Maybe Analogous to maybeToList in Data.Maybe.
maybeCodec :: ValueCodec input output -> ValueCodec (Maybe input) (Maybe output)autodocodec Autodocodec Maybe codec This can be used to also allow null during decoding of a Maybe value. During decoding, also accept a null value as Nothing. During encoding, encode as usual.
Example usage
>>> toJSONVia (maybeCodec codec) (Just 'a') String "a" >>> toJSONVia (maybeCodec codec) (Nothing :: Maybe Char) Null
maybeCodec :: ValueCodec input output -> ValueCodec (Maybe input) (Maybe output)autodocodec Autodocodec.Codec Maybe codec This can be used to also allow null during decoding of a Maybe value. During decoding, also accept a null value as Nothing. During encoding, encode as usual.
Example usage
>>> toJSONVia (maybeCodec codec) (Just 'a') String "a" >>> toJSONVia (maybeCodec codec) (Nothing :: Maybe Char) Null
maybeToLeft :: b -> Maybe a -> Either a beither Data.Either.Combinators Maybe produce a Left, otherwise produce a Right.
>>> maybeToLeft "default" (Just 12) Left 12
>>> maybeToLeft "default" Nothing Right "default"
maybeToRight :: b -> Maybe a -> Either b aeither Data.Either.Combinators Maybe produce a Right, otherwise produce a Left.
>>> maybeToRight "default" (Just 12) Right 12
>>> maybeToRight "default" Nothing Left "default"