|
definition: |
showDTerm :: DTerm -> String
showDTerm DBot = "_"
showDTerm CutVar = "*"
showDTerm (DCons f []) = f
showDTerm (DCons f args@(x:xs))
| f == ":" && length xs == 1 = -- format list constructor:
showDTerm x ++ ":" ++ showDTerm (head xs)
| take 2 f == "(," = -- format tuple constructors:
"(" ++ intercalate "," (map showDTerm args) ++ ")"
| otherwise =
f ++ "(" ++ intercalate "," (map showDTerm args) ++ ")"
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
show a depth-k term |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{({DBot}) |-> {:} || ({CutVar}) |-> {:} || ({DCons}) |-> _}
|
|
name: |
showDTerm |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
DTerm -> String |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |