Copyright(c) Andrew Ray, 2017
LicenseMIT
Safe HaskellSafe

SoundChange

Description

SoundChange datatype and environs

Read syntax:

in > out / condition

where in is the input string, out is the output string, condition is the Condition of application. In the event that out or in is empty, the symbol {} may be used, as in h > {} / V_ to indicate loss of syllable-final /h/.

Synopsis

Documentation

data SoundChange

The representation of a sound change.

Instances

applySoundChange

Arguments

:: SoundChange

The sound change rule to apply

-> [SoundGroup]

Map of SoundGroups to use

-> String

String to apply sound change rule to

-> String

String with sound change applied to it

Applies the given SoundChange to the given String

initial :: SoundChange -> String

Returns the initial value, before the sound change

final :: SoundChange -> String

Returns the final value, after the sound change

when :: SoundChange -> Condition

Returns the condition under which the rule applies