Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Show a where
- showsPrec ∷ Integer → a → ShowS
- show ∷ a → BuiltinString
- type ShowS = [BuiltinString] → [BuiltinString]
- showString ∷ BuiltinString → ShowS
- showSpace ∷ ShowS
- showCommaSpace ∷ ShowS
- showParen ∷ Bool → ShowS → ShowS
- appPrec ∷ Integer
- appPrec1 ∷ Integer
- concatBuiltinStrings ∷ [BuiltinString] → BuiltinString
- deriveShow ∷ Name → Q [Dec]
- deriveShowsPrec ∷ [ConstructorInfo] → [Q Dec]
- deriveShowsPrecBody ∷ [ConstructorInfo] → Q Exp
- deriveMatchForCon ∷ Name → ConstructorInfo → Q Match
- deriveShowExpForArg ∷ Integer → Name → Q Exp
- parenInfixConName ∷ Name → String
Documentation
Conversion of values to BuiltinString
s. Unlike GHC.Show.Show
, there is no
showList
method, because there is no Show
instance for String
.
Instances
Show BuiltinByteString Source # | |
Defined in PlutusTx.Show | |
Show BuiltinData Source # | |
Defined in PlutusTx.Show | |
Show BuiltinString Source # | |
Defined in PlutusTx.Show | |
Show Integer Source # | |
Show () Source # | |
Defined in PlutusTx.Show | |
Show Bool Source # | |
Show a ⇒ Show (Maybe a) Source # | |
Show a ⇒ Show [a] Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b) ⇒ Show (Either a b) Source # | |
(Show a, Show b) ⇒ Show (These a b) Source # | |
(Show a, Show b) ⇒ Show (a, b) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c) ⇒ Show (a, b, c) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d) ⇒ Show (a, b, c, d) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e) ⇒ Show (a, b, c, d, e) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f) ⇒ Show (a, b, c, d, e, f) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) ⇒ Show (a, b, c, d, e, f, g) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) ⇒ Show (a, b, c, d, e, f, g, h) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) ⇒ Show (a, b, c, d, e, f, g, h, i) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) ⇒ Show (a, b, c, d, e, f, g, h, i, j) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v, Show w) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v, Show w, Show x) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v, Show w, Show x, Show y) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v, Show w, Show x, Show y, Show z) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) Source # | |
Defined in PlutusTx.Show | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t, Show u, Show v, Show w, Show x, Show y, Show z, Show t26) ⇒ Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) Source # | |
Defined in PlutusTx.Show |
type ShowS = [BuiltinString] → [BuiltinString] Source #
Currently the only way to concatenate BuiltinString
s is appendString
, whose cost
is linear in the total length of the two strings. A naive concatenation of multiple
BuiltinString
s costs O(n^2)
in the worst case, where n
is the total length. By
collecting the BuiltinString
s in a list and concatenating them in the end, the cost
can be reduced to O(n*logn)
. If we add a concatStrings
builtin function in the future,
the cost can be further reduced to O(n)
.
Like ShowS
, the purpose of the function type here is to turn list concatenation
into function composition.
deriveShow ∷ Name → Q [Dec] Source #
Derive Show
instance. Adapted from Text.Show.Deriving.deriveShow
.
deriveShowsPrec ∷ [ConstructorInfo] → [Q Dec] Source #
Derive showsPrec
definition for each data constructor.
deriveMatchForCon ∷ Name → ConstructorInfo → Q Match Source #
Derive showsPrec
body for a single data constructor.
deriveShowExpForArg ∷ Integer → Name → Q Exp Source #
Derive the showsPrec
expression for showing a single constructor argument.
parenInfixConName ∷ Name → String Source #
Add parens if it is an infix data constructor.