Copyright(c) Andrew Ray, 2017
LicenseMIT
Safe HaskellSafe

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

Synopsis

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

Constructors

Always

Always applicable

Condition `And` Condition

Applicable if both are applicable

If Situation

Applicable if true

IfNot Situation

Applicable if false

Instances

Eq Condition 
Read Condition 
Show Condition 

applicable

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.