definition:
|
ppJValue :: JValue -> Doc
ppJValue (JBool b) = text (if b then "true" else "false")
ppJValue JNull = text "null"
ppJValue (JInt n) = int n
ppJValue (JNumber x) = float x
ppJValue (JString s) = text $ showJSONString s
ppJValue (JArray vs) = ppJArray vs
ppJValue (JObject ps) = ppJObject (fromJObject ps)
|
demand:
|
argument 1
|
deterministic:
|
deterministic operation
|
documentation:
|
--- Turn a JSON value into a Doc from Curry's Pretty module.
--- JSON numbers are printed as integers if appropriate.
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{({JBool}) |-> {Doc} || ({JNull}) |-> {Doc} || ({JInt}) |-> {Doc} || ({JNumber}) |-> {Doc} || ({JString}) |-> _ || ({JArray}) |-> _ || ({JObject}) |-> _}
|
name:
|
ppJValue
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
JSON.Data.JValue -> Text.PrettyImpl.Doc
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|