HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Generic representation of values

5 declarations
datadata Value
#

Generic Haskell values. NaN and Infinity are represented as constructors. The String in the literals is the text for the literals "as is".

A chain of infix constructors means that they appeared in the input string without parentheses, i.e

1 :+: 2 :*: 3 is represented with InfixCons 1 [(":+:",2),(":*:",3)], whereas

1 :+: (2 :*: 3) is represented with InfixCons 1 [(":+:",InfixCons 2 [(":*:",3)])].

Constructors

Instances2Eq, Show
  • Eq ValueDefined in pretty-show-1.10 · Text.Show.Value
  • Show ValueDefined in pretty-show-1.10 · Text.Show.Value
valuevalToStr :: Value -> String
#

Pretty print a generic value. Our intention is that the result is equivalent to the Show instance for the original value, except possibly easier to understand by a human.

valuevalToDoc :: Value -> Doc
#

Pretty print a generic value. Our intention is that the result is equivalent to the Show instance for the original value, except possibly easier to understand by a human.

Values using the Show class

5 declarations
valueppDoc :: Show a => a -> Doc
#

Try to show a value, prettily. If we do not understand the value, then we just use its standard Show instance.

valuepPrint :: Show a => a -> IO ()
#

Pretty print a generic value to stdout. This is particularly useful in the GHCi interactive environment.

Working with listlike ("foldable") collections

3 declarations
valueppDocList :: (Foldable f, Show a) => f a -> Doc
#

Pretty print something that may be converted to a list as a list. Each entry is on a separate line, which means that we don't do clever pretty printing, and so this works well for large strucutures.

valueppShowList :: (Foldable f, Show a) => f a -> String
#

Pretty print something that may be converted to a list as a list. Each entry is on a separate line, which means that we don't do clever pretty printing, and so this works well for large strucutures.

valuepPrintList :: (Foldable f, Show a) => f a -> IO ()
#

Pretty print something that may be converted to a list as a list. Each entry is on a separate line, which means that we don't do clever pretty printing, and so this works well for large strucutures.

Values using the PrettyVal class

4 declarations
classclass PrettyVal a where
#

A class for types that may be reified into a value. Instances of this class may be derived automatically, for datatypes that support Generics.

Methods

Instances27PrettyVal, …

Rendering values to Html

5 declarations
datadata HtmlOpts
#

Options on how to generate Html (more to come).

Constructors

Instances1Show

Get location of data files

1 declaration

Preprocessing of values

4 declarations
datadata PreProc a
#

This type is used to allow pre-processing of values before showing them.

Constructors

Instances1Show
valueppHideNested :: (Name -> Bool) -> a -> PreProc a
#

Hide the given constructors when showing a value. In addition, hide values if all of their children were hidden.

valuehideCon :: Bool -> (Name -> Bool) -> Value -> Value
#

Hide constrcutros matching the given predicate. If the hidden value is in a record, we also hide the corresponding record field.

If the boolean flag is true, then we also hide constructors all of whose fields were hidden.

Deprecated

1 declaration