Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. subsequences :: [a] -> [[a]]

    ghc-internal GHC.Internal.Data.List

    The subsequences function returns the list of all subsequences of the argument.

    Laziness

    subsequences does not look ahead unless it must:
    >>> take 1 (subsequences undefined)
    [[]]
    
    >>> take 2 (subsequences ('a' : undefined))
    ["","a"]
    

    Examples

    >>> subsequences "abc"
    ["","a","b","ab","c","ac","bc","abc"]
    
    This function is productive on infinite inputs:
    >>> take 8 $ subsequences ['a'..]
    ["","a","b","ab","c","ac","bc","abc"]
    

  2. subsequences :: [a] -> [[a]]

    ghc-internal GHC.Internal.Data.OldList

    The subsequences function returns the list of all subsequences of the argument.

    Laziness

    subsequences does not look ahead unless it must:
    >>> take 1 (subsequences undefined)
    [[]]
    
    >>> take 2 (subsequences ('a' : undefined))
    ["","a"]
    

    Examples

    >>> subsequences "abc"
    ["","a","b","ab","c","ac","bc","abc"]
    
    This function is productive on infinite inputs:
    >>> take 8 $ subsequences ['a'..]
    ["","a","b","ab","c","ac","bc","abc"]
    

  3. sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)

    ghc-internal GHC.Internal.Data.Traversable

    Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

    Examples

    Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.
    >>> sequence $ Right [1,2,3,4]
    [Right 1,Right 2,Right 3,Right 4]
    
    >>> sequence $ [Right 1,Right 2,Right 3,Right 4]
    Right [1,2,3,4]
    
    The following examples demonstrate short circuit behavior for sequence.
    >>> sequence $ Left [1,2,3,4]
    Left [1,2,3,4]
    
    >>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]
    Left 0
    

  4. sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)

    ghc-internal GHC.Internal.Data.Traversable

    Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

    Examples

    Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.
    >>> sequenceA [Just 1, Just 2, Just 3]
    Just [1,2,3]
    
    >>> sequenceA [Right 1, Right 2, Right 3]
    Right [1,2,3]
    
    The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.
    >>> sequenceA [Just 1, Just 2, Just 3, Nothing]
    Nothing
    
    >>> sequenceA [Right 1, Right 2, Right 3, Left 4]
    Left 4
    

  5. class TestEquality (f :: k -> Type)

    ghc-internal GHC.Internal.Data.Type.Equality

    This class contains types where you can learn the equality of two types from information contained in terms. The result should be Just Refl if and only if the types applied to f are equal:

    testEquality (x :: f a) (y :: f b) = Just Refl ⟺ a = b
    
    Typically, only singleton types should inhabit this class. In that case type argument equality coincides with term equality:
    testEquality (x :: f a) (y :: f b) = Just Refl ⟺ a = b ⟺ x = y
    
    isJust (testEquality x y) = x == y
    
    Singleton types are not required, however, and so the latter two would-be laws are not in fact valid in general.

  6. testEquality :: forall (a :: k) (b :: k) . TestEquality f => f a -> f b -> Maybe (a :~: b)

    ghc-internal GHC.Internal.Data.Type.Equality

    Conditionally prove the equality of a and b.

  7. reallyUnsafePtrEquality :: a -> a -> Int#

    ghc-internal GHC.Internal.Exts

    Compare the underlying pointers of two values for equality. Returns 1 if the pointers are equal and 0 otherwise. The two values must be of the same type, of kind Type. See also reallyUnsafePtrEquality#, which doesn't have such restrictions.

  8. seq# :: a -> State# d -> (# State# d, a #)

    ghc-internal GHC.Internal.Exts

    No documentation available.

  9. unsafePtrEquality# :: forall (a :: UnliftedType) (b :: UnliftedType) . a -> b -> Int#

    ghc-internal GHC.Internal.Exts

    Compare the underlying pointers of two unlifted values for equality. This is less dangerous than reallyUnsafePtrEquality, since the arguments are guaranteed to be evaluated. This means there is no risk of accidentally comparing a thunk. It's however still more dangerous than e.g. sameArray#.

  10. eDESTADDRREQ :: Errno

    ghc-internal GHC.Internal.Foreign.C.Error

    No documentation available.

Page 348 of many | Previous | Next