packages feed

cndict 0.6.1 → 0.6.2

raw patch · 2 files changed

+4/−4 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

cndict.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                cndict-version:             0.6.1+version:             0.6.2 synopsis:            Chinese/Mandarin <-> English dictionary, Chinese lexer. -- description: license:             PublicDomain
src/Data/Chinese/Pinyin.hs view
@@ -35,10 +35,10 @@ modToneNumber fn txt   | T.null txt || not (isDigit (T.last txt)) ||     T.last txt > '5' = txt-  | Just n <- T.findIndex (`elem` "ae") txt' = modify n+  | Just n <- T.findIndex (`elem` ("ae"::String)) txt' = modify n   | Just n <- findStrIndex "ou" txt'         = modify n   | Just n <- findSecondVowel txt'           = modify n-  | Just n <- T.findIndex (`elem` "aoeiu") txt' = modify n+  | Just n <- T.findIndex (`elem` ("aoeiu"::String)) txt' = modify n   | otherwise = T.init txt   where     tone = digitToInt (T.last txt)@@ -48,7 +48,7 @@ findSecondVowel :: Text -> Maybe Int findSecondVowel = listToMaybe . drop 1 . findIndices isVowel . T.unpack   where-    isVowel = (`elem` "aoeiu")+    isVowel = (`elem` ("aoeiu"::String))  findStrIndex :: Text -> Text -> Maybe Int findStrIndex key = worker 0