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.

  1. maybeToAttr :: (String -> a -> Maybe Attribute) -> String -> Maybe a -> Maybe Attribute

    HaXml Text.XML.HaXml.XmlContent.Parser

    No documentation available.

  2. maybeToEither :: MonadError e m => e -> Maybe a -> m a

    MissingH Data.Either.Utils

    Converts a Maybe value to an Either value, using the supplied parameter as the Left value if the Maybe is Nothing. This function can be interpreted as:

    maybeToEither :: e -> Maybe a -> Either e a
    
    Its definition is given as it is so that it can be used in the Error and related monads.

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

    MissingH Data.String.Utils

    Attempts to parse a value from the front of the string.

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

    ghc-internal GHC.Internal.Data.Maybe

    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
    

  5. maybeNew :: (a -> IO (Ptr b)) -> Maybe a -> IO (Ptr b)

    ghc-internal GHC.Internal.Foreign.Marshal.Utils

    Allocate storage and marshal a storable value wrapped into a Maybe

  6. maybePeek :: (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)

    ghc-internal GHC.Internal.Foreign.Marshal.Utils

    Convert a peek combinator into a one returning Nothing if applied to a nullPtr

  7. maybeWith :: (a -> (Ptr b -> IO c) -> IO c) -> Maybe a -> (Ptr b -> IO c) -> IO c

    ghc-internal GHC.Internal.Foreign.Marshal.Utils

    Converts a withXXX combinator into one marshalling a value wrapped into a Maybe, using nullPtr to represent Nothing.

  8. maybecharopt :: String -> RawOpts -> Maybe Char

    hledger-lib Hledger.Data.RawOptions

    No documentation available.

  9. maybeintopt :: String -> RawOpts -> Maybe Int

    hledger-lib Hledger.Data.RawOptions

    Reads the named option's Int argument, if it is present. An argument that is too small or too large will raise an error.

  10. maybeposintopt :: String -> RawOpts -> Maybe Int

    hledger-lib Hledger.Data.RawOptions

    Reads the named option's natural-number argument, if it is present. An argument that is negative or too large will raise an error.

Page 28 of many | Previous | Next