Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Printer combinators for printing values of types implementing
Outputable
.
Synopsis
- output :: (HasCallStack, Outputable a) => a -> Printer ()
- showOutputable :: Outputable a => a -> String
Documentation
output :: (HasCallStack, Outputable a) => a -> Printer () Source #
Prints the given value using the type's Outputable
implementation.
The use of this function should be avoided for these reasons:
- It may raise an error due to
showPpr
returning aString
containingn
s. Usenewline
to printn
s. - ghc-lib-parser may change a type's implementation of
Outputable
, causing a sudden test failure. It becomes a maintaince burden. - All comments of the node's children are ignored.
showOutputable :: Outputable a => a -> String Source #
Converts the given value to a String
.