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. liftShowList2 :: Show2 f => (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [f a b] -> ShowS

    base Data.Functor.Classes

    showList function for an application of the type constructor based on showsPrec and showList functions for the argument types. The default implementation using standard list syntax is correct for most types.

  2. liftShowsPrec :: Show1 f => (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS

    base Data.Functor.Classes

    showsPrec function for an application of the type constructor based on showsPrec and showList functions for the argument type.

  3. liftShowsPrec2 :: Show2 f => (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> f a b -> ShowS

    base Data.Functor.Classes

    showsPrec function for an application of the type constructor based on showsPrec and showList functions for the argument types.

  4. traceShow :: Show a => a -> b -> b

    base Debug.Trace

    Like trace, but uses show on the argument to convert it to a String. This makes it convenient for printing the values of interesting variables or expressions inside a function. For example, here we print the values of the variables x and y:

    >>> let f x y = traceShow ("x", x, "y", y) (x + y) in f (1+2) 5
    ("x",3,"y",5)
    8
    
    Note in this example we also create simple labels just by including some strings.

  5. traceShowId :: Show a => a -> a

    base Debug.Trace

    Like traceShow but returns the shown value instead of a third value.

    >>> traceShowId (1+2+3, "hello" ++ "world")
    (6,"helloworld")
    (6,"helloworld")
    

  6. traceShowM :: (Show a, Applicative f) => a -> f ()

    base Debug.Trace

    Like traceM, but uses show on the argument to convert it to a String.

    >>> :{
    do
    x <- Just 3
    traceShowM x
    y <- pure 12
    traceShowM y
    pure (x*2 + y)
    :}
    3
    12
    Just 18
    

  7. traceShowWith :: Show b => (a -> b) -> a -> a

    base Debug.Trace

    Like traceWith, but uses show on the result of the function to convert it to a String.

    >>> traceShowWith length [1,2,3]
    3
    [1,2,3]
    

  8. hShow :: Handle -> IO String

    base System.IO

    hShow is in the IO monad, and gives more comprehensive output than the (pure) instance of Show for Handle.

  9. hShow :: Handle -> IO String

    base GHC.IO.Handle

    hShow is in the IO monad, and gives more comprehensive output than the (pure) instance of Show for Handle.

  10. coarbitraryShow :: Show a => a -> Gen b -> Gen b

    QuickCheck Test.QuickCheck

    coarbitrary helper for lazy people :-).

Page 223 of many | Previous | Next