glirc-2.12: Console IRC client

Copyright(c) Eric Mertens, 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe
LanguageHaskell2010

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.

Synopsis

Documentation

data ExpansionChunk Source #

Parsed chunk of an expandable command

Constructors

LiteralChunk Text

regular text

VariableChunk Text

inline variable $x or ${x y}

IntegerChunk Integer

inline variable $1 or ${1}

resolveExpansions Source #

Arguments

:: (Text -> Maybe Text)

variable resolution

-> (Integer -> Maybe Text)

argument index resolution

-> [ExpansionChunk] 
-> Maybe Text