Text.Syntax.Combinators
- Package
- purescript-invertible-syntax
- Repository
- paulyoung/purescript-invertible-syntax
Derived combinators
#applySecond Source
applySecond :: forall a d. Syntax d => d Unit -> d a -> d aThis variant of <*> ignores its left result. In contrast to its
counterpart derived from the Apply class, the ignored parts have type
d Unit rather than d b because otherwise information relevant for
pretty-printing would be lost.
#(*>) Source
Operator alias for Text.Syntax.Combinators.applySecond (left-associative / precedence 9)
#applyFirst Source
applyFirst :: forall a d. Syntax d => d a -> d Unit -> d aThis variant of <*> ignores its right result. In contrast to its
counterpart derived from the Apply class, the ignored parts have type
d Unit rather than d b because otherwise information relevant for
pretty-printing would be lost.
#skipSpace Source
skipSpace :: forall d. Syntax d => d UnitExpressing whitespace
Parsers and pretty printers treat whitespace differently. Parsers specify
where whitespace is allowed or required to occur, while pretty printers
specify how much whitespace is to be inserted at these locations. To
account for these different roles of whitespace, the following three syntax
descriptions provide fine-grained control over where whitespace is allowed,
desired or required to occur.
skipSpace marks a position where whitespace is allowed to occur. It
accepts arbitrary space while parsing, and produces no space while
printing.