module Text.Greek.Phonology.Vowels where

data Vowel = Alpha | Epsilon | Eta | Iota | Omicron | Upsilon | Omega

data Diphthong = Genuine Vowel Vowel | Spurious Vowel Vowel | Improper Vowel  

data VowelLength = Short | Long

data RoundedLip = LipClosed | LipClosedMedium | LipOpen | LipOpenMedium

data TonguePosition = TongueClosed | TongueClosedMedium | TongueOpen | TongueOpenMedium  


data VowelPhoneme =
    VowelPhoneme Vowel VowelLength
  | DiphthongPhoneme Diphthong

alphaShort :: VowelPhoneme
alphaShort = VowelPhoneme Alpha Short

alphaLong :: VowelPhoneme
alphaLong = VowelPhoneme Alpha Long

ouGenuine :: VowelPhoneme
ouGenuine = DiphthongPhoneme (Genuine Omicron Upsilon)

ouSpurious :: VowelPhoneme
ouSpurious = DiphthongPhoneme (Spurious Omicron Omicron)

data Contraction = Contraction
  { target :: VowelPhoneme
  , first :: VowelPhoneme
  , second :: VowelPhoneme
  }

contractions :: [Contraction]
contractions =
  [ Contraction alphaLong alphaShort alphaShort
  , Contraction alphaLong alphaLong alphaShort
  , Contraction alphaLong alphaShort alphaLong
  ]

module Text.Greek.Phonology.Vowels where

data Vowel = Alpha | Epsilon | Eta | Iota | Omicron | Upsilon | Omega

data VowelLength = Short | Long

data RoundedLip = LipClosed | LipClosedMedium | LipOpen | LipOpenMedium

data TonguePosition = TongueClosed | TongueClosedMedium | TongueOpen | TongueOpenMedium  


data VowelPhoneme =
    VowelPhoneme Vowel VowelLength
  | Diphthong Vowel Vowel
  | ImproperDiphthong Vowel

alpha :: VowelLength -> VowelPhoneme
alpha len = VowelPhoneme Alpha len

omicron :: VowelPhoneme
omicron = VowelPhoneme Omicron Short

data Contraction = Contraction
  { target :: VowelPhoneme
  , first :: VowelPhoneme
  , second :: VowelPhoneme
  }

contractions :: [Contraction]
contractions =
  [ Contraction (alpha Long) (alpha Short) (alpha Short)
  , Contraction (alpha Long) (alpha Long) (alpha Short)
  , Contraction (alpha Long) (alpha Short) (alpha Long)
  , Contraction (Diphthong Omicron Upsilon) omicron omicron
  ]

properties :: [(VowelPhoneme, RoundedLip)]
properties =
  [ (alpha Long, LipOpen)
  , (alpha Short, LipOpen)
  ]

Remove spurious/genuine distinction at the phoneme level.
Remove spurious/genuine distinction at the phoneme level.

This distinction can be represented based on what contractions were used to create the phoneme.
