Compiler.Hoopl.Zipper
Documentation
Constructors
| ZFirst :: n C O -> ZBlock n C O | |
| ZMiddle :: n O O -> ZBlock n O O | |
| ZLast :: n O C -> ZBlock n O C | |
| ZCat :: ZBlock n O O -> ZBlock n O O -> ZBlock n O O | |
| ZHead :: ZBlock n C O -> n O O -> ZBlock n C O | |
| ZTail :: n O O -> ZBlock n O C -> ZBlock n O C | |
| ZClosed :: ZBlock n C O -> ZBlock n O C -> ZBlock n C C |
frontBiasBlock :: ZBlock n e x -> ZBlock n e xSource
A block is front biased if the left child of every concatenation operation is a node, not a general block; a front-biased block is analogous to an ordinary list. If a block is front-biased, then its nodes can be traversed from front to back without general recusion; tail recursion suffices. Not all shapes can be front-biased; a closed/open block is inherently back-biased.
backBiasBlock :: ZBlock n e x -> ZBlock n e xSource
A block is back biased if the right child of every concatenation operation is a node, not a general block; a back-biased block is analogous to a snoc-list. If a block is back-biased, then its nodes can be traversed from back to back without general recusion; tail recursion suffices. Not all shapes can be back-biased; an open/closed block is inherently front-biased.