Annotations 0.2.1 → 0.2.2
raw patch · 3 files changed
+9/−3 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Annotations.Bounds: instance Eq Bounds
- Annotations.Bounds: instance Show Bounds
- Annotations.Bounds: leftMargin :: Bounds -> Range
- Annotations.Bounds: rightMargin :: Bounds -> Range
- Annotations.BoundsParser: instance Symbol s => Symbol [s]
- Annotations.Except: instance (Eq e, Eq a) => Eq (Except e a)
- Annotations.Except: instance (Show e, Show a) => Show (Except e a)
- Annotations.Except: instance Functor (Except e)
- Annotations.Except: instance Monoid e => Applicative (Except e)
- Annotations.ExploreHints: exploreDown :: ExploreHints -> Bool
- Annotations.ExploreHints: exploreRight :: ExploreHints -> Bool
- Annotations.ExploreHints: matchHere :: ExploreHints -> Bool
- Annotations.F.Annotated: instance (Eq x, Eq (f a)) => Eq (Ann x f a)
- Annotations.F.Annotated: instance (Show x, Show (f a)) => Show (Ann x f a)
- Annotations.F.Annotated: instance Foldable f => Foldable (Ann x f)
- Annotations.F.Annotated: instance Functor f => Functor (Ann x f)
- Annotations.F.Annotated: instance Traversable f => Traversable (Ann x f)
- Annotations.F.Fixpoints: instance Eq (f (Fix f)) => Eq (Fix f)
- Annotations.F.Fixpoints: instance Show (f (Fix f)) => Show (Fix f)
- Annotations.F.Fixpoints: out :: Fix fT -> fT (Fix fT)
- Annotations.F.Zipper: instance Monoid Nav
- Annotations.F.Zipper: nav :: Nav -> forall a. Zipper a -> Maybe (Zipper a)
- Annotations.F.Zipper: zDown :: Zipper a -> Maybe (Zipper a)
- Annotations.F.Zipper: zFocus :: Zipper a -> a
- Annotations.F.Zipper: zLeft :: Zipper a -> Maybe (Zipper a)
- Annotations.F.Zipper: zRight :: Zipper a -> Maybe (Zipper a)
- Annotations.F.Zipper: zUp :: Zipper a -> Maybe (Zipper a)
- Annotations.MultiRec.Any: Any :: s ix -> ix -> Any s
- Annotations.MultiRec.Any: AnyF :: s ix -> f ix -> AnyF s f
- Annotations.MultiRec.Any: instance ShowFam s => Show (Any s)
- Annotations.MultiRec.ErrorAlg: instance (MkErrorAlg f, MkErrorAlg g) => MkErrorAlg (f :+: g)
- Annotations.MultiRec.ErrorAlg: instance MkErrorAlg U
- Annotations.MultiRec.ErrorAlg: instance MkErrorAlg f => MkErrorAlg (I xi :*: f)
- Annotations.MultiRec.ErrorAlg: instance MkErrorAlg f => MkErrorAlg (K a :*: f)
- Annotations.MultiRec.ErrorAlg: instance MkErrorAlg f => MkErrorAlg (f :>: xi)
- Annotations.MultiRec.Yield: instance (Monad m, Functor m) => Applicative (YieldT x fam m)
- Annotations.MultiRec.Yield: instance (Monad m, HFunctor fam (PF fam), EqS fam, Fam fam) => MonadYield (YieldT x fam m)
- Annotations.MultiRec.Yield: instance Functor m => Functor (YieldT x fam m)
- Annotations.MultiRec.Yield: instance Monad m => Monad (YieldT x fam m)
- Annotations.MultiRec.Yield: instance MonadTrans (YieldT x fam)
- Annotations.MultiRec.Zipper: Empty :: Ctxs phi f a r a
- Annotations.MultiRec.Zipper: Loc :: phi ix -> r ix -> Ctxs phi f ix r a -> Loc phi f r a
- Annotations.MultiRec.Zipper: Push :: phi ix -> Ctx f b r ix -> Ctxs phi f ix r a -> Ctxs phi f b r a
- Annotations.MultiRec.Zipper: instance (Constructor c, Zipper phi f) => Zipper phi (C c f)
- Annotations.MultiRec.Zipper: instance (Zipper phi f, Zipper phi g) => Zipper phi (f :*: g)
- Annotations.MultiRec.Zipper: instance (Zipper phi f, Zipper phi g) => Zipper phi (f :+: g)
- Annotations.MultiRec.Zipper: instance El phi xi => Zipper phi (I xi)
- Annotations.MultiRec.Zipper: instance Zipper phi (K a)
- Annotations.MultiRec.Zipper: instance Zipper phi U
- Annotations.MultiRec.Zipper: instance Zipper phi f => HFunctor phi (Ctx f b)
- Annotations.MultiRec.Zipper: instance Zipper phi f => HFunctor phi (Ctxs phi f b)
- Annotations.MultiRec.Zipper: instance Zipper phi f => HFunctor phi (Loc phi f)
- Annotations.MultiRec.Zipper: instance Zipper phi f => Zipper phi (f :>: xi)
+ Annotations.Bounds: [leftMargin] :: Bounds -> Range
+ Annotations.Bounds: [rightMargin] :: Bounds -> Range
+ Annotations.Bounds: instance GHC.Classes.Eq Annotations.Bounds.Bounds
+ Annotations.Bounds: instance GHC.Show.Show Annotations.Bounds.Bounds
+ Annotations.BoundsParser: instance Annotations.BoundsParser.Symbol s => Annotations.BoundsParser.Symbol [s]
+ Annotations.Except: instance (GHC.Classes.Eq a, GHC.Classes.Eq e) => GHC.Classes.Eq (Annotations.Except.Except e a)
+ Annotations.Except: instance (GHC.Show.Show a, GHC.Show.Show e) => GHC.Show.Show (Annotations.Except.Except e a)
+ Annotations.Except: instance GHC.Base.Functor (Annotations.Except.Except e)
+ Annotations.Except: instance GHC.Base.Monoid e => GHC.Base.Applicative (Annotations.Except.Except e)
+ Annotations.ExploreHints: [exploreDown] :: ExploreHints -> Bool
+ Annotations.ExploreHints: [exploreRight] :: ExploreHints -> Bool
+ Annotations.ExploreHints: [matchHere] :: ExploreHints -> Bool
+ Annotations.F.Annotated: instance (GHC.Classes.Eq (f a), GHC.Classes.Eq x) => GHC.Classes.Eq (Annotations.F.Annotated.Ann x f a)
+ Annotations.F.Annotated: instance (GHC.Show.Show (f a), GHC.Show.Show x) => GHC.Show.Show (Annotations.F.Annotated.Ann x f a)
+ Annotations.F.Annotated: instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Annotations.F.Annotated.Ann x f)
+ Annotations.F.Annotated: instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Annotations.F.Annotated.Ann x f)
+ Annotations.F.Annotated: instance GHC.Base.Functor f => GHC.Base.Functor (Annotations.F.Annotated.Ann x f)
+ Annotations.F.Fixpoints: [out] :: Fix fT -> fT (Fix fT)
+ Annotations.F.Fixpoints: instance GHC.Classes.Eq (f (Annotations.F.Fixpoints.Fix f)) => GHC.Classes.Eq (Annotations.F.Fixpoints.Fix f)
+ Annotations.F.Fixpoints: instance GHC.Show.Show (f (Annotations.F.Fixpoints.Fix f)) => GHC.Show.Show (Annotations.F.Fixpoints.Fix f)
+ Annotations.F.Zipper: [nav] :: Nav -> forall a. Zipper a -> Maybe (Zipper a)
+ Annotations.F.Zipper: [zDown] :: Zipper a -> Maybe (Zipper a)
+ Annotations.F.Zipper: [zFocus] :: Zipper a -> a
+ Annotations.F.Zipper: [zLeft] :: Zipper a -> Maybe (Zipper a)
+ Annotations.F.Zipper: [zRight] :: Zipper a -> Maybe (Zipper a)
+ Annotations.F.Zipper: [zUp] :: Zipper a -> Maybe (Zipper a)
+ Annotations.F.Zipper: instance GHC.Base.Monoid Annotations.F.Zipper.Nav
+ Annotations.MultiRec.Any: [AnyF] :: s ix -> f ix -> AnyF s f
+ Annotations.MultiRec.Any: [Any] :: s ix -> ix -> Any s
+ Annotations.MultiRec.Any: instance Annotations.MultiRec.ShowFam.ShowFam s => GHC.Show.Show (Annotations.MultiRec.Any.Any s)
+ Annotations.MultiRec.ErrorAlg: infixr 5 &
+ Annotations.MultiRec.ErrorAlg: instance (Annotations.MultiRec.ErrorAlg.MkErrorAlg f, Annotations.MultiRec.ErrorAlg.MkErrorAlg g) => Annotations.MultiRec.ErrorAlg.MkErrorAlg (f Generics.MultiRec.Base.:+: g)
+ Annotations.MultiRec.ErrorAlg: instance Annotations.MultiRec.ErrorAlg.MkErrorAlg Generics.MultiRec.Base.U
+ Annotations.MultiRec.ErrorAlg: instance Annotations.MultiRec.ErrorAlg.MkErrorAlg f => Annotations.MultiRec.ErrorAlg.MkErrorAlg (Generics.MultiRec.Base.I xi Generics.MultiRec.Base.:*: f)
+ Annotations.MultiRec.ErrorAlg: instance Annotations.MultiRec.ErrorAlg.MkErrorAlg f => Annotations.MultiRec.ErrorAlg.MkErrorAlg (Generics.MultiRec.Base.K a Generics.MultiRec.Base.:*: f)
+ Annotations.MultiRec.ErrorAlg: instance Annotations.MultiRec.ErrorAlg.MkErrorAlg f => Annotations.MultiRec.ErrorAlg.MkErrorAlg (f Generics.MultiRec.Base.:>: xi)
+ Annotations.MultiRec.Yield: instance (GHC.Base.Monad m, Generics.MultiRec.HFunctor.HFunctor fam (Generics.MultiRec.Base.PF fam), Generics.MultiRec.Base.EqS fam, Generics.MultiRec.Base.Fam fam) => Annotations.MultiRec.Yield.MonadYield (Annotations.MultiRec.Yield.YieldT x fam m)
+ Annotations.MultiRec.Yield: instance Control.Monad.Trans.Class.MonadTrans (Annotations.MultiRec.Yield.YieldT x fam)
+ Annotations.MultiRec.Yield: instance GHC.Base.Functor m => GHC.Base.Functor (Annotations.MultiRec.Yield.YieldT x fam m)
+ Annotations.MultiRec.Yield: instance GHC.Base.Monad m => GHC.Base.Applicative (Annotations.MultiRec.Yield.YieldT x fam m)
+ Annotations.MultiRec.Yield: instance GHC.Base.Monad m => GHC.Base.Monad (Annotations.MultiRec.Yield.YieldT x fam m)
+ Annotations.MultiRec.Yield: type family AnnType m :: *;
+ Annotations.MultiRec.Yield: }
+ Annotations.MultiRec.Zipper: [Empty] :: Ctxs phi f a r a
+ Annotations.MultiRec.Zipper: [Loc] :: phi ix -> r ix -> Ctxs phi f ix r a -> Loc phi f r a
+ Annotations.MultiRec.Zipper: [Push] :: phi ix -> Ctx f b r ix -> Ctxs phi f ix r a -> Ctxs phi f b r a
+ Annotations.MultiRec.Zipper: instance (Annotations.MultiRec.Zipper.Zipper phi f, Annotations.MultiRec.Zipper.Zipper phi g) => Annotations.MultiRec.Zipper.Zipper phi (f Generics.MultiRec.Base.:*: g)
+ Annotations.MultiRec.Zipper: instance (Annotations.MultiRec.Zipper.Zipper phi f, Annotations.MultiRec.Zipper.Zipper phi g) => Annotations.MultiRec.Zipper.Zipper phi (f Generics.MultiRec.Base.:+: g)
+ Annotations.MultiRec.Zipper: instance (Generics.MultiRec.Constructor.Constructor c, Annotations.MultiRec.Zipper.Zipper phi f) => Annotations.MultiRec.Zipper.Zipper phi (Generics.MultiRec.Base.C c f)
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi (Generics.MultiRec.Base.K a)
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi Generics.MultiRec.Base.U
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi f => Annotations.MultiRec.Zipper.Zipper phi (f Generics.MultiRec.Base.:>: xi)
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi f => Generics.MultiRec.HFunctor.HFunctor phi (Annotations.MultiRec.Zipper.Ctx f b)
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi f => Generics.MultiRec.HFunctor.HFunctor phi (Annotations.MultiRec.Zipper.Ctxs phi f b)
+ Annotations.MultiRec.Zipper: instance Annotations.MultiRec.Zipper.Zipper phi f => Generics.MultiRec.HFunctor.HFunctor phi (Annotations.MultiRec.Zipper.Loc phi f)
+ Annotations.MultiRec.Zipper: instance Generics.MultiRec.Base.El phi xi => Annotations.MultiRec.Zipper.Zipper phi (Generics.MultiRec.Base.I xi)
- Annotations.MultiRec.Annotated: findLeftmostDeepest :: Zipper phi (PF phi) => phi ix -> (x -> Bool) -> AnnFix x phi ix -> Maybe (AnnZipper phi x ix)
+ Annotations.MultiRec.Annotated: findLeftmostDeepest :: (Zipper phi (PF phi)) => phi ix -> (x -> Bool) -> AnnFix x phi ix -> Maybe (AnnZipper phi x ix)
- Annotations.MultiRec.Annotated: flatten :: (HFunctor s (PF s), Fam s) => s ix -> AnnFix x s ix -> [(x, Any s)]
+ Annotations.MultiRec.Annotated: flatten :: forall s x ix. (HFunctor s (PF s), Fam s) => s ix -> AnnFix x s ix -> [(x, Any s)]
- Annotations.MultiRec.Any: matchAny :: EqS s => s a -> Any s -> Maybe a
+ Annotations.MultiRec.Any: matchAny :: forall s a. EqS s => s a -> Any s -> Maybe a
- Annotations.MultiRec.Any: matchAnyF :: EqS s => s a -> AnyF s f -> Maybe (f a)
+ Annotations.MultiRec.Any: matchAnyF :: forall s f a. EqS s => s a -> AnyF s f -> Maybe (f a)
- Annotations.MultiRec.Positional: selectByPos :: Zipper phi (PF phi) => phi ix -> Int -> AnnFix Bounds phi ix -> Maybe (AnnZipper phi Bounds ix)
+ Annotations.MultiRec.Positional: selectByPos :: (Zipper phi (PF phi)) => phi ix -> Int -> AnnFix Bounds phi ix -> Maybe (AnnZipper phi Bounds ix)
- Annotations.MultiRec.Yield: class Monad m => MonadYield m where type family YieldFam m :: * -> * type family AnnType m :: *
+ Annotations.MultiRec.Yield: class Monad m => MonadYield m where type YieldFam m :: * -> * type AnnType m :: * where {
Files
- Annotations.cabal +1/−1
- Annotations/F/Fixpoints.hs +7/−1
- LICENSE +1/−1
Annotations.cabal view
@@ -1,5 +1,5 @@ Name: Annotations-Version: 0.2.1+Version: 0.2.2 Synopsis: Constructing, analyzing and destructing annotated trees Description: @Annotations@ provides utility functions to make working with annotated trees easier. There are two implementations: one for working with open datatypes that explicitly make their child positions accessible through a type argument, and one for working with MultiRec datatypes.
Annotations/F/Fixpoints.hs view
@@ -22,7 +22,13 @@ newtype Fix fT = In { out :: fT (Fix fT) } deriving instance Show (f (Fix f)) => Show (Fix f)-deriving instance Eq (f (Fix f)) => Eq (Fix f)+-- deriving instance Eq (f (Fix f)) => Eq (Fix f)+--+-- Deriving this instance results in compilation taking forever on GHC 8.0.1+-- and later (see https://ghc.haskell.org/trac/ghc/ticket/12234). This is+-- a workaround until that issue is fixed.+instance Eq (f (Fix f)) => Eq (Fix f) where+ In x == In y = x == y mapFix :: (f (Fix f) -> g (Fix g)) -> Fix f -> Fix g mapFix f = In . f . out
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2008-2015, Martijn van Steenbergen+Copyright (c) 2008-2016, Martijn van Steenbergen All rights reserved. Redistribution and use in source and binary forms, with or without