packages feed

haskellish 0.1.0 → 0.1.1

raw patch · 2 files changed

+9/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Language.Haskellish: instance GHC.Base.MonadPlus Language.Haskellish.Haskellish

Files

Language/Haskellish.hs view
@@ -2,6 +2,7 @@  import Language.Haskell.Exts import Control.Applicative+import Control.Monad import Data.Either (isRight) import Data.Maybe (catMaybes) @@ -48,7 +49,11 @@     runHaskellish (f x') e     ) +instance MonadPlus Haskellish where+  mzero = empty+  mplus = (<|>) + identifier :: Haskellish String -- note: we don't distinguish between identifiers and symbols identifier = Haskellish f   where f (Paren _ x) = f x@@ -113,9 +118,9 @@ asRightSection :: Haskellish (a -> b -> c) -> Haskellish b -> Haskellish (a -> c) asRightSection opP bP = Haskellish (\e -> do   (opExp,bExp) <- f e-  op <- runHaskellish opP opExp+  op' <- runHaskellish opP opExp   b <- runHaskellish bP bExp-  return $ flip op b+  return $ flip op' b   )   where     f (Paren _ x) = f x@@ -129,6 +134,7 @@   where     f (Qualifier _ e) = Just e     f _ = Nothing+collectDoStatements _ = []  listOfDoStatements :: Haskellish a -> Haskellish [a] listOfDoStatements p = Haskellish (\e -> mapM (runHaskellish p) $ collectDoStatements e)
haskellish.cabal view
@@ -1,5 +1,5 @@ name:                haskellish-version:             0.1.0+version:             0.1.1 synopsis:            For parsing Haskell-ish languages homepage:            http://github.com/dktr0/Haskellish license:             BSD3