| Copyright | (c) Eric Mertens, 2016 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Client.Commands.Interpolation
Description
This module is able to parse commands with inline variables and then to evaluate those variables to produce a complete command that varies by the current context.
- data ExpansionChunk
- parseExpansion :: Text -> Maybe [ExpansionChunk]
- resolveExpansions :: (Text -> Maybe Text) -> (Integer -> Maybe Text) -> [ExpansionChunk] -> Maybe Text
Documentation
data ExpansionChunk Source #
Parsed chunk of an expandable command
Constructors
| LiteralChunk Text | regular text |
| VariableChunk Text | inline variable |
| IntegerChunk Integer | inline variable |
Instances
parseExpansion :: Text -> Maybe [ExpansionChunk] Source #