packages feed

sexp-grammar 2.2.1 → 2.3.0

raw patch · 4 files changed

+20/−20 lines, 4 filesdep +data-fixdep ~deepseqdep ~recursion-schemesPVP ok

version bump matches the API change (PVP)

Dependencies added: data-fix

Dependency ranges changed: deepseq, recursion-schemes

API changes (from Hackage documentation)

- Language.Sexp.Located: newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) :: forall k k1. () => k -> Type -> k1 -> k -> k1 -> Type
- Language.SexpGrammar: data (:-) h t
+ Language.Sexp.Located: [unFix] :: Fix (f :: Type -> Type) -> f (Fix f)
+ Language.Sexp.Located: newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1)
+ Language.SexpGrammar: data h :- t
- Language.Sexp.Located: Compose :: f (g a) -> Compose
+ Language.Sexp.Located: Compose :: f (g a) -> Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1)
- Language.Sexp.Located: Fix :: f (Fix f) -> Fix
+ Language.Sexp.Located: Fix :: f (Fix f) -> Fix (f :: Type -> Type)
- Language.Sexp.Located: [getCompose] :: Compose -> f (g a)
+ Language.Sexp.Located: [getCompose] :: Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) -> f (g a)
- Language.SexpGrammar: (<<<) :: Category cat => cat b c -> cat a b -> cat a c
+ Language.SexpGrammar: (<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
- Language.SexpGrammar: (>>>) :: Category cat => cat a b -> cat b c -> cat a c
+ Language.SexpGrammar: (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- Language.SexpGrammar: hashed :: Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)
+ Language.SexpGrammar: hashed :: Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t'
- Language.SexpGrammar: prefixed :: Prefix -> Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)
+ Language.SexpGrammar: prefixed :: Prefix -> Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t'
- Language.SexpGrammar: quoted :: Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)
+ Language.SexpGrammar: quoted :: Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t'
- Language.SexpGrammar.Generic: [End] :: forall p s (bs :: [Type]) a t. () => Coproduct p s ([] :: [Type]) a t
+ Language.SexpGrammar.Generic: [End] :: forall p s a t. Coproduct p s ('[] :: [Type]) a t
- Language.SexpGrammar.Generic: [With] :: forall p s (bs :: [Type]) a t b (bs1 :: [Type]). () => (Grammar p b (a :- t) -> Grammar p s (a :- t)) -> Coproduct p s bs1 a t -> Coproduct p s (b : bs1) a t
+ Language.SexpGrammar.Generic: [With] :: forall p b a t s (bs1 :: [Type]). (Grammar p b (a :- t) -> Grammar p s (a :- t)) -> Coproduct p s bs1 a t -> Coproduct p s (b : bs1) a t
- Language.SexpGrammar.Generic: match :: (Generic a, MkPrismList (Rep a), Match (Rep a) bs t, bs ~ Coll (Rep a) t) => Coproduct p s bs a t -> Grammar p s (a :- t)
+ Language.SexpGrammar.Generic: match :: forall a (bs :: [Type]) t p s. (Generic a, MkPrismList (Rep a), Match (Rep a) bs t, bs ~ Coll (Rep a) t) => Coproduct p s bs a t -> Grammar p s (a :- t)
- Language.SexpGrammar.Generic: with :: (Generic a, MkPrismList (Rep a), MkStackPrism f, Rep a ~ M1 D d (M1 C c f), StackPrismLhs f t ~ b, Constructor c) => (Grammar p b (a :- t) -> Grammar p s (a :- t)) -> Grammar p s (a :- t)
+ Language.SexpGrammar.Generic: with :: forall a b s t (c :: Meta) (d :: Meta) (f :: Type -> Type) p. (Generic a, MkPrismList (Rep a), MkStackPrism f, Rep a ~ M1 D d (M1 C c f), StackPrismLhs f t ~ b, Constructor c) => (Grammar p b (a :- t) -> Grammar p s (a :- t)) -> Grammar p s (a :- t)

Files

sexp-grammar.cabal view
@@ -1,5 +1,5 @@ name:                sexp-grammar-version:             2.2.1+version:             2.3.0 license:             BSD3 license-file:        LICENSE author:              Yevhen Smolanka, Sergey Vinokurov@@ -46,10 +46,11 @@     , base               >=4.7   && <5.0     , bytestring         >=0.10  && <0.11     , containers         >=0.5.5 && <0.7+    , data-fix           >=0.3   && <0.4     , deepseq            >=1.0   && <2.0     , invertible-grammar >=0.1.3 && <0.2     , prettyprinter      >=1     && <1.8-    , recursion-schemes  >=5.0   && <5.2+    , recursion-schemes  >=5.2   && <5.3     , scientific         >=0.3.3 && <0.4     , semigroups         >=0.16  && <0.20     , text               >=1.2   && <1.3
src/Language/Sexp/Located.hs view
@@ -40,8 +40,8 @@   ) where  import Data.ByteString.Lazy.Char8 (ByteString, unpack)+import Data.Fix (Fix (..)) import Data.Functor.Compose-import Data.Functor.Foldable (Fix (..)) import Data.Scientific (Scientific) import Data.Text (Text) 
src/Language/Sexp/Types.hs view
@@ -22,10 +22,12 @@  import Control.DeepSeq +import Data.Bifunctor++import Data.Fix (Fix (..)) import Data.Functor.Classes import Data.Functor.Compose-import Data.Functor.Foldable (cata, Fix (..))-import Data.Bifunctor+import Data.Functor.Foldable (cata) import Data.Scientific (Scientific) import Data.Text (Text) import Data.Text.Prettyprint.Doc (Pretty (..), colon, (<>))@@ -119,16 +121,13 @@  instance NFData Position -instance NFData (Fix SexpF) where-  rnf = cata alg-    where-      alg :: SexpF () -> ()-      alg = \case-        AtomF a -> rnf a-        ParenListF as -> rnf as-        BracketListF as -> rnf as-        BraceListF as -> rnf as-        ModifiedF q a -> rnf q `seq` rnf a+instance NFData1 SexpF where+  liftRnf f = \case+    AtomF a -> rnf a+    ParenListF as -> liftRnf f as+    BracketListF as -> liftRnf f as+    BraceListF as -> liftRnf f as+    ModifiedF q a -> rnf q `seq` f a -instance NFData (Fix (Compose (LocatedBy Position) SexpF)) where-  rnf = rnf . stripLocation+instance NFData1 (Compose (LocatedBy Position) SexpF) where+  liftRnf f = liftRnf f . extract . getCompose
src/Language/SexpGrammar/Base.hs view
@@ -444,7 +444,7 @@ -- -- >>> encodeWith (hashed symbol) "foo" -- Right "#foo"-hashed :: Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)+hashed :: Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t' hashed g = prefix Hash >>> g  -- | Grammar matching a prefixed S-expression, runs a sub-grammar on a@@ -452,7 +452,7 @@ -- -- >>> encodeWith (quoted symbol) "foo" -- Right "'foo"-quoted :: Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)+quoted :: Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t' quoted g = prefix Quote >>> g  @@ -461,5 +461,5 @@ -- -- >>> encodeWith (prefixed Backtick symbol) "foo" -- Right "`foo"-prefixed :: Prefix -> Grammar Position (Sexp :- t) (a :- t) -> Grammar Position (Sexp :- t) (a :- t)+prefixed :: Prefix -> Grammar Position (Sexp :- t) t' -> Grammar Position (Sexp :- t) t' prefixed m g = prefix m >>> g