packages feed

uu-interleaved 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+11/−7 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

src/Control/Applicative/Interleaved.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE ExistentialQuantification,              ScopedTypeVariables,-             FlexibleInstances #-}+             FlexibleInstances,+             CPP  #-}  -- | This module contains the additional data types, instance definitions and functions to run parsers in an interleaved way. --   If all the interleaved parsers recognise a single connected piece of the input text this incorporates the permutation parsers.@@ -26,8 +27,11 @@  -- import Text.ParserCombinators.UU.Core import Control.Applicative+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 710+import Data.Monoid hiding (Alt)+#else import Data.Monoid-+#endif  infixl 4  <||> infixl 4  <<||> @@ -92,7 +96,7 @@ -- | The function `<||>` is the merging equivalent of `<*>`. Instead of running its two arguments consecutively,  --   the input is split into parts which serve as input for the left operand and parts which are served to the right operand.  -fb2a <||> fb = fb2a <<||> fb <|> flip ($) <$> fb <<||> fb2a+gb2a <||> gb = gb2a <<||> gb <|> flip ($) <$> gb <<||> gb2a  -- | The left hand side operand is gradually transformed so we get access to its first component instance Functor f => Applicative (Gram f) where@@ -112,7 +116,7 @@ instance  Functor f =>  Monad (Gram f) where   return a = Gram [] (Just a)   Gram lb mb >>= b2g_a = -     let bindto :: Functor f => Alt f b -> (b -> Gram f a) -> Alt f a+     let -- bindto :: Functor f => Alt f b -> (b -> Gram f a) -> Alt f a          (f_c2b `Seq`  g_c)   `bindto` b2g_a = f_c2b `Bind` \ c2b  -> c2b <$> g_c   >>= b2g_a          (f_c   `Bind` c2g_b) `bindto` b2g_a = f_c   `Bind` \ c    -> c2g_b c       >>= b2g_a          la = map (`bindto` b2g_a) lb
uu-interleaved.cabal view
@@ -1,5 +1,5 @@ Name:                uu-interleaved-Version:             0.1.0.0+Version:             0.2.0.0 Build-Type:          Simple License:             MIT Copyright:           S Doaitse Swierstra @@ -12,8 +12,8 @@ Synopsis:            Providing an interleaving combinator for use with applicative/alternative style implementations. Description:         This module contains parser library independent code which can be used to describe inlerleaved execution of applicative style structures.                       It is amongst other used in the uu-options package, which provides facilities for parsing command-line options or files containing preferences. -                     It gneralises the permuting parsers and the list merging parsers as e.g. found in the uulib library. For  a fuller description see the Technical Report -                     describing its implementation and application at: http://www.cs.uu.nl/research/techreps/UU-CS-2013-005.html+                     It generalises the permuting parsers and the list merging parsers as e.g. found in the uulib library. For  a more complete description see the Technical Report +                     describing its implementation and use see http://www.cs.uu.nl/research/techreps/UU-CS-2013-005.html Category:            Control, Applicative, Parsing, Text  cabal-version:       >= 1.6