packages feed

boomerang 1.4.3 → 1.4.4

raw patch · 3 files changed

+12/−3 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Text.Boomerang.Error: instance Typeable1 ParserError
+ Text.Boomerang.Error: instance Typeable ParserError
+ Text.Boomerang.Prim: instance Alternative (Parser e tok)
+ Text.Boomerang.Prim: instance Applicative (Parser e tok)
- Text.Boomerang.Combinators: rFalse :: Boomerang e tok r (:- Bool r)
+ Text.Boomerang.Combinators: rFalse :: Boomerang e tok r ((:-) Bool r)
- Text.Boomerang.Combinators: rJust :: Boomerang e tok (:- a_a2FW r) (:- (Maybe a_a2FW) r)
+ Text.Boomerang.Combinators: rJust :: Boomerang e tok ((:-) a_a3zy r) ((:-) (Maybe a_a3zy) r)
- Text.Boomerang.Combinators: rLeft :: Boomerang e tok (:- a_a3R8 r) (:- (Either a_a3R8 b_a3R9) r)
+ Text.Boomerang.Combinators: rLeft :: Boomerang e tok ((:-) a_a5ga r) ((:-) (Either a_a5ga b_a5gb) r)
- Text.Boomerang.Combinators: rNothing :: Boomerang e tok r (:- (Maybe a_a2FW) r)
+ Text.Boomerang.Combinators: rNothing :: Boomerang e tok r ((:-) (Maybe a_a3zy) r)
- Text.Boomerang.Combinators: rRight :: Boomerang e tok (:- b_a3R9 r) (:- (Either a_a3R8 b_a3R9) r)
+ Text.Boomerang.Combinators: rRight :: Boomerang e tok ((:-) b_a5gb r) ((:-) (Either a_a5ga b_a5gb) r)
- Text.Boomerang.Combinators: rTrue :: Boomerang e tok r (:- Bool r)
+ Text.Boomerang.Combinators: rTrue :: Boomerang e tok r ((:-) Bool r)
- Text.Boomerang.HStack: (:-) :: a -> b -> :- a b
+ Text.Boomerang.HStack: (:-) :: a -> b -> (:-) a b

Files

Text/Boomerang/Prim.hs view
@@ -12,8 +12,9 @@  import Prelude             hiding ((.), id) import Control.Arrow       (first)+import Control.Applicative (Applicative(..), Alternative(..)) import Control.Category    (Category((.), id))-import Control.Monad       (MonadPlus(mzero, mplus))+import Control.Monad       (MonadPlus(mzero, mplus), ap) import Control.Monad.Error (Error(..)) import Data.Either         (partitionEithers) import Data.Function       (on)@@ -54,6 +55,10 @@         Parser $ \tok pos ->             map (fmap (first (first f))) (p tok pos) +instance Applicative (Parser e tok) where+    pure  = return+    (<*>) = ap+ instance Monad (Parser e tok) where     return a =         Parser $ \tok pos ->@@ -64,6 +69,10 @@               ([], []) -> []               (errs,[]) -> map Left errs               (_,as) -> concat [ runParser (f a) tok' pos' | ((a, tok'), pos') <- as ]++instance Alternative (Parser e tok) where+    empty = mzero+    (<|>) = mplus  instance MonadPlus (Parser e tok) where     mzero = Parser $ \tok pos -> []
Text/Boomerang/TH.hs view
@@ -54,7 +54,7 @@       let outT = AppT (AppT (ConT ''(:-))                             (foldl AppT (ConT tName) (map (VarT . takeName) tParams)))                       (VarT r')-      runIO $ putStrLn $ "Introducing router " ++ nameBase name' ++ "."+      -- runIO $ putStrLn $ "Introducing router " ++ nameBase name' ++ "."       expr <- [| xpure $(deriveConstructor name (length tys))                      $(deriveDestructor name tys) |]       return [ SigD name'
boomerang.cabal view
@@ -1,5 +1,5 @@ Name:             boomerang-Version:          1.4.3+Version:          1.4.4 License:          BSD3 License-File:     LICENSE Author:           jeremy@seereason.com