Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. maybeFromByteString :: ByteString -> T T

    midi Sound.MIDI.Message

    No documentation available.

  2. 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
    

  3. 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

  4. 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

  5. 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.

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

    protolude Protolude

    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
    

  7. maybeEmpty :: Monoid b => (a -> b) -> Maybe a -> b

    protolude Protolude.Either

    No documentation available.

  8. maybeToEither :: e -> Maybe a -> Either e a

    protolude Protolude.Either

    No documentation available.

  9. maybeToLeft :: r -> Maybe l -> Either l r

    protolude Protolude.Either

    No documentation available.

  10. maybeToRight :: l -> Maybe r -> Either l r

    protolude Protolude.Either

    No documentation available.

Page 27 of many | Previous | Next