Hoogle Search

Within LTS Haskell 24.46 (ghc-9.10.3)

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

  1. pHPrintOpt :: (MonadIO m, Show a) => CheckColorTty -> OutputOptions -> Handle -> a -> m ()

    pretty-simple Text.Pretty.Simple

    Similar to pPrintOpt, but take a Handle to determine where to print to.

  2. pHPrintString :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Similar to pHPrintString, but take a Handle to print to.

    >>> pHPrintString stdout $ show [ Just (1, "hello"), Nothing ]
    [ Just
    ( 1
    , "hello"
    )
    , Nothing
    ]
    

  3. pHPrintStringDarkBg :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Alias for pHPrintString.

  4. pHPrintStringForceColor :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Similar to pHPrintString, but print in color regardless of whether the output goes to a TTY or not. See pHPrintString for an example of how to use this function.

  5. pHPrintStringForceColorDarkBg :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Alias for pHPrintStringForceColor.

  6. pHPrintStringForceColorLightBg :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Just like pHPrintStringForceColorDarkBg, but for printing to a light background.

  7. pHPrintStringLightBg :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Just like pHPrintStringDarkBg, but for printing to a light background.

  8. pHPrintStringNoColor :: MonadIO m => Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Like pPrintStringNoColor, but take a Handle to determine where to print to.

    >>> pHPrintStringNoColor stdout $ show $ Just ["hello", "bye"]
    Just
    [ "hello"
    , "bye"
    ]
    

  9. pHPrintStringOpt :: MonadIO m => CheckColorTty -> OutputOptions -> Handle -> String -> m ()

    pretty-simple Text.Pretty.Simple

    Similar to pPrintStringOpt, but take a Handle to determine where to print to.

    >>> let foo = show (1, (2, "hello", 3))
    
    >>> pHPrintStringOpt CheckColorTty defaultOutputOptionsNoColor stdout foo
    ( 1
    ,
    ( 2
    , "hello"
    , 3
    )
    )
    

  10. pPrint :: (MonadIO m, Show a) => a -> m ()

    pretty-simple Text.Pretty.Simple

    Pretty-print any data type that has a Show instance. If you've never seen MonadIO before, you can think of this function as having the following type signature:

    pPrint :: Show a => a -> IO ()
    
    This function will only use colors if it detects it's printing to a TTY. This function is for printing to a dark background. Use pPrintLightBg for printing to a terminal with a light background. Different colors are used. Prints to stdout. Use pHPrint to print to a different Handle.
    >>> pPrint [Just (1, "hello")]
    [ Just
    ( 1
    , "hello"
    )
    ]
    

Page 297 of many | Previous | Next