packages feed

tokenize 0.2.2 → 0.3.0

raw patch · 3 files changed

+17/−1 lines, 3 files

Files

src/NLP/Tokenize/String.hs view
@@ -19,6 +19,7 @@ import Data.List import Data.Maybe import Control.Monad.Instances+import Control.Applicative import Data.List.Split import Control.Monad @@ -114,6 +115,13 @@ instance Monad (EitherList a) where     return x = E [Right x]     E xs >>= f = E $ concatMap (either (return . Left) (unE . f)) xs++instance Applicative (EitherList a) where+    pure x = return x+    f <*> x = f `ap` x++instance Functor (EitherList a) where+    fmap f (E xs) = E $ (fmap . fmap) f xs  unwrap (Left x) = x unwrap (Right x) = x
src/NLP/Tokenize/Text.hs view
@@ -22,6 +22,7 @@ import qualified Data.Char as Char import Data.Maybe import Control.Monad.Instances ()+import Control.Applicative import Control.Monad  import Data.Text (Text)@@ -128,6 +129,13 @@ instance Monad (EitherList a) where     return x = E [Right x]     E xs >>= f = E $ concatMap (either (return . Left) (unE . f)) xs++instance Applicative (EitherList a) where+    pure x = return x+    f <*> x = f `ap` x++instance Functor (EitherList a) where+    fmap f (E xs) = E $ (fmap . fmap) f xs  unwrap :: Either a a -> a unwrap (Left x) = x
tokenize.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.2.2+Version:             0.3.0  -- A short (one-line) description of the package. Synopsis:            Simple tokenizer for English text.