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.

  1. maybePureIPv6Addr :: Text -> Maybe IPv6Addr

    IPv6Addr Text.IPv6Addr

    Returns Just a pure IPv6Addr, or Nothing.

    maybePureIPv6Addr "::ffff:192.0.2.128" == Just (IPv6Addr "::ffff:c000:280")
    

  2. maybeF :: (a -> b -> a) -> a -> Maybe b -> Maybe a

    algebraic-graphs Algebra.Graph.Internal

    An auxiliary function that tries to apply a function to a base case and a Maybe value and returns Just the result or Just the base case.

  3. maybeToList :: Maybe a -> [a]

    cabal-install-solver Distribution.Solver.Compat.Prelude

    The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.

    Examples

    Basic usage:
    >>> maybeToList (Just 7)
    [7]
    
    >>> maybeToList Nothing
    []
    
    One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> sum $ maybeToList (readMaybe "3")
    3
    
    >>> sum $ maybeToList (readMaybe "")
    0
    

  4. maybeRead :: Read a => String -> Maybe a

    cgi Network.CGI.Protocol

    No documentation available.

  5. maybeBuildTopEntity :: Maybe String -> Name -> Q (TExp (Maybe TopEntity))

    clash-prelude Clash.Annotations.TH

    Return a typed 'Maybe TopEntity' expression given a Name. This will return an TExp of Nothing if TopEntity generation failed.

  6. maybeHasX :: (NFData a, NFDataX a) => a -> Maybe a

    clash-prelude Clash.XException

    Fully evaluate a value, returning Nothing if it throws XException. Note that non-XException errors take precedence over XException ones.

    maybeHasX 42                    = Just 42
    maybeHasX (XException msg)      = Nothing
    maybeHasX (3, XException msg)   = Nothing
    maybeHasX (XException msg, _|_) = _|_
    maybeHasX (_|_, XException msg) = _|_
    maybeHasX (3, _|_)              = _|_
    maybeHasX _|_                   = _|_
    

  7. maybeIsX :: a -> Maybe a

    clash-prelude Clash.XException

    Evaluate a value to WHNF, returning Nothing if it throws XException.

    maybeIsX 42                  = Just 42
    maybeIsX (XException msg)    = Nothing
    maybeIsX (3, XException msg) = Just (3, XException msg)
    maybeIsX (3, _|_)            = Just (3, _|_)
    maybeIsX _|_                 = _|_
    

  8. maybeX :: (String -> b) -> (a -> b) -> MaybeX a -> b

    clash-prelude Clash.XException.MaybeX

    Map functions over both constructors.

  9. maybeC :: forall (m :: Type -> Type) i o a . Monad m => ConduitT i o m (Maybe a) -> ConduitT i o (MaybeT m) a

    classy-prelude-conduit ClassyPrelude.Conduit

    Wrap the base monad in MaybeT Since 1.0.11

  10. maybeRecount :: (Countable a, Countable b) => a -> Maybe b

    countable Data.Countable

    No documentation available.

Page 56 of many | Previous | Next