Hoogle Search

Within LTS Haskell 24.10 (ghc-9.10.2)

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

  1. shownBoundedEnumCodec :: (Show enum, Eq enum, Enum enum, Bounded enum) => JSONCodec enum

    autodocodec Autodocodec

    A codec for a Bounded Enum that uses its Show instance to have the values correspond to literal Text values.

    Example usage

    >>> data Fruit = Apple | Orange deriving (Show, Eq, Enum, Bounded)
    
    >>> let c = shownBoundedEnumCodec
    
    >>> toJSONVia c Apple
    String "Apple"
    
    >>> JSON.parseMaybe (parseJSONVia c) (String "Orange") :: Maybe Fruit
    Just Orange
    

  2. showCodecABit :: Codec context input output -> String

    autodocodec Autodocodec.Codec

    Show a codec to a human. This function exists for codec debugging. It omits any unshowable information from the output.

  3. shownBoundedEnumCodec :: (Show enum, Eq enum, Enum enum, Bounded enum) => JSONCodec enum

    autodocodec Autodocodec.Codec

    A codec for a Bounded Enum that uses its Show instance to have the values correspond to literal Text values.

    Example usage

    >>> data Fruit = Apple | Orange deriving (Show, Eq, Enum, Bounded)
    
    >>> let c = shownBoundedEnumCodec
    
    >>> toJSONVia c Apple
    String "Apple"
    
    >>> JSON.parseMaybe (parseJSONVia c) (String "Orange") :: Maybe Fruit
    Just Orange
    

  4. showIdeaANSI :: Idea -> String

    hlint Language.Haskell.HLint

    Show an Idea with ANSI color codes to give syntax coloring to the Haskell code.

  5. showLitChar :: Char -> ShowS

    rio RIO.Char

    Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example:

    showLitChar '\n' s  =  "\\n" ++ s
    

  6. showTree :: Whoops "showTree has moved to Data.Map.Internal.Debug.showTree." => Map k a -> String

    rio RIO.Map

    This function has moved to showTree.

  7. showTreeWith :: Whoops "showTreeWith has moved to Data.Map.Internal.Debug.showTreeWith." => (k -> a -> String) -> Bool -> Bool -> Map k a -> String

    rio RIO.Map

    This function has moved to showTreeWith.

  8. showProcessArgDebug :: String -> Text

    rio RIO.Process

    Show a process arg including speechmarks when necessary. Just for debugging purposes, not functionally important.

  9. showTree :: Show a => Set a -> String

    rio RIO.Set

    Show the tree that implements the set. The tree is shown in a compressed, hanging format.

  10. showTreeWith :: Show a => Bool -> Bool -> Set a -> String

    rio RIO.Set

    The expression (showTreeWith hang wide map) shows the tree that implements the set. If hang is True, a hanging tree is shown otherwise a rotated tree is shown. If wide is True, an extra wide version is shown.

    Set> putStrLn $ showTreeWith True False $ fromDistinctAscList [1..5]
    4
    +--2
    |  +--1
    |  +--3
    +--5
    
    Set> putStrLn $ showTreeWith True True $ fromDistinctAscList [1..5]
    4
    |
    +--2
    |  |
    |  +--1
    |  |
    |  +--3
    |
    +--5
    
    Set> putStrLn $ showTreeWith False True $ fromDistinctAscList [1..5]
    +--5
    |
    4
    |
    |  +--3
    |  |
    +--2
    |
    +--1
    

Page 73 of many | Previous | Next