definition:
|
combine :: Doc -> Doc -> Doc -> Doc
combine c d1 d2
| isEmpty d1 = d2
| isEmpty d2 = d1
| otherwise = enclose d1 d2 c
|
demand:
|
arguments 2 3
|
deterministic:
|
deterministic operation
|
documentation:
|
--- The document `(combine c d1 d2)` combines document `d1` and `d2` with
--- document `c` in between using `(<>)` with identity `empty`.
--- Thus, the following equations hold.
---
--- combine c d1 empty == d1
--- combine c empty d2 == d2
--- combine c d1 d2 == d1 <> c <> d2 if neither d1 nor d2 are empty
---
--- @param c - the middle document
--- @param d1 - the left document
--- @param d2 - the right document
--- @return concatenation of d1 and d2 with c in between unless one
--- of the documents is empty
|
failfree:
|
(_, _, _)
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_,_) |-> _}
|
name:
|
combine
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
Text.PrettyImpl.Doc -> Text.PrettyImpl.Doc -> Text.PrettyImpl.Doc
-> Text.PrettyImpl.Doc
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
yes
|
totally-defined:
|
possibly non-reducible on same data term
|