Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type JamoTriple = (Char, Char, Maybe Char)
- fromJamoTriple :: JamoTriple -> Maybe Char
- isHangulSyllable :: Char -> Bool
- toJamoTriple :: Char -> Maybe JamoTriple
Documentation
type JamoTriple = (Char, Char, Maybe Char) Source #
A triple of an initial consonant, a vowel, and an optional final consonant.
fromJamoTriple :: JamoTriple -> Maybe Char Source #
Composes hangul jamo triple into a hangul syllable.
>>>
fromJamoTriple ('ᄀ', 'ᅡ', Nothing)
Just '가'>>>
fromJamoTriple ('ᄀ', 'ᅳ', Just 'ᆯ')
Just '글'
isHangulSyllable :: Char -> Bool Source #
Checks if a character is a hangul letter and a complete syllable.
>>>
isHangulSyllable '가'
True>>>
isHangulSyllable 'ㄱ'
False
toJamoTriple :: Char -> Maybe JamoTriple Source #
Takes a complete hangul syllable apart into consonants and a vowel.
Returns Nothing
for non-hangul letters.
>>>
toJamoTriple '가'
Just ('ᄀ','ᅡ',Nothing)>>>
toJamoTriple '글'
Just ('ᄀ','ᅳ',Just 'ᆯ')>>>
toJamoTriple 'A'
Nothing