Copyright | (c) Justus Sagemüller 2017 |
---|---|
License | GPL v3 |
Maintainer | (@) jsagemue $ uni-koeln.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- class Show a where
- shows :: Show a => a -> ShowS
- ltdPrecShowsPrec :: RealFloat n => Int -> Int -> n -> ShowS
Documentation
A drop-in replacement for Show
. The behaviour is mostly the same:
the result of show
should be valid Haskell code, and read
ing back such a
value should give the original value – but, unlike in Show
, we don't
require this in an exact sense, i.e.
is not necessarily
fulfilled.read
(show
x) == x
Notably for floating-point values, we allow a slight deviation if
it considerably shortens the shown representation: for example,
0.90000004 :: Float
, which can easily come up as
the result of a computation which should in principle be exactly 0.9
, is shown
as 0.9
instead. We do however not commit to any particular fixed precision;
it depends on the type and the order of magnitude which amount of rounding is
appropriate. See the test suite for some examples.
Show Bool Source # | |
Show Char Source # | |
Show Double Source # | |
Show Float Source # | |
Show Int Source # | |
Show Int8 Source # | |
Show Int16 Source # | |
Show Int32 Source # | |
Show Int64 Source # | |
Show Integer Source # | |
Show Natural Source # | |
Show Ordering Source # | |
Show Word Source # | |
Show Word8 Source # | |
Show Word16 Source # | |
Show Word32 Source # | |
Show Word64 Source # | |
Show CallStack Source # | |
Show SomeTypeRep Source # | |
Show () Source # | |
Show TyCon Source # | |
Show Module Source # | |
Show SrcLoc Source # | |
Show Fingerprint Source # | |
Show SomeAsyncException Source # | |
Show IOException Source # | |
Show Deadlock Source # | |
Show CompactionFailed Source # | |
Show BlockedIndefinitelyOnSTM Source # | |
Show BlockedIndefinitelyOnMVar Source # | |
Show AsyncException Source # | |
Show AssertionFailed Source # | |
Show ArrayException Source # | |
Show AllocationLimitExceeded Source # | |
Show MaskingState Source # | |
Show SomeException Source # | |
Show ErrorCall Source # | |
Show ArithException Source # | |
Show TypeError Source # | |
Show RecUpdError Source # | |
Show RecSelError Source # | |
Show RecConError Source # | |
Show PatternMatchFail Source # | |
Show NonTermination Source # | |
Show NoMethodError Source # | |
Show NestedAtomically Source # | |
Show GeneralCategory Source # | |
Show Number Source # | |
Show Lexeme Source # | |
Show CMode Source # | |
Show CInt Source # | |
Show IOMode Source # | |
Show NewlineMode Source # | |
Show Newline Source # | |
Show Handle Source # | |
Show BufferMode Source # | |
Show HandlePosn Source # | |
Show TextEncoding Source # | |
Show SeekMode Source # | |
Show IOErrorType Source # | |
Show ExitCode Source # | |
Show WordPtr Source # | |
Show IntPtr Source # | |
Show CWchar Source # | |
Show CUShort Source # | |
Show CUSeconds Source # | |
Show CULong Source # | |
Show CULLong Source # | |
Show CUIntPtr Source # | |
Show CUIntMax Source # | |
Show CUInt Source # | |
Show CUChar Source # | |
Show CTime Source # | |
Show CSize Source # | |
Show CSigAtomic Source # | |
Show CShort Source # | |
Show CSUSeconds Source # | |
Show CSChar Source # | |
Show CPtrdiff Source # | |
Show CLong Source # | |
Show CLLong Source # | |
Show CIntPtr Source # | |
Show CIntMax Source # | |
Show CFloat Source # | |
Show CDouble Source # | |
Show CClock Source # | |
Show CChar Source # | |
Show CBool Source # | |
Show SomeNat Source # | |
Show SomeSymbol Source # | |
Show SourceUnpackedness Source # | |
Show SourceStrictness Source # | |
Show Fixity Source # | |
Show DecidedStrictness Source # | |
Show Associativity Source # | |
Show Any Source # | |
Show All Source # | |
Show CodingProgress Source # | |
Show CodingFailureMode Source # | |
Show FileLockingNotSupported Source # | |
Show StaticPtrInfo Source # | |
Show Fd Source # | |
Show CUid Source # | |
Show CTimer Source # | |
Show CTcflag Source # | |
Show CSsize Source # | |
Show CSpeed Source # | |
Show CRLim Source # | |
Show CPid Source # | |
Show COff Source # | |
Show CNlink Source # | |
Show CKey Source # | |
Show CIno Source # | |
Show CId Source # | |
Show CGid Source # | |
Show CFsFilCnt Source # | |
Show CFsBlkCnt Source # | |
Show CDev Source # | |
Show CClockId Source # | |
Show CCc Source # | |
Show CBlkSize Source # | |
Show CBlkCnt Source # | |
Show FdKey Source # | |
Show Lifetime Source # | |
Show Event Source # | |
Show Dynamic Source # | |
Show ThreadStatus Source # | |
Show ThreadId Source # | |
Show BlockReason Source # | |
Show Version Source # | |
Show RTSStats Source # | |
Show TraceFlags Source # | |
Show TickyFlags Source # | |
Show RTSFlags Source # | |
Show ProfFlags Source # | |
Show ParFlags Source # | |
Show MiscFlags Source # | |
Show GiveGCStats Source # | |
Show GCFlags Source # | |
Show DoTrace Source # | |
Show DoHeapProfile Source # | |
Show DoCostCentres Source # | |
Show DebugFlags Source # | |
Show ConcFlags Source # | |
Show CCFlags Source # | |
Show Fixity Source # | |
Show DataType Source # | |
Show DataRep Source # | |
Show ConstrRep Source # | |
Show Constr Source # | |
Show Void Source # | |
Show a => Show [a] Source # | |
(Show a, Show b) => Show (a, b) Source # | |
(Show a, Show b, Show c) => Show (a, b, c) Source # | |
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) Source # | |
ltdPrecShowsPrec :: RealFloat n => Int -> Int -> n -> ShowS Source #
displays floating-point values with a precision
of at least ltdPrecShowsPrec
prcnprcn
digits. That does not mean it will necessarily display
that many digits, rather it tries to always choose the shortest representation
with the required precision.