| Copyright | (c) Andrew Ray, 2017 |
|---|---|
| License | MIT |
| Safe Haskell | Safe |
Condition
Description
Conditions and Situations and their environs
Read syntax:
[!]pre_post [& [!]pre_post [& [!]pre_post ...]]
where pre is the precondition and post is the postcondition
! is used for negation,
& is used to combine conditions,
# is used for beginning or end of word,
_ is used for search pattern characters
Documentation
type Situation = String
A situation, written out as specified in README:
- #: beginning or end of word
- _: replacement characters
data Condition
A condition is one of Always, a pairing of conditions, a situation, or a negated situation, as specified in README:
- !: negates following condition
- &: combines two conditions
Arguments
| :: Condition | The condition to check against |
| -> [SoundGroup] | Map of SoundGroups to use |
| -> String | The example to check |
| -> Int | The position to check in the example |
| -> Bool | True iff the Condition is applicable in this context |
Determines if the condition applies to the given example at the suggested location.