Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
maybeToFocus :: Maybe Int -> Focusfocuslist Data.FocusList Convert a Maybe Int to a Focus.
>>> maybeToFocus (Just 100) Focus 100
>>> maybeToFocus Nothing NoFocus
maybeToFocus and getFocus witness an isomorphism.focus == maybeToFocus (getFocus focus)
maybeInt == getFocus (maybeToFocus maybeInt)
complexity: O(1)maybeToEither :: e -> Maybe a -> Either e afrom-sum Control.FromSum Convert a Maybe to an Either. If the Maybe is Just, then return the value in Right.
>>> maybeToEither 3 $ Just "hello" Right "hello"
If the Maybe is Nothing, then use the given e as Left.>>> maybeToEither 3 Nothing Left 3
maybeToEitherOr :: Maybe a -> e -> Either e afrom-sum Control.FromSum A fliped version of maybeToEither.
>>> maybeToEitherOr (Just "hello") 3 Right "hello"
>>> maybeToEitherOr Nothing 3 Left 3
maybeResult :: Result r -> Maybe rfrontmatter Data.Frontmatter Convert a Result value to a Maybe value. A Partial result is treated as failure.
maybeL :: Maybe a -> r -> (a -> r) -> rgeneric-case Generics.Case Same as maybe, except the Maybe comes before the case functions. Equivalent type signature:
maybeL :: forall a r. Analysis (Maybe a) r
The implementation is just:maybeL = gcase @(Maybe a)
maybeR :: forall a r . r -> (a -> r) -> Maybe a -> rgeneric-case Generics.Case maybe, implemented using gcaseR. Equivalent type signature:
maybeR :: forall a r. AnalysisR (Maybe a) r
The implementation is just:maybeR = gcaseR @(Maybe a)
maybeSenderOfEvent :: EventHasMaybeSender eventKind => eventKind -> Maybe HookUsergithub-webhooks GitHub.Data.Webhooks.Events Provides the sender context of a Webhook event.
maybeToM :: MonadFail m => String -> Maybe a -> m ahaxr Network.XmlRpc.Internals Convert a Maybe value to a value in any monad
maybeValue :: Read a => String -> ReadPrec (Maybe a)histogram-fill Data.Histogram.Bin.Read Return optional value
maybeAuthorized :: Yesod site => Route site -> Bool -> HandlerT site IO (Maybe (Route site))hledger-web Hledger.Web.Import 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.