packages feed

pandora 0.2.0 → 0.2.1

raw patch · 69 files changed

+424/−373 lines, 69 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Pandora.Core.Morphism: ($) :: (a -> b) -> a -> b
- Pandora.Core.Morphism: (?) :: (a -> b -> c) -> b -> a -> c
- Pandora.Core.Morphism: infixr 0 $
- Pandora.Paradigm.Basis.Conclusion: instance (Pandora.Pattern.Functor.Pointable.Pointable u, Pandora.Pattern.Functor.Bindable.Bindable u) => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Applicative.Applicative u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Junction.Composition.Composition (Pandora.Paradigm.Basis.Conclusion.Conclusion e)
- Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Junction.Transformer.Transformer (Pandora.Paradigm.Basis.Conclusion.Conclusion e)
- Pandora.Paradigm.Basis.Maybe: instance (Pandora.Pattern.Functor.Pointable.Pointable u, Pandora.Pattern.Functor.Bindable.Bindable u) => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Applicative.Applicative u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Pattern.Junction.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Junction.Composition.Composition Pandora.Paradigm.Basis.Maybe.Maybe
- Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Junction.Transformer.Transformer Pandora.Paradigm.Basis.Maybe.Maybe
- Pandora.Paradigm.Basis.Tagged: Tagged :: a -> Tagged tag a
- Pandora.Paradigm.Basis.Tagged: untag :: Tagged tag a -> a
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Bindable.Bindable u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Pattern.Junction.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Bindable.Bindable u => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Pattern.Junction.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Pattern.Junction.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Pattern.Junction.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Pattern.Junction.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Junction.Composition.Composition (Pandora.Paradigm.Inventory.Stateful.Stateful s)
- Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Junction.Transformer.Transformer (Pandora.Paradigm.Inventory.Stateful.Stateful s)
- Pandora.Paradigm.Structure: type family Nonempty (structure :: * -> *)
- Pandora.Paradigm.Structure.Binary: insert :: Chain a => a -> Binary a -> Binary a
- Pandora.Paradigm.Structure.Binary: type Binary = Twister Wye
- Pandora.Paradigm.Structure.Graph: data Graph a
- Pandora.Paradigm.Structure.Graph: instance Pandora.Pattern.Functor.Covariant.Covariant Pandora.Paradigm.Structure.Graph.Graph
- Pandora.Paradigm.Structure.Graph: instance Pandora.Pattern.Functor.Traversable.Traversable Pandora.Paradigm.Structure.Graph.Graph
- Pandora.Paradigm.Structure.Graph: instance Pandora.Pattern.Junction.Composition.Composition Pandora.Paradigm.Structure.Graph.Graph
- Pandora.Paradigm.Structure.Graph: loose :: Traversable t => t a -> Graph a
- Pandora.Paradigm.Structure.Stack: data Stack a
- Pandora.Paradigm.Structure.Stack: filter :: Predicate a -> Stack a -> Stack a
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Alternative.Alternative Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Applicative.Applicative Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Avoidable.Avoidable Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Covariant.Covariant Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Pointable.Pointable Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Functor.Traversable.Traversable Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: instance Pandora.Pattern.Junction.Composition.Composition Pandora.Paradigm.Structure.Stack.Stack
- Pandora.Paradigm.Structure.Stack: linearize :: Traversable t => t ~> Stack
- Pandora.Paradigm.Structure.Stack: pop :: Stack ~> Stack
- Pandora.Paradigm.Structure.Stack: push :: a -> Stack a -> Stack a
- Pandora.Paradigm.Structure.Stack: top :: Stack ~> Maybe
- Pandora.Pattern.Junction.Composition: class Composition t where {
- Pandora.Pattern.Junction.Composition: type family Primary t a :: *;
- Pandora.Pattern.Junction.Composition: unwrap :: Composition t => t a -> Primary t a
- Pandora.Pattern.Junction.Composition: }
- Pandora.Pattern.Junction.Schemes.TU: TU :: ((t :. u) > a) -> TU ct cu t u a
- Pandora.Pattern.Junction.Schemes.TU: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: k1 -> *) (u :: * -> k1). Pandora.Pattern.Junction.Composition.Composition (Pandora.Pattern.Junction.Schemes.TU.TU ct cu t u)
- Pandora.Pattern.Junction.Schemes.TU: newtype TU ct cu t u a
- Pandora.Pattern.Junction.Schemes.TUV: TUV :: ((t :. (u :. v)) > a) -> TUV ct cu cv t u v a
- Pandora.Pattern.Junction.Schemes.TUV: instance forall k1 k2 k3 k4 k5 (ct :: k5) (cu :: k4) (cv :: k3) (t :: k2 -> *) (u :: k1 -> k2) (v :: * -> k1). Pandora.Pattern.Junction.Composition.Composition (Pandora.Pattern.Junction.Schemes.TUV.TUV ct cu cv t u v)
- Pandora.Pattern.Junction.Schemes.TUV: newtype TUV ct cu cv t u v a
- Pandora.Pattern.Junction.Schemes.TUVW: TUVW :: ((t :. (u :. (v :. w))) > a) -> TUVW ct cu cv cw t u v w a
- Pandora.Pattern.Junction.Schemes.TUVW: instance forall k1 k2 k3 k4 k5 k6 k7 (ct :: k7) (cu :: k6) (cv :: k5) (cw :: k4) (t :: k3 -> *) (u :: k2 -> k3) (v :: k1 -> k2) (w :: * -> k1). Pandora.Pattern.Junction.Composition.Composition (Pandora.Pattern.Junction.Schemes.TUVW.TUVW ct cu cv cw t u v w)
- Pandora.Pattern.Junction.Schemes.TUVW: newtype TUVW ct cu cv cw t u v w a
- Pandora.Pattern.Junction.Schemes.UT: UT :: ((u :. t) > a) -> UT ct cu t u a
- Pandora.Pattern.Junction.Schemes.UT: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: * -> k1) (u :: k1 -> *). Pandora.Pattern.Junction.Composition.Composition (Pandora.Pattern.Junction.Schemes.UT.UT ct cu t u)
- Pandora.Pattern.Junction.Schemes.UT: newtype UT ct cu t u a
- Pandora.Pattern.Junction.Schemes.UTU: UTU :: ((u :. t u) > a) -> UTU ct cu t u a
- Pandora.Pattern.Junction.Schemes.UTU: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: (k1 -> *) -> * -> k1) (u :: k1 -> *). Pandora.Pattern.Junction.Composition.Composition (Pandora.Pattern.Junction.Schemes.UTU.UTU ct cu t u)
- Pandora.Pattern.Junction.Schemes.UTU: newtype UTU ct cu t u a
- Pandora.Pattern.Junction.Transformer: class Composition t => Transformer t where {
- Pandora.Pattern.Junction.Transformer: infixr 1 :>
- Pandora.Pattern.Junction.Transformer: lay :: (Transformer t, Covariant u) => u ~> Schema t u
- Pandora.Pattern.Junction.Transformer: type (:>) t u a = Transformer t => Schema t u a
- Pandora.Pattern.Junction.Transformer: type family Schema (t :: * -> *) (u :: * -> *) = (r :: * -> *) | r -> t u;
- Pandora.Pattern.Junction.Transformer: wrap :: (Transformer t, Pointable u) => t ~> Schema t u
- Pandora.Pattern.Junction.Transformer: }
- Pandora.Pattern.Object.Setoid: ifelse :: a -> a -> Boolean -> a
+ Pandora.Core.Morphism: (%) :: (a -> b -> c) -> b -> a -> c
+ Pandora.Paradigm.Basis.Conclusion: instance (Pandora.Pattern.Functor.Pointable.Pointable u, Pandora.Pattern.Functor.Bindable.Bindable u) => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Basis.Conclusion.Conclusion e)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Paradigm.Controlflow.Joint.Transformer.Transformer (Pandora.Paradigm.Basis.Conclusion.Conclusion e)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Applicative.Applicative u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
+ Pandora.Paradigm.Basis.Conclusion: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co (Pandora.Paradigm.Basis.Conclusion.Conclusion e) u)
+ Pandora.Paradigm.Basis.Maybe: instance (Pandora.Pattern.Functor.Pointable.Pointable u, Pandora.Pattern.Functor.Bindable.Bindable u) => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted Pandora.Paradigm.Basis.Maybe.Maybe
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Paradigm.Controlflow.Joint.Transformer.Transformer Pandora.Paradigm.Basis.Maybe.Maybe
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Applicative.Applicative u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
+ Pandora.Paradigm.Basis.Maybe: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co Pandora.Paradigm.Basis.Maybe.Maybe u)
+ Pandora.Paradigm.Basis.Tagged: Tag :: a -> Tagged tag a
+ Pandora.Paradigm.Basis.Tagged: infixr 0 :#
+ Pandora.Paradigm.Basis.Tagged: type (:#) tag = Tagged tag
+ Pandora.Paradigm.Controlflow.Joint.Interpreted: class Interpreted t where {
+ Pandora.Paradigm.Controlflow.Joint.Interpreted: type family Primary t a :: *;
+ Pandora.Paradigm.Controlflow.Joint.Interpreted: unwrap :: Interpreted t => t a -> Primary t a
+ Pandora.Paradigm.Controlflow.Joint.Interpreted: }
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TU: TU :: ((t :. u) := a) -> TU ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TU: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: k1 -> *) (u :: * -> k1). Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Controlflow.Joint.Schemes.TU.TU ct cu t u)
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TU: newtype TU ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUV: TUV :: ((t :. (u :. v)) := a) -> TUV ct cu cv t u v a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUV: instance forall k1 k2 k3 k4 k5 (ct :: k5) (cu :: k4) (cv :: k3) (t :: k2 -> *) (u :: k1 -> k2) (v :: * -> k1). Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV ct cu cv t u v)
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUV: newtype TUV ct cu cv t u v a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW: TUVW :: ((t :. (u :. (v :. w))) := a) -> TUVW ct cu cv cw t u v w a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW: instance forall k1 k2 k3 k4 k5 k6 k7 (ct :: k7) (cu :: k6) (cv :: k5) (cw :: k4) (t :: k3 -> *) (u :: k2 -> k3) (v :: k1 -> k2) (w :: * -> k1). Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW.TUVW ct cu cv cw t u v w)
+ Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW: newtype TUVW ct cu cv cw t u v w a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UT: UT :: ((u :. t) := a) -> UT ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UT: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: * -> k1) (u :: k1 -> *). Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Controlflow.Joint.Schemes.UT.UT ct cu t u)
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UT: newtype UT ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UTU: UTU :: ((u :. t u) := a) -> UTU ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UTU: instance forall k1 k2 k3 (ct :: k3) (cu :: k2) (t :: (k1 -> *) -> * -> k1) (u :: k1 -> *). Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Controlflow.Joint.Schemes.UTU.UTU ct cu t u)
+ Pandora.Paradigm.Controlflow.Joint.Schemes.UTU: newtype UTU ct cu t u a
+ Pandora.Paradigm.Controlflow.Joint.Transformer: class Interpreted t => Transformer t where {
+ Pandora.Paradigm.Controlflow.Joint.Transformer: data (:>) t u a
+ Pandora.Paradigm.Controlflow.Joint.Transformer: infixr 3 :>
+ Pandora.Paradigm.Controlflow.Joint.Transformer: lay :: (Transformer t, Covariant u) => u ~> Schema t u
+ Pandora.Paradigm.Controlflow.Joint.Transformer: type family Schema (t :: * -> *) (u :: * -> *) = (r :: * -> *) | r -> t u;
+ Pandora.Paradigm.Controlflow.Joint.Transformer: wrap :: (Transformer t, Pointable u) => t ~> Schema t u
+ Pandora.Paradigm.Controlflow.Joint.Transformer: }
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted (Pandora.Paradigm.Inventory.Stateful.Stateful s)
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Paradigm.Controlflow.Joint.Transformer.Transformer (Pandora.Paradigm.Inventory.Stateful.Stateful s)
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Bindable.Bindable u => Pandora.Pattern.Functor.Applicative.Applicative (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Bindable.Bindable u => Pandora.Pattern.Functor.Bindable.Bindable (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Covariant.Covariant u => Pandora.Pattern.Functor.Covariant.Covariant (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Monad.Monad u => Pandora.Pattern.Functor.Monad.Monad (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
+ Pandora.Paradigm.Inventory.Stateful: instance Pandora.Pattern.Functor.Pointable.Pointable u => Pandora.Pattern.Functor.Pointable.Pointable (Pandora.Paradigm.Controlflow.Joint.Schemes.TUV.TUV 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co 'Pandora.Core.Functor.Co ((->) s) u ((Pandora.Paradigm.Basis.Product.:*:) s))
+ Pandora.Paradigm.Structure.Cartesian: class Cartesian (t :: * -> *)
+ Pandora.Paradigm.Structure.Nonempty: type family Nonempty (structure :: * -> *)
+ Pandora.Paradigm.Structure.Specific.Binary: insert :: Chain a => a -> Binary a -> Binary a
+ Pandora.Paradigm.Structure.Specific.Binary: type Binary = Twister Wye
+ Pandora.Paradigm.Structure.Specific.Graph: data Graph a
+ Pandora.Paradigm.Structure.Specific.Graph: instance Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted Pandora.Paradigm.Structure.Specific.Graph.Graph
+ Pandora.Paradigm.Structure.Specific.Graph: instance Pandora.Pattern.Functor.Covariant.Covariant Pandora.Paradigm.Structure.Specific.Graph.Graph
+ Pandora.Paradigm.Structure.Specific.Graph: instance Pandora.Pattern.Functor.Traversable.Traversable Pandora.Paradigm.Structure.Specific.Graph.Graph
+ Pandora.Paradigm.Structure.Specific.Graph: loose :: Traversable t => t ~> Graph
+ Pandora.Paradigm.Structure.Specific.Stack: data Stack a
+ Pandora.Paradigm.Structure.Specific.Stack: filter :: Predicate a -> Stack a -> Stack a
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Paradigm.Controlflow.Joint.Interpreted.Interpreted Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Alternative.Alternative Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Applicative.Applicative Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Avoidable.Avoidable Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Covariant.Covariant Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Pointable.Pointable Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: instance Pandora.Pattern.Functor.Traversable.Traversable Pandora.Paradigm.Structure.Specific.Stack.Stack
+ Pandora.Paradigm.Structure.Specific.Stack: linearize :: Traversable t => t ~> Stack
+ Pandora.Paradigm.Structure.Specific.Stack: pop :: Stack ~> Stack
+ Pandora.Paradigm.Structure.Specific.Stack: push :: a -> Stack a -> Stack a
+ Pandora.Paradigm.Structure.Specific.Stack: top :: Stack ~> Maybe
+ Pandora.Pattern.Functor.Divariant: ($) :: Divariant t => t a b -> t a b
+ Pandora.Pattern.Functor.Divariant: infixr 0 $
+ Pandora.Pattern.Object.Setoid: (?) :: Boolean -> a -> a -> a
+ Pandora.Pattern.Object.Setoid: infixr 1 ?
- Pandora.Core.Functor: infixr 0 >
+ Pandora.Core.Functor: infixr 0 :=
- Pandora.Core.Morphism: infixr 9 ?
+ Pandora.Core.Morphism: infixr 9 %
- Pandora.Paradigm.Basis.Continuation: Continuation :: ((((->) ::|:. a) :. t) > r) -> Continuation r t a
+ Pandora.Paradigm.Basis.Continuation: Continuation :: ((((->) ::|:. a) :. t) := r) -> Continuation r t a
- Pandora.Paradigm.Basis.Continuation: [continue] :: Continuation r t a -> (((->) ::|:. a) :. t) > r
+ Pandora.Paradigm.Basis.Continuation: [continue] :: Continuation r t a -> (((->) ::|:. a) :. t) := r
- Pandora.Paradigm.Basis.Free: Impure :: ((t :. Free t) > a) -> Free t a
+ Pandora.Paradigm.Basis.Free: Impure :: ((t :. Free t) := a) -> Free t a
- Pandora.Paradigm.Basis.Twister: (:<) :: a -> ((t :. Twister t) > a) -> Twister t a
+ Pandora.Paradigm.Basis.Twister: (:<) :: a -> ((t :. Twister t) := a) -> Twister t a
- Pandora.Paradigm.Inventory.Stateful: Stateful :: (((->) s :. (:*:) s) > a) -> Stateful s a
+ Pandora.Paradigm.Inventory.Stateful: Stateful :: (((->) s :. (:*:) s) := a) -> Stateful s a
- Pandora.Paradigm.Inventory.Storage: Storage :: (((:*:) p :. (->) p) > a) -> Storage p a
+ Pandora.Paradigm.Inventory.Storage: Storage :: (((:*:) p :. (->) p) := a) -> Storage p a
- Pandora.Paradigm.Inventory.Storage: [stored] :: Storage p a -> ((:*:) p :. (->) p) > a
+ Pandora.Paradigm.Inventory.Storage: [stored] :: Storage p a -> ((:*:) p :. (->) p) := a
- Pandora.Pattern.Functor.Adjoint: epsilon :: Adjoint t u => ((t :. u) > a) -> a
+ Pandora.Pattern.Functor.Adjoint: epsilon :: Adjoint t u => ((t :. u) := a) -> a
- Pandora.Pattern.Functor.Adjoint: eta :: Adjoint t u => a -> (u :. t) > a
+ Pandora.Pattern.Functor.Adjoint: eta :: Adjoint t u => a -> (u :. t) := a
- Pandora.Pattern.Functor.Applicative: (<****>) :: (Applicative t, Applicative u, Applicative v, Applicative w) => ((t :. (u :. (v :. w))) > (a -> b)) -> ((t :. (u :. (v :. w))) > a) -> (t :. (u :. (v :. w))) > b
+ Pandora.Pattern.Functor.Applicative: (<****>) :: (Applicative t, Applicative u, Applicative v, Applicative w) => ((t :. (u :. (v :. w))) := (a -> b)) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b
- Pandora.Pattern.Functor.Applicative: (<***>) :: (Applicative t, Applicative u, Applicative v) => ((t :. (u :. v)) > (a -> b)) -> ((t :. (u :. v)) > a) -> (t :. (u :. v)) > b
+ Pandora.Pattern.Functor.Applicative: (<***>) :: (Applicative t, Applicative u, Applicative v) => ((t :. (u :. v)) := (a -> b)) -> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b
- Pandora.Pattern.Functor.Applicative: (<**>) :: (Applicative t, Applicative u) => ((t :. u) > (a -> b)) -> ((t :. u) > a) -> (t :. u) > b
+ Pandora.Pattern.Functor.Applicative: (<**>) :: (Applicative t, Applicative u) => ((t :. u) := (a -> b)) -> ((t :. u) := a) -> (t :. u) := b
- Pandora.Pattern.Functor.Bindable: join :: Bindable t => ((t :. t) > a) -> t a
+ Pandora.Pattern.Functor.Bindable: join :: Bindable t => ((t :. t) := a) -> t a
- Pandora.Pattern.Functor.Contravariant: (>$$$$<) :: (Contravariant t, Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((t :. (u :. (v :. w))) > a) -> (t :. (u :. (v :. w))) > b
+ Pandora.Pattern.Functor.Contravariant: (>$$$$<) :: (Contravariant t, Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b
- Pandora.Pattern.Functor.Contravariant: (>$$$<) :: (Contravariant t, Contravariant u, Contravariant v) => (a -> b) -> ((t :. (u :. v)) > b) -> (t :. (u :. v)) > a
+ Pandora.Pattern.Functor.Contravariant: (>$$$<) :: (Contravariant t, Contravariant u, Contravariant v) => (a -> b) -> ((t :. (u :. v)) := b) -> (t :. (u :. v)) := a
- Pandora.Pattern.Functor.Contravariant: (>$$<) :: (Contravariant t, Contravariant u) => (a -> b) -> ((t :. u) > a) -> (t :. u) > b
+ Pandora.Pattern.Functor.Contravariant: (>$$<) :: (Contravariant t, Contravariant u) => (a -> b) -> ((t :. u) := a) -> (t :. u) := b
- Pandora.Pattern.Functor.Contravariant: (>&&&&<) :: (Contravariant t, Contravariant u, Contravariant v, Contravariant w) => ((t :. (u :. (v :. w))) > a) -> (a -> b) -> (t :. (u :. (v :. w))) > b
+ Pandora.Pattern.Functor.Contravariant: (>&&&&<) :: (Contravariant t, Contravariant u, Contravariant v, Contravariant w) => ((t :. (u :. (v :. w))) := a) -> (a -> b) -> (t :. (u :. (v :. w))) := b
- Pandora.Pattern.Functor.Contravariant: (>&&&<) :: (Contravariant t, Contravariant u, Contravariant v) => ((t :. (u :. v)) > b) -> (a -> b) -> (t :. (u :. v)) > a
+ Pandora.Pattern.Functor.Contravariant: (>&&&<) :: (Contravariant t, Contravariant u, Contravariant v) => ((t :. (u :. v)) := b) -> (a -> b) -> (t :. (u :. v)) := a
- Pandora.Pattern.Functor.Contravariant: (>&&<) :: (Contravariant t, Contravariant u) => ((t :. u) > a) -> (a -> b) -> (t :. u) > b
+ Pandora.Pattern.Functor.Contravariant: (>&&<) :: (Contravariant t, Contravariant u) => ((t :. u) := a) -> (a -> b) -> (t :. u) := b
- Pandora.Pattern.Functor.Covariant: (<$$$$>) :: (Covariant t, Covariant u, Covariant v, Covariant w) => (a -> b) -> ((t :. (u :. (v :. w))) > a) -> (t :. (u :. (v :. w))) > b
+ Pandora.Pattern.Functor.Covariant: (<$$$$>) :: (Covariant t, Covariant u, Covariant v, Covariant w) => (a -> b) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b
- Pandora.Pattern.Functor.Covariant: (<$$$>) :: (Covariant t, Covariant u, Covariant v) => (a -> b) -> ((t :. (u :. v)) > a) -> (t :. (u :. v)) > b
+ Pandora.Pattern.Functor.Covariant: (<$$$>) :: (Covariant t, Covariant u, Covariant v) => (a -> b) -> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b
- Pandora.Pattern.Functor.Covariant: (<$$>) :: (Covariant t, Covariant u) => (a -> b) -> ((t :. u) > a) -> (t :. u) > b
+ Pandora.Pattern.Functor.Covariant: (<$$>) :: (Covariant t, Covariant u) => (a -> b) -> ((t :. u) := a) -> (t :. u) := b
- Pandora.Pattern.Functor.Covariant: (<&&&&>) :: (Covariant t, Covariant u, Covariant v, Covariant w) => ((t :. (u :. (v :. w))) > a) -> (a -> b) -> (t :. (u :. (v :. w))) > b
+ Pandora.Pattern.Functor.Covariant: (<&&&&>) :: (Covariant t, Covariant u, Covariant v, Covariant w) => ((t :. (u :. (v :. w))) := a) -> (a -> b) -> (t :. (u :. (v :. w))) := b
- Pandora.Pattern.Functor.Covariant: (<&&&>) :: (Covariant t, Covariant u, Covariant v) => ((t :. (u :. v)) > a) -> (a -> b) -> (t :. (u :. v)) > b
+ Pandora.Pattern.Functor.Covariant: (<&&&>) :: (Covariant t, Covariant u, Covariant v) => ((t :. (u :. v)) := a) -> (a -> b) -> (t :. (u :. v)) := b
- Pandora.Pattern.Functor.Covariant: (<&&>) :: (Covariant t, Covariant u) => ((t :. u) > a) -> (a -> b) -> (t :. u) > b
+ Pandora.Pattern.Functor.Covariant: (<&&>) :: (Covariant t, Covariant u) => ((t :. u) := a) -> (a -> b) -> (t :. u) := b
- Pandora.Pattern.Functor.Distributive: (>>-) :: (Distributive u, Covariant t) => t a -> (a -> u b) -> (u :. t) > b
+ Pandora.Pattern.Functor.Distributive: (>>-) :: (Distributive u, Covariant t) => t a -> (a -> u b) -> (u :. t) := b
- Pandora.Pattern.Functor.Distributive: (>>>-) :: (Distributive u, Covariant t, Covariant v) => ((t :. v) > a) -> (a -> u b) -> (u :. (t :. v)) > b
+ Pandora.Pattern.Functor.Distributive: (>>>-) :: (Distributive u, Covariant t, Covariant v) => ((t :. v) := a) -> (a -> u b) -> (u :. (t :. v)) := b
- Pandora.Pattern.Functor.Distributive: (>>>>-) :: (Distributive u, Covariant t, Covariant v, Covariant w) => ((t :. (v :. w)) > a) -> (a -> u b) -> (u :. (t :. (v :. w))) > b
+ Pandora.Pattern.Functor.Distributive: (>>>>-) :: (Distributive u, Covariant t, Covariant v, Covariant w) => ((t :. (v :. w)) := a) -> (a -> u b) -> (u :. (t :. (v :. w))) := b
- Pandora.Pattern.Functor.Distributive: (>>>>>-) :: (Distributive u, Covariant t, Covariant v, Covariant w, Covariant j) => ((t :. (v :. (w :. j))) > a) -> (a -> u b) -> (u :. (t :. (v :. (w :. j)))) > b
+ Pandora.Pattern.Functor.Distributive: (>>>>>-) :: (Distributive u, Covariant t, Covariant v, Covariant w, Covariant j) => ((t :. (v :. (w :. j))) := a) -> (a -> u b) -> (u :. (t :. (v :. (w :. j)))) := b
- Pandora.Pattern.Functor.Distributive: collect :: (Distributive u, Covariant t) => (a -> u b) -> t a -> (u :. t) > b
+ Pandora.Pattern.Functor.Distributive: collect :: (Distributive u, Covariant t) => (a -> u b) -> t a -> (u :. t) := b
- Pandora.Pattern.Functor.Distributive: distribute :: (Distributive u, Covariant t) => ((t :. u) > a) -> (u :. t) > a
+ Pandora.Pattern.Functor.Distributive: distribute :: (Distributive u, Covariant t) => ((t :. u) := a) -> (u :. t) := a
- Pandora.Pattern.Functor.Extendable: duplicate :: Extendable t => t a -> (t :. t) > a
+ Pandora.Pattern.Functor.Extendable: duplicate :: Extendable t => t a -> (t :. t) := a
- Pandora.Pattern.Functor.Traversable: (->>) :: (Traversable t, Pointable u, Applicative u) => t a -> (a -> u b) -> (u :. t) > b
+ Pandora.Pattern.Functor.Traversable: (->>) :: (Traversable t, Pointable u, Applicative u) => t a -> (a -> u b) -> (u :. t) := b
- Pandora.Pattern.Functor.Traversable: (->>>) :: (Traversable t, Pointable u, Applicative u, Traversable v) => ((v :. t) > a) -> (a -> u b) -> (u :. (v :. t)) > b
+ Pandora.Pattern.Functor.Traversable: (->>>) :: (Traversable t, Pointable u, Applicative u, Traversable v) => ((v :. t) := a) -> (a -> u b) -> (u :. (v :. t)) := b
- Pandora.Pattern.Functor.Traversable: (->>>>) :: (Traversable t, Pointable u, Applicative u, Traversable v, Traversable w) => ((w :. (v :. t)) > a) -> (a -> u b) -> (u :. (w :. (v :. t))) > b
+ Pandora.Pattern.Functor.Traversable: (->>>>) :: (Traversable t, Pointable u, Applicative u, Traversable v, Traversable w) => ((w :. (v :. t)) := a) -> (a -> u b) -> (u :. (w :. (v :. t))) := b
- Pandora.Pattern.Functor.Traversable: (->>>>>) :: (Traversable t, Pointable u, Applicative u, Traversable v, Traversable w, Traversable j) => ((j :. (w :. (v :. t))) > a) -> (a -> u b) -> (u :. (j :. (w :. (v :. t)))) > b
+ Pandora.Pattern.Functor.Traversable: (->>>>>) :: (Traversable t, Pointable u, Applicative u, Traversable v, Traversable w, Traversable j) => ((j :. (w :. (v :. t))) := a) -> (a -> u b) -> (u :. (j :. (w :. (v :. t)))) := b
- Pandora.Pattern.Functor.Traversable: sequence :: (Traversable t, Pointable u, Applicative u) => (t :. u) a -> (u :. t) > a
+ Pandora.Pattern.Functor.Traversable: sequence :: (Traversable t, Pointable u, Applicative u) => (t :. u) a -> (u :. t) := a
- Pandora.Pattern.Functor.Traversable: traverse :: (Traversable t, Pointable u, Applicative u) => (a -> u b) -> t a -> (u :. t) > b
+ Pandora.Pattern.Functor.Traversable: traverse :: (Traversable t, Pointable u, Applicative u) => (a -> u b) -> t a -> (u :. t) := b

Files

CHANGELOG.md view
@@ -110,3 +110,18 @@ * Remove all instances for `Junction` schemes * Define type operators for profunctorish types: `::|:.`, `::|.:` and `::|::` * Define `Divariant` (also known as `Profunctor`) `Functor` typeclass++# 0.2.1+* Generalize `$` up to a method of `Divariant` typeclass+* Put concrete data structures to `Specific` submodule+* Move `Nonempty` type family to separated module+* Define `Cartesian` type class+* Rename `?` to `%` to use `?` as boolean multi-if+* Replace `ifelse` method from `Setoid` module+* Convert `:>` to a newtype+* Rename `Composition` class to `Interpreted`+* Rename `Junction` machinery to `Joint` and move it to `Controlflow` module+* Rename `>` type operator to `:=`+* Create `:#` type synonymous for `Tagged` datatype+* Remove `untag` in favor of `extract` method+* Rename `Tagged` constructor of `Tagged` to `Tag`
Pandora/Core/Functor.hs view
@@ -8,8 +8,8 @@ infixr 1 .: type (.:) t u a = u (t a) -infixr 0 >-type (>) t a = t a+infixr 0 :=+type (:=) t a = t a  infixr 2 ::|:., ::|.:, ::|:: type (::|:.) p a b = p (p a b) b
Pandora/Core/Morphism.hs view
@@ -1,10 +1,9 @@-module Pandora.Core.Morphism (identity, fix, (.), ($), (&), (!), (?)) where+module Pandora.Core.Morphism (identity, fix, (.), (&), (!), (%)) where  infixr 8 .-infixr 0 $ infixl 1 & infixr 2 !-infixr 9 ?+infixr 9 %  {-# INLINE identity #-} identity :: a -> a@@ -17,10 +16,6 @@ (.) :: (b -> c) -> (a -> b) -> a -> c f . g = \x -> f (g x) -{-# INLINE ($) #-}-($) :: (a -> b) -> a -> b-f $ x = f x- {-# INLINE (&) #-} (&) :: a -> (a -> b) -> b x & f = f x@@ -29,6 +24,6 @@ (!) :: a -> b -> a x ! _ = x -{-# INLINE (?) #-}-(?) :: (a -> b -> c) -> b -> a -> c-(?) f x y = f y x+{-# INLINE (%) #-}+(%) :: (a -> b -> c) -> b -> a -> c+(%) f x y = f y x
Pandora/Paradigm/Basis/Conclusion.hs view
@@ -1,10 +1,10 @@ module Pandora.Paradigm.Basis.Conclusion (Conclusion (..), conclusion, fail) where  import Pandora.Core.Functor (Variant (Co))-import Pandora.Core.Morphism ((.), ($))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))-import Pandora.Pattern.Junction.Transformer (Transformer (Schema, lay, wrap))-import Pandora.Pattern.Junction.Schemes.UT (UT (UT))+import Pandora.Core.Morphism ((.))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))+import Pandora.Paradigm.Controlflow.Joint.Transformer (Transformer (Schema, lay, wrap))+import Pandora.Paradigm.Controlflow.Joint.Schemes.UT (UT (UT)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Alternative (Alternative ((<+>)))@@ -12,6 +12,7 @@ import Pandora.Pattern.Functor.Traversable (Traversable ((->>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=))) import Pandora.Pattern.Functor.Monad (Monad)+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==)), Boolean (False)) import Pandora.Pattern.Object.Chain (Chain ((<=>)), Ordering (Less, Greater)) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))@@ -43,7 +44,7 @@  instance Monad (Conclusion e) where -instance Composition (Conclusion e) where+instance Interpreted (Conclusion e) where 	type Primary (Conclusion e) a = Conclusion e a 	unwrap x = x 
Pandora/Paradigm/Basis/Constant.hs view
@@ -1,11 +1,11 @@ module Pandora.Paradigm.Basis.Constant (Constant (..)) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Contravariant (Contravariant ((>$<))) import Pandora.Pattern.Functor.Invariant (Invariant (invmap)) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==))) import Pandora.Pattern.Object.Chain (Chain ((<=>))) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))
Pandora/Paradigm/Basis/Continuation.hs view
@@ -1,14 +1,15 @@ module Pandora.Paradigm.Basis.Continuation (Continuation (..), oblige, cwcc, reset, shift) where -import Pandora.Core.Functor (type (:.), type (>), type (::|:.))-import Pandora.Core.Morphism ((.), ($), (!), (?))+import Pandora.Core.Functor (type (:.), type (:=), type (::|:.))+import Pandora.Core.Morphism ((.), (!), (%)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Applicative (Applicative ((<*>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=))) import Pandora.Pattern.Functor.Monad (Monad)+import Pandora.Pattern.Functor.Divariant (($)) -newtype Continuation r t a = Continuation { continue :: (->) ::|:. a :. t > r }+newtype Continuation r t a = Continuation { continue :: (->) ::|:. a :. t := r }  instance Covariant t => Covariant (Continuation r t) where 	f <$> Continuation continuation = Continuation $ continuation . (. f)@@ -30,12 +31,12 @@  -- | Call with current continuation cwcc :: ((a -> Continuation r t b) -> Continuation r t a) -> Continuation r t a-cwcc f = Continuation $ \g -> continue ? g . f $ Continuation . (!) . g+cwcc f = Continuation $ \g -> continue % g . f $ Continuation . (!) . g  -- | Delimit the continuation of any 'shift' reset :: (Bindable t, Pointable t) => Continuation r t r -> Continuation s t r-reset = oblige . continue ? point+reset = oblige . continue % point  -- | Capture the continuation up to the nearest enclosing 'reset' and pass it shift :: Pointable t => ((a -> t r) -> Continuation r t r) -> Continuation r t a-shift f = Continuation $ continue ? point . f+shift f = Continuation $ continue % point . f
Pandora/Paradigm/Basis/Edges.hs view
@@ -1,9 +1,9 @@ module Pandora.Paradigm.Basis.Edges (Edges (..), edges) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))+import Pandora.Pattern.Functor.Divariant (($))  data Edges a = Empty | Connect a | Overlay a 
Pandora/Paradigm/Basis/Free.hs view
@@ -1,7 +1,6 @@ module Pandora.Paradigm.Basis.Free (Free (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism (($))+import Pandora.Core.Functor (type (:.), type (:=)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>))) import Pandora.Pattern.Functor.Avoidable (Avoidable (empty)) import Pandora.Pattern.Functor.Pointable (Pointable (point))@@ -9,8 +8,9 @@ import Pandora.Pattern.Functor.Applicative (Applicative ((<*>))) import Pandora.Pattern.Functor.Traversable (Traversable ((->>), (->>>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=)))+import Pandora.Pattern.Functor.Divariant (($)) -data Free t a = Pure a | Impure (t :. Free t > a)+data Free t a = Pure a | Impure (t :. Free t := a)  instance Covariant t => Covariant (Free t) where 	f <$> Pure x = Pure $ f x
Pandora/Paradigm/Basis/Identity.hs view
@@ -1,6 +1,6 @@ module Pandora.Paradigm.Basis.Identity (Identity (..)) where -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), comap)) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Pointable (Pointable (point))@@ -12,6 +12,7 @@ import Pandora.Pattern.Functor.Monad (Monad) import Pandora.Pattern.Functor.Comonad (Comonad) import Pandora.Pattern.Functor.Adjoint (Adjoint ((-|), (|-)))+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==))) import Pandora.Pattern.Object.Chain (Chain ((<=>))) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))
Pandora/Paradigm/Basis/Jack.hs view
@@ -1,6 +1,6 @@ module Pandora.Paradigm.Basis.Jack (Jack (..), jack) where -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>)), comap) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Extractable (Extractable (extract))@@ -10,6 +10,7 @@ import Pandora.Pattern.Functor.Traversable (Traversable ((->>), traverse)) import Pandora.Pattern.Functor.Distributive (Distributive ((>>-), distribute)) import Pandora.Pattern.Functor.Liftable (Liftable (lift))+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==)), Boolean (False)) import Pandora.Pattern.Object.Chain (Chain ((<=>)), Ordering (Less, Greater)) 
Pandora/Paradigm/Basis/Kan.hs view
@@ -1,8 +1,9 @@ module Pandora.Paradigm.Basis.Kan (Lan (..), Ran (..)) where -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.)) import Pandora.Pattern.Functor.Contravariant (Contravariant ((>$<))) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>)))+import Pandora.Pattern.Functor.Divariant (($))  newtype Lan (t :: * -> *) (u :: * -> *) (b :: *) (a :: *) = 	Lan { lan :: (t b -> a) -> u b }
Pandora/Paradigm/Basis/Maybe.hs view
@@ -1,10 +1,10 @@ module Pandora.Paradigm.Basis.Maybe (Maybe (..), maybe) where  import Pandora.Core.Functor (Variant (Co))-import Pandora.Core.Morphism ((.), ($))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))-import Pandora.Pattern.Junction.Transformer (Transformer (Schema, lay, wrap))-import Pandora.Pattern.Junction.Schemes.UT (UT (UT))+import Pandora.Core.Morphism ((.))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))+import Pandora.Paradigm.Controlflow.Joint.Transformer (Transformer (Schema, lay, wrap))+import Pandora.Paradigm.Controlflow.Joint.Schemes.UT (UT (UT)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>))) import Pandora.Pattern.Functor.Avoidable (Avoidable (empty)) import Pandora.Pattern.Functor.Pointable (Pointable (point))@@ -13,6 +13,7 @@ import Pandora.Pattern.Functor.Traversable (Traversable ((->>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=))) import Pandora.Pattern.Functor.Monad (Monad)+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==)), Boolean (True, False)) import Pandora.Pattern.Object.Chain (Chain ((<=>)), Ordering (Less, Equal, Greater)) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))@@ -50,7 +51,7 @@  instance Monad Maybe where -instance Composition Maybe where+instance Interpreted Maybe where 	type Primary Maybe a = Maybe a 	unwrap x = x 
Pandora/Paradigm/Basis/Predicate.hs view
@@ -1,8 +1,9 @@ module Pandora.Paradigm.Basis.Predicate (Predicate (..)) where -import Pandora.Core.Morphism ((.), ($), (!))+import Pandora.Core.Morphism ((.), (!)) import Pandora.Pattern.Functor.Contravariant (Contravariant ((>$<))) import Pandora.Pattern.Functor.Determinable (Determinable (determine))+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Boolean (True))  newtype Predicate a = Predicate { predicate :: a -> Boolean }
Pandora/Paradigm/Basis/Product.hs view
@@ -1,7 +1,6 @@ module Pandora.Paradigm.Basis.Product (Product (..), type (:*:), Has, Injective 	, delta, swap, attached, curry, uncurry) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))@@ -15,6 +14,7 @@ import Pandora.Pattern.Object.Semilattice (Infimum ((/\)), Supremum ((\/))) import Pandora.Pattern.Object.Lattice (Lattice) import Pandora.Pattern.Object.Group (Group (inverse))+import Pandora.Pattern.Functor.Divariant (($))  infixr 1 :*: 
Pandora/Paradigm/Basis/Tagged.hs view
@@ -1,6 +1,6 @@-module Pandora.Paradigm.Basis.Tagged (Tagged (..), untag, retag, tagself) where+module Pandora.Paradigm.Basis.Tagged (Tagged (..), retag, tagself, type (:#)) where -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Pointable (Pointable (point))@@ -11,6 +11,7 @@ import Pandora.Pattern.Functor.Extendable (Extendable ((=>>))) import Pandora.Pattern.Functor.Monad (Monad) import Pandora.Pattern.Functor.Comonad (Comonad)+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (Setoid ((==))) import Pandora.Pattern.Object.Chain (Chain ((<=>))) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))@@ -20,67 +21,67 @@ import Pandora.Pattern.Object.Lattice (Lattice) import Pandora.Pattern.Object.Group (Group (inverse)) -newtype Tagged tag a = Tagged a+newtype Tagged tag a = Tag a +infixr 0 :#+type (:#) tag = Tagged tag+ instance Covariant (Tagged tag) where-	f <$> Tagged x = Tagged $ f x+	f <$> Tag x = Tag $ f x  instance Pointable (Tagged tag) where-	point = Tagged+	point = Tag  instance Extractable (Tagged tag) where-	extract (Tagged x) = x+	extract (Tag x) = x  instance Applicative (Tagged tag) where-	Tagged f <*> Tagged x = Tagged $ f x+	Tag f <*> Tag x = Tag $ f x  instance Traversable (Tagged tag) where-	Tagged x ->> f = Tagged <$> f x+	Tag x ->> f = Tag <$> f x  instance Distributive (Tagged tag) where-	x >>- f = Tagged $ extract . f <$> x+	x >>- f = Tag $ extract . f <$> x  instance Bindable (Tagged tag) where-	Tagged x >>= f = f x+	Tag x >>= f = f x  instance Monad (Tagged tag)  instance Extendable (Tagged tag) where-	x =>> f = Tagged . f $ x+	x =>> f = Tag . f $ x  instance Comonad (Tagged tag)  instance Setoid a => Setoid (Tagged tag a) where-	Tagged x == Tagged y = x == y+	Tag x == Tag y = x == y  instance Chain a => Chain (Tagged tag a) where-	Tagged x <=> Tagged y = x <=> y+	Tag x <=> Tag y = x <=> y  instance Semigroup a => Semigroup (Tagged tag a) where-	Tagged x + Tagged y = Tagged $ x + y+	Tag x + Tag y = Tag $ x + y  instance Monoid a => Monoid (Tagged tag a) where-	 zero = Tagged zero+	 zero = Tag zero  instance Ringoid a => Ringoid (Tagged tag a) where-	Tagged x * Tagged y = Tagged $ x * y+	Tag x * Tag y = Tag $ x * y  instance Infimum a => Infimum (Tagged tag a) where-	Tagged x /\ Tagged y = Tagged $ x /\ y+	Tag x /\ Tag y = Tag $ x /\ y  instance Supremum a => Supremum (Tagged tag a) where-	Tagged x \/ Tagged y = Tagged $ x \/ y+	Tag x \/ Tag y = Tag $ x \/ y  instance Lattice a => Lattice (Tagged tag a) where  instance Group a => Group (Tagged tag a) where-	inverse (Tagged x) = Tagged $ inverse x--untag :: Tagged tag a -> a-untag (Tagged x) = x+	inverse (Tag x) = Tag $ inverse x  retag :: Tagged old a -> Tagged new a-retag (Tagged x) = Tagged x+retag (Tag x) = Tag x  tagself :: a -> Tagged a a-tagself = Tagged+tagself = Tag
Pandora/Paradigm/Basis/Twister.hs view
@@ -1,6 +1,6 @@ module Pandora.Paradigm.Basis.Twister (Twister (..), untwist, coiterate, section) where -import Pandora.Core.Functor (type (:.), type (>))+import Pandora.Core.Functor (type (:.), type (:=)) import Pandora.Core.Transformation (type (~>)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>), comap)) import Pandora.Pattern.Functor.Avoidable (Avoidable (empty))@@ -19,7 +19,7 @@  infixr 5 :< -data Twister t a = a :< (t :. Twister t > a)+data Twister t a = a :< (t :. Twister t := a)  instance Covariant t => Covariant (Twister t) where 	f <$> (x :< xs) = f x :< (f <$$> xs)
Pandora/Paradigm/Basis/Validation.hs view
@@ -1,11 +1,11 @@ module Pandora.Paradigm.Basis.Validation (Validation (..)) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Applicative (Applicative ((<*>))) import Pandora.Pattern.Functor.Alternative (Alternative ((<+>))) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Semigroup (Semigroup ((+)))  data Validation e a = Flaws e | Validated a
Pandora/Paradigm/Basis/Variation.hs view
@@ -1,9 +1,9 @@ module Pandora.Paradigm.Basis.Variation (Variation (..), variation) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))+import Pandora.Pattern.Functor.Divariant (($))  data Variation e a = This a | That e | These e a 
Pandora/Paradigm/Basis/Wye.hs view
@@ -1,10 +1,10 @@ module Pandora.Paradigm.Basis.Wye (Wye (..), wye) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Applicative (Applicative ((<*>))) import Pandora.Pattern.Functor.Traversable (Traversable ((->>)))+import Pandora.Pattern.Functor.Divariant (($))  data Wye a = End | Left a | Right a | Both a a 
Pandora/Paradigm/Basis/Yoneda.hs view
@@ -1,6 +1,6 @@ module Pandora.Paradigm.Basis.Yoneda (Yoneda (..)) where -import Pandora.Core.Morphism ((.), ($), (!), identity)+import Pandora.Core.Morphism ((.), (!), identity) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), comap)) import Pandora.Pattern.Functor.Alternative (Alternative ((<+>))) import Pandora.Pattern.Functor.Applicative (Applicative ((<*>)))@@ -8,6 +8,7 @@ import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Adjoint (Adjoint (phi, psi))+import Pandora.Pattern.Functor.Divariant (($))  newtype Yoneda t a = Yoneda 	{ yoneda :: forall b . (a -> b) -> t b }
+ Pandora/Paradigm/Controlflow/Joint.hs view
@@ -0,0 +1,5 @@+module Pandora.Paradigm.Controlflow.Joint (module Exports) where++import Pandora.Paradigm.Controlflow.Joint.Schemes as Exports+import Pandora.Paradigm.Controlflow.Joint.Transformer as Exports+import Pandora.Paradigm.Controlflow.Joint.Interpreted as Exports
+ Pandora/Paradigm/Controlflow/Joint/Interpreted.hs view
@@ -0,0 +1,6 @@+module Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (..)) where++class Interpreted t where+	{-# MINIMAL unwrap #-}+	type Primary t a :: *+	unwrap :: t a -> Primary t a
+ Pandora/Paradigm/Controlflow/Joint/Schemes.hs view
@@ -0,0 +1,7 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes (module Exports) where++import Pandora.Paradigm.Controlflow.Joint.Schemes.UTU as Exports+import Pandora.Paradigm.Controlflow.Joint.Schemes.UT as Exports+import Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW as Exports+import Pandora.Paradigm.Controlflow.Joint.Schemes.TUV as Exports+import Pandora.Paradigm.Controlflow.Joint.Schemes.TU as Exports
+ Pandora/Paradigm/Controlflow/Joint/Schemes/TU.hs view
@@ -0,0 +1,10 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes.TU (TU (..)) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++newtype TU ct cu t u a = TU (t :. u := a)++instance Interpreted (TU ct cu t u) where+	type Primary (TU ct cu t u) a = t :. u := a+	unwrap (TU x) = x
+ Pandora/Paradigm/Controlflow/Joint/Schemes/TUV.hs view
@@ -0,0 +1,10 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes.TUV (TUV (..)) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++newtype TUV ct cu cv t u v a = TUV (t :. u :. v := a)++instance Interpreted (TUV ct cu cv t u v) where+	type Primary (TUV ct cu cv t u v) a = t :. u :. v := a+	unwrap (TUV x) = x
+ Pandora/Paradigm/Controlflow/Joint/Schemes/TUVW.hs view
@@ -0,0 +1,10 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW (TUVW (..)) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++newtype TUVW ct cu cv cw t u v w a = TUVW (t :. u :. v :. w := a)++instance Interpreted (TUVW ct cu cv cw t u v w) where+	type Primary (TUVW ct cu cv cw t u v w) a = t :. u :. v :. w := a+	unwrap (TUVW x) = x
+ Pandora/Paradigm/Controlflow/Joint/Schemes/UT.hs view
@@ -0,0 +1,10 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes.UT (UT (..)) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++newtype UT ct cu t u a = UT (u :. t := a)++instance Interpreted (UT ct cu t u) where+	type Primary (UT ct cu t u) a = u :. t := a+	unwrap (UT x) = x
+ Pandora/Paradigm/Controlflow/Joint/Schemes/UTU.hs view
@@ -0,0 +1,10 @@+module Pandora.Paradigm.Controlflow.Joint.Schemes.UTU (UTU (..)) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++newtype UTU ct cu t u a = UTU (u :. t u := a)++instance Interpreted (UTU ct cu t u) where+	type Primary (UTU ct cu t u) a = u :. t u := a+	unwrap (UTU x) = x
+ Pandora/Paradigm/Controlflow/Joint/Transformer.hs view
@@ -0,0 +1,18 @@+module Pandora.Paradigm.Controlflow.Joint.Transformer (Transformer (..), type (:>)) where++import Pandora.Core.Transformation (type (~>))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted)+import Pandora.Pattern.Functor.Covariant (Covariant)+import Pandora.Pattern.Functor.Pointable (Pointable)++class Interpreted t => Transformer t where+	{-# MINIMAL lay, wrap #-}+	type Schema (t :: * -> *) (u :: * -> *) = (r :: * -> *) | r -> t u+	lay :: Covariant u => u ~> Schema t u+	wrap :: Pointable u => t ~> Schema t u++-- infixr 1 :>+-- type (:>) t u a = Transformer t => Schema t u a++infixr 3 :>+newtype (:>) t u a = T { trans :: Transformer t => Schema t u a }
Pandora/Paradigm/Controlflow/Observable.hs view
@@ -1,9 +1,10 @@ module Pandora.Paradigm.Controlflow.Observable (Observable, observe, 	notify, follow, subscribe, watch, (.:~.), (.:~*), (*:~.), (*:~*)) where -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.)) import Pandora.Paradigm.Basis.Continuation (Continuation (Continuation, continue)) import Pandora.Pattern.Functor.Applicative (Applicative (forever))+import Pandora.Pattern.Functor.Divariant (($))  newtype Capture r t a = Capture { captured :: t r } 
Pandora/Paradigm/Controlflow/Pipeline.hs view
@@ -1,11 +1,11 @@ module Pandora.Paradigm.Controlflow.Pipeline (Pipeline, await, yield, finish, impact, (=*=), pipeline) where -import Pandora.Core.Morphism (($)) import Pandora.Paradigm.Basis.Continuation (Continuation (Continuation, continue)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Contravariant (Contravariant ((>$<))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=)))+import Pandora.Pattern.Functor.Divariant (($))  newtype Producer i t r = Producer { produce :: Consumer i t r -> t r } 
Pandora/Paradigm/Inventory/Environmental.hs view
@@ -1,11 +1,12 @@ module Pandora.Paradigm.Inventory.Environmental (Environmental (..), env, local) where -import Pandora.Core.Morphism (identity, (.), ($), (!))+import Pandora.Core.Morphism (identity, (.), (!)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Pointable (Pointable (point)) import Pandora.Pattern.Functor.Applicative (Applicative ((<*>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=))) import Pandora.Pattern.Functor.Monad (Monad)+import Pandora.Pattern.Functor.Divariant (($))  newtype Environmental e a = Environmental (e -> a) @@ -16,7 +17,7 @@ 	f <$> Environmental x = Environmental $ f . x  instance Pointable (Environmental e) where-	point x = Environmental $ (x !)+	point x = Environmental (x !)  instance Applicative (Environmental e) where 	f <*> x = Environmental $ \e -> environmentally e f $ environmentally e x
Pandora/Paradigm/Inventory/Optics.hs view
@@ -1,13 +1,14 @@ module Pandora.Paradigm.Inventory.Optics 	(Lens, type (:-.), (|>), view, set, over, (^.), (.~), (%~)) where -import Pandora.Core.Morphism ((.), ($), (!))+import Pandora.Core.Morphism ((.), (!)) import Pandora.Paradigm.Basis.Product (Product ((:*:))) import Pandora.Paradigm.Inventory.Stateful (Stateful (Stateful), statefully) import Pandora.Paradigm.Inventory.Storage (Storage (Storage), access, position, retrofit) import Pandora.Pattern.Functor.Covariant (Covariant ((<$))) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Adjoint (Adjoint ((-|), (|-)))+import Pandora.Pattern.Functor.Divariant (($))  instance Adjoint (Storage s) (Stateful s) where 	v -| f = Stateful $ \s -> (:*:) s . f . Storage $ s :*: (v !)
Pandora/Paradigm/Inventory/Stateful.hs view
@@ -1,11 +1,11 @@ module Pandora.Paradigm.Inventory.Stateful 	(Stateful (..), statefully, get, modify, put, fold, find) where -import Pandora.Core.Functor (Variant (Co), type (:.), type (>))-import Pandora.Core.Morphism ((.), ($))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))-import Pandora.Pattern.Junction.Transformer (Transformer (Schema, lay, wrap))-import Pandora.Pattern.Junction.Schemes.TUV (TUV (TUV))+import Pandora.Core.Functor (Variant (Co), type (:.), type (:=))+import Pandora.Core.Morphism ((.))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))+import Pandora.Paradigm.Controlflow.Joint.Transformer (Transformer (Schema, lay, wrap))+import Pandora.Paradigm.Controlflow.Joint.Schemes.TUV (TUV (TUV)) import Pandora.Paradigm.Basis.Predicate (Predicate (predicate)) import Pandora.Paradigm.Basis.Product (Product ((:*:)), type (:*:), attached, delta, uncurry) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), ($>), (<$$>)))@@ -17,9 +17,10 @@ import Pandora.Pattern.Functor.Traversable (Traversable ((->>))) import Pandora.Pattern.Functor.Bindable (Bindable ((>>=))) import Pandora.Pattern.Functor.Monad (Monad)+import Pandora.Pattern.Functor.Divariant (($)) import Pandora.Pattern.Object.Setoid (bool) -newtype Stateful s a = Stateful ((->) s :. (:*:) s > a)+newtype Stateful s a = Stateful ((->) s :. (:*:) s := a)  statefully :: s -> Stateful s a -> s :*: a statefully initial (Stateful state) = state initial@@ -57,8 +58,8 @@ find :: (Pointable u, Avoidable u, Alternative u, Traversable t) => Predicate a -> t a -> u a find p struct = fold empty (\x s -> (<+>) s . bool empty (point x) . predicate p $ x) struct -instance Composition (Stateful s) where-	type Primary (Stateful s) a = (->) s :. (:*:) s > a+instance Interpreted (Stateful s) where+	type Primary (Stateful s) a = (->) s :. (:*:) s := a 	unwrap (Stateful x) = x  instance Transformer (Stateful s) where
Pandora/Paradigm/Inventory/Storage.hs view
@@ -1,14 +1,15 @@ module Pandora.Paradigm.Inventory.Storage (Storage (..), position, access, retrofit) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((.), ($), (?))+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism ((.), (%)) import Pandora.Paradigm.Basis.Product (Product ((:*:)), type (:*:)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>))) import Pandora.Pattern.Functor.Extractable (Extractable (extract)) import Pandora.Pattern.Functor.Extendable (Extendable ((=>>))) import Pandora.Pattern.Functor.Comonad (Comonad)+import Pandora.Pattern.Functor.Divariant (($)) -newtype Storage p a = Storage { stored :: (:*:) p :. (->) p > a }+newtype Storage p a = Storage { stored :: (:*:) p :. (->) p := a }  instance Covariant (Storage p) where 	g <$> Storage (p :*: f) = Storage . (:*:) p $ (g .) f@@ -26,7 +27,7 @@ position (Storage (p :*: _)) = p  access :: p -> Storage p a -> a-access p = extract ? p . stored+access p = extract % p . stored  retrofit :: (p -> p) -> Storage p a -> Storage p a retrofit g (Storage (p :*: f)) = Storage $ g p :*: f
Pandora/Paradigm/Structure.hs view
@@ -1,12 +1,6 @@-module Pandora.Paradigm.Structure (module Exports, Nonempty) where--import Pandora.Paradigm.Structure.Binary as Exports-import Pandora.Paradigm.Structure.Graph as Exports-import Pandora.Paradigm.Structure.Stack as Exports--import Pandora.Paradigm.Basis.Maybe (Maybe)-import Pandora.Paradigm.Basis.Twister (Twister)+module Pandora.Paradigm.Structure (module Exports) where --- | Type synonymous for at least one element data structure-type family Nonempty (structure :: * -> *) where-	Nonempty Stack = Twister Maybe+import Pandora.Paradigm.Structure.Nonempty as Exports+import Pandora.Paradigm.Structure.Specific.Binary as Exports+import Pandora.Paradigm.Structure.Specific.Graph as Exports+import Pandora.Paradigm.Structure.Specific.Stack as Exports
− Pandora/Paradigm/Structure/Binary.hs
@@ -1,14 +0,0 @@-module Pandora.Paradigm.Structure.Binary (Binary, insert) where--import Pandora.Core.Morphism ((&))-import Pandora.Paradigm.Basis.Wye (Wye (End, Left, Right, Both))-import Pandora.Paradigm.Basis.Twister (Twister ((:<)))-import Pandora.Pattern.Object.Chain (Chain ((<=>)), order)--type Binary = Twister Wye--insert :: Chain a => a -> Binary a -> Binary a-insert x (y :< End) = x <=> y & order (y :< Right (x :< End)) (y :< Right (x :< End)) (y :< Left (x :< End))-insert x (y :< Left ls) = x <=> y & order (y :< Both ls (x :< End)) (y :< Both ls (x :< End)) (y :< Left (insert x ls))-insert x (y :< Right rs) = x <=> y & order (y :< Right (insert x rs)) (y :< Right (insert x rs)) (y :< Both (x :< End) rs)-insert x (y :< Both ls rs) = x <=> y & order (y :< Both ls (insert x rs)) (y :< Both ls (insert x rs)) (y :< Both (insert x ls) rs)
+ Pandora/Paradigm/Structure/Cartesian.hs view
@@ -0,0 +1,8 @@+module Pandora.Paradigm.Structure.Cartesian (Cartesian) where++import Pandora.Paradigm.Basis.Product (type (:*:))++class Cartesian (t :: * -> *) where+	{-# MINIMAL (-:*:-) #-}+	(-:*:-) :: t a -> t b -> t (a :*: b)+	cartesian :: t a -> t b -> t (a :*: b)
− Pandora/Paradigm/Structure/Graph.hs
@@ -1,27 +0,0 @@-module Pandora.Paradigm.Structure.Graph (Graph, loose) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((.), ($))-import Pandora.Paradigm.Basis.Edges (Edges (Empty, Overlay))-import Pandora.Paradigm.Basis.Twister (Twister ((:<)))-import Pandora.Paradigm.Inventory.Stateful (fold)-import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>)))-import Pandora.Pattern.Functor.Traversable (Traversable ((->>), (->>>)))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))---- | Acyclic graph structure without loops-newtype Graph a = Graph (Edges :. Twister Edges > a)--instance Covariant Graph where-	f <$> Graph stack = Graph $ f <$$> stack--instance Traversable Graph where-	Graph stack ->> f = Graph <$> stack ->>> f--instance Composition Graph where-	type Primary Graph a = Edges :. Twister Edges > a-	unwrap (Graph stack) = stack---- | Transform any traversable structure into all loose edges graph-loose :: Traversable t => t a -> Graph a-loose = Graph . fold Empty (\x -> Overlay . (:<) x)
+ Pandora/Paradigm/Structure/Nonempty.hs view
@@ -0,0 +1,9 @@+module Pandora.Paradigm.Structure.Nonempty (Nonempty) where++import Pandora.Paradigm.Basis.Maybe (Maybe)+import Pandora.Paradigm.Basis.Twister (Twister)+import Pandora.Paradigm.Structure.Specific.Stack (Stack)++-- | Type synonymous for at least one element data structure+type family Nonempty (structure :: * -> *) where+	Nonempty Stack = Twister Maybe
+ Pandora/Paradigm/Structure/Specific.hs view
@@ -0,0 +1,5 @@+module Pandora.Paradigm.Structure.Specific (module Exports) where++import Pandora.Paradigm.Structure.Specific.Binary as Exports+import Pandora.Paradigm.Structure.Specific.Graph as Exports+import Pandora.Paradigm.Structure.Specific.Stack as Exports
+ Pandora/Paradigm/Structure/Specific/Binary.hs view
@@ -0,0 +1,14 @@+module Pandora.Paradigm.Structure.Specific.Binary (Binary, insert) where++import Pandora.Core.Morphism ((&))+import Pandora.Paradigm.Basis.Wye (Wye (End, Left, Right, Both))+import Pandora.Paradigm.Basis.Twister (Twister ((:<)))+import Pandora.Pattern.Object.Chain (Chain ((<=>)), order)++type Binary = Twister Wye++insert :: Chain a => a -> Binary a -> Binary a+insert x (y :< End) = x <=> y & order (y :< Right (x :< End)) (y :< Right (x :< End)) (y :< Left (x :< End))+insert x (y :< Left ls) = x <=> y & order (y :< Both ls (x :< End)) (y :< Both ls (x :< End)) (y :< Left (insert x ls))+insert x (y :< Right rs) = x <=> y & order (y :< Right (insert x rs)) (y :< Right (insert x rs)) (y :< Both (x :< End) rs)+insert x (y :< Both ls rs) = x <=> y & order (y :< Both ls (insert x rs)) (y :< Both ls (insert x rs)) (y :< Both (insert x ls) rs)
+ Pandora/Paradigm/Structure/Specific/Graph.hs view
@@ -0,0 +1,29 @@+module Pandora.Paradigm.Structure.Specific.Graph (Graph, loose) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Transformation (type (~>))+import Pandora.Core.Morphism ((.))+import Pandora.Paradigm.Basis.Edges (Edges (Empty, Overlay))+import Pandora.Paradigm.Basis.Twister (Twister ((:<)))+import Pandora.Paradigm.Inventory.Stateful (fold)+import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>)))+import Pandora.Pattern.Functor.Divariant (($))+import Pandora.Pattern.Functor.Traversable (Traversable ((->>), (->>>)))+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))++-- | Acyclic graph structure without loops+newtype Graph a = Graph (Edges :. Twister Edges := a)++instance Covariant Graph where+	f <$> Graph stack = Graph $ f <$$> stack++instance Traversable Graph where+	Graph stack ->> f = Graph <$> stack ->>> f++instance Interpreted Graph where+	type Primary Graph a = Edges :. Twister Edges := a+	unwrap (Graph stack) = stack++-- | Transform any traversable structure into all loose edges graph+loose :: Traversable t => t ~> Graph+loose = Graph . fold Empty (\x -> Overlay . (:<) x)
+ Pandora/Paradigm/Structure/Specific/Stack.hs view
@@ -0,0 +1,62 @@+module Pandora.Paradigm.Structure.Specific.Stack (Stack, push, top, pop, filter, linearize) where++import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism ((.))+import Pandora.Core.Transformation (type (~>))+import Pandora.Paradigm.Basis.Maybe (Maybe (Just, Nothing))+import Pandora.Paradigm.Basis.Predicate (Predicate (Predicate))+import Pandora.Paradigm.Basis.Twister (Twister ((:<)), untwist)+import Pandora.Paradigm.Inventory.Stateful (fold)+import Pandora.Paradigm.Controlflow.Joint.Interpreted (Interpreted (Primary, unwrap))+import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>)))+import Pandora.Pattern.Functor.Alternative (Alternative ((<+>)))+import Pandora.Pattern.Functor.Avoidable (Avoidable (empty))+import Pandora.Pattern.Functor.Applicative (Applicative ((<*>), (<**>)))+import Pandora.Pattern.Functor.Pointable (Pointable (point))+import Pandora.Pattern.Functor.Extractable (Extractable (extract))+import Pandora.Pattern.Functor.Traversable (Traversable ((->>), (->>>)))+import Pandora.Pattern.Functor.Bindable (Bindable ((>>=)))+import Pandora.Pattern.Functor.Divariant (($))+import Pandora.Pattern.Object.Setoid ((?))++-- | Linear data structure that serves as a collection of elements+newtype Stack a = Stack (Maybe :. Twister Maybe := a)++instance Covariant Stack where+	f <$> Stack stack = Stack $ f <$$> stack++instance Pointable Stack where+	point x = Stack . Just $ x :< Nothing++instance Alternative Stack where+	Stack stack <+> Stack stack' = Stack $ stack <+> stack'++instance Avoidable Stack where+	empty = Stack Nothing++instance Applicative Stack where+	Stack f <*> Stack x = Stack $ f <**> x++instance Traversable Stack where+	Stack stack ->> f = Stack <$> stack ->>> f++instance Interpreted Stack where+	type Primary Stack a = Maybe :. Twister Maybe := a+	unwrap (Stack stack) = stack++push :: a -> Stack a -> Stack a+push x (Stack stack) = Stack $ ((:<) x . Just <$> stack) <+> (point . point) x++top :: Stack ~> Maybe+top (Stack stack) = extract <$> stack++pop :: Stack ~> Stack+pop (Stack stack) = Stack $ stack >>= untwist++filter :: Predicate a -> Stack a -> Stack a+filter (Predicate p) = Stack . fold empty+	(\now new -> p now ? Just (now :< new) $ new)++-- | Transform any traversable structure into a stack+linearize :: Traversable t => t ~> Stack+linearize = Stack . fold Nothing (\x -> Just . (:<) x)
− Pandora/Paradigm/Structure/Stack.hs
@@ -1,61 +0,0 @@-module Pandora.Paradigm.Structure.Stack (Stack, push, top, pop, filter, linearize) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((.), ($))-import Pandora.Core.Transformation (type (~>))-import Pandora.Paradigm.Basis.Maybe (Maybe (Just, Nothing))-import Pandora.Paradigm.Basis.Predicate (Predicate (Predicate))-import Pandora.Paradigm.Basis.Twister (Twister ((:<)), untwist)-import Pandora.Paradigm.Inventory.Stateful (fold)-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))-import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$$>)))-import Pandora.Pattern.Functor.Alternative (Alternative ((<+>)))-import Pandora.Pattern.Functor.Avoidable (Avoidable (empty))-import Pandora.Pattern.Functor.Applicative (Applicative ((<*>), (<**>)))-import Pandora.Pattern.Functor.Pointable (Pointable (point))-import Pandora.Pattern.Functor.Extractable (Extractable (extract))-import Pandora.Pattern.Functor.Traversable (Traversable ((->>), (->>>)))-import Pandora.Pattern.Functor.Bindable (Bindable ((>>=)))-import Pandora.Pattern.Object.Setoid (bool)---- | Linear data structure that serves as a collection of elements-newtype Stack a = Stack (Maybe :. Twister Maybe > a)--instance Covariant Stack where-	f <$> Stack stack = Stack $ f <$$> stack--instance Pointable Stack where-	point x = Stack . Just $ x :< Nothing--instance Alternative Stack where-	Stack stack <+> Stack stack' = Stack $ stack <+> stack'--instance Avoidable Stack where-	empty = Stack Nothing--instance Applicative Stack where-	Stack f <*> Stack x = Stack $ f <**> x--instance Traversable Stack where-	Stack stack ->> f = Stack <$> stack ->>> f--instance Composition Stack where-	type Primary Stack a = Maybe :. Twister Maybe > a-	unwrap (Stack stack) = stack--push :: a -> Stack a -> Stack a-push x (Stack stack) = Stack $ ((:<) x . Just <$> stack) <+> (point . point) x--top :: Stack ~> Maybe-top (Stack stack) = extract <$> stack--pop :: Stack ~> Stack-pop (Stack stack) = Stack $ stack >>= untwist--filter :: Predicate a -> Stack a -> Stack a-filter (Predicate p) = Stack . fold empty-	(\now new -> bool new (Just $ now :< new) $ p now)---- | Transform any traversable structure into a stack-linearize :: Traversable t => t ~> Stack-linearize = Stack . fold Nothing (\x -> Just . (:<) x)
Pandora/Pattern.hs view
@@ -1,5 +1,5 @@ module Pandora.Pattern (module Exports) where  import Pandora.Pattern.Object as Exports-import Pandora.Pattern.Junction as Exports+import Pandora.Paradigm.Controlflow.Joint as Exports import Pandora.Pattern.Functor as Exports
Pandora/Pattern/Functor/Adjoint.hs view
@@ -1,6 +1,6 @@ module Pandora.Pattern.Functor.Adjoint (Adjoint (..), type (-|)) where -import Pandora.Core.Functor (type (:.), type (>))+import Pandora.Core.Functor (type (:.), type (:=)) import Pandora.Core.Morphism (identity) import Pandora.Pattern.Functor.Covariant (Covariant) @@ -30,8 +30,8 @@ 	psi :: (a -> u b) -> t a -> b 	psi g x = x |- g 	-- | Also known as 'unit'-	eta :: a -> u :. t > a+	eta :: a -> u :. t := a 	eta = phi identity 	-- | Also known as 'counit'-	epsilon :: t :. u > a -> a+	epsilon :: t :. u := a -> a 	epsilon = psi identity
Pandora/Pattern/Functor/Applicative.hs view
@@ -1,14 +1,14 @@ module Pandora.Pattern.Functor.Applicative (Applicative (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism (identity, ($))+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism (identity) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>), (<$)))  infixl 4 <*>, <*, *>  {- | > When providing a new instance, you should ensure it satisfies the three laws:-> * Composition: (.) <$> u <*> v <*> w ≡ u <*> (v <*> w)+> * Interpreted: (.) <$> u <*> v <*> w ≡ u <*> (v <*> w) > * Left interchange: x <*> (f <$> y) ≡ (. f) <$> x <*> y > * Right interchange: f <$> (x <*> y) ≡ (f .) <$> x <*> y -}@@ -32,16 +32,16 @@ 	forever x = x *> forever x  	-- | Infix versions of `apply` with various nesting levels-	(<**>) :: Applicative u => t :. u > (a -> b) -> t :. u > a -> t :. u > b+	(<**>) :: Applicative u => t :. u := (a -> b) -> t :. u := a -> t :. u := b 	f <**> x = (<*>) <$> f <*> x-	(<***>) :: (Applicative u, Applicative v) => t :. u :. v > (a -> b)-		-> t :. u :. v > a -> t :. u :. v > b+	(<***>) :: (Applicative u, Applicative v) => t :. u :. v := (a -> b)+		-> t :. u :. v := a -> t :. u :. v := b 	f <***> x = (<**>) <$> f <*> x 	(<****>) :: (Applicative u, Applicative v, Applicative w)-		=> t :. u :. v :. w > (a -> b)-		-> t :. u :. v :. w > a-		-> t :. u :. v :. w > b+		=> t :. u :. v :. w := (a -> b)+		-> t :. u :. v :. w := a+		-> t :. u :. v :. w := b 	f <****> x = (<***>) <$> f <*> x  instance Applicative ((->) e) where-	(<*>) f g x = f x $ g x+	(<*>) f g x = f x (g x)
Pandora/Pattern/Functor/Bindable.hs view
@@ -1,7 +1,7 @@ module Pandora.Pattern.Functor.Bindable (Bindable (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((?), identity)+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism ((%), identity) import Pandora.Pattern.Functor.Covariant (Covariant)  infixl 1 >>=@@ -19,19 +19,19 @@  	-- | Flipped version of '>>=', the dual of '<<=' 	(=<<) :: (a -> t b) -> t a -> t b-	(=<<) = (?) (>>=)+	(=<<) = (%) (>>=) 	-- | Prefix and flipped version of '>>=', the dual of 'extend' 	bind :: (a -> t b) -> t a -> t b 	bind f t = t >>= f 	-- | Merge effects/contexts, the dual of 'duplicate'-	join :: t :. t > a -> t a+	join :: t :. t := a -> t a 	join t = t >>= identity 	-- | Left-to-right Kleisli composition 	(>=>) :: (a -> t b) -> (b -> t c) -> (a -> t c) 	f >=> g = \x -> f x >>= g 	-- | Right-to-left Kleisli composition 	(<=<) :: (b -> t c) -> (a -> t b) -> (a -> t c)-	(<=<) = (?) (>=>)+	(<=<) = (%) (>=>)  instance Bindable ((->) e) where 	f >>= g = \x -> g (f x) x
Pandora/Pattern/Functor/Contravariant.hs view
@@ -1,14 +1,14 @@ module Pandora.Pattern.Functor.Contravariant (Contravariant (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((.), (!), (?))+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism ((.), (!), (%))  infixl 4 >$<, $<, >$  {- | > When providing a new instance, you should ensure it satisfies the two laws: > * Identity morphism: contramap identity ≡ identity-> * Composition of morphisms: contramap f . contramap g ≡ contramap (g . f)+> * Interpreted of morphisms: contramap f . contramap g ≡ contramap (g . f) -}  class Contravariant (t :: * -> *) where@@ -24,7 +24,7 @@ 	(>$) = contramap . (!) 	-- | Flipped version of '>$' 	($<) :: t b -> b -> t a-	($<) = (?) (>$)+	($<) = (%) (>$) 	-- | Fill the input of evaluation 	full :: t () -> t a 	full x = () >$ x@@ -33,21 +33,21 @@ 	x >&< f = f >$< x  	-- | Infix versions of `contramap` with various nesting levels-	(>$$<) :: Contravariant u => (a -> b) -> t :. u > a -> t :. u > b+	(>$$<) :: Contravariant u => (a -> b) -> t :. u := a -> t :. u := b 	(>$$<) = (>$<) . (>$<) 	(>$$$<) :: (Contravariant u, Contravariant v)-		=> (a -> b) -> t :. u :. v > b -> t :. u :. v > a+		=> (a -> b) -> t :. u :. v := b -> t :. u :. v := a 	(>$$$<) = (>$<) . (>$<) . (>$<) 	(>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w)-		=> (a -> b) -> t :. u :. v :. w > a -> t :. u :. v :. w > b+		=> (a -> b) -> t :. u :. v :. w := a -> t :. u :. v :. w := b 	(>$$$$<) = (>$<) . (>$<) . (>$<) . (>$<)  	-- | Infix flipped versions of `contramap` with various nesting levels-	(>&&<) :: Contravariant u => t :. u > a -> (a -> b) -> t :. u > b+	(>&&<) :: Contravariant u => t :. u := a -> (a -> b) -> t :. u := b 	x >&&< f = f >$$< x 	(>&&&<) :: (Contravariant u, Contravariant v)-		=> t :. u :. v > b -> (a -> b) -> t :. u :. v > a+		=> t :. u :. v := b -> (a -> b) -> t :. u :. v := a 	x >&&&< f = f >$$$< x 	(>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w)-		=> t :. u :. v :. w > a -> (a -> b) -> t :. u :. v :. w > b+		=> t :. u :. v :. w := a -> (a -> b) -> t :. u :. v :. w := b 	x >&&&&< f = f >$$$$< x
Pandora/Pattern/Functor/Covariant.hs view
@@ -1,14 +1,14 @@ module Pandora.Pattern.Functor.Covariant (Covariant (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism (fix, (.), ($), (!), (?))+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism (fix, (.), (!), (%))  infixl 4 <$>, <$, $>  {- | > When providing a new instance, you should ensure it satisfies the two laws: > * Identity morphism: comap identity ≡ identity-> * Composition of morphisms: comap (f . g) ≡ comap f . comap g+> * Interpreted of morphisms: comap (f . g) ≡ comap f . comap g -}  class Covariant (t :: * -> *) where@@ -24,35 +24,35 @@ 	(<$) = comap . (!) 	-- | Flipped version of '<$' 	($>) :: t a -> b -> t b-	($>) = (?) (<$)+	($>) = (%) (<$) 	-- | Discards the result of evaluation 	void :: t a -> t () 	void x = () <$ x 	-- | Computing a value from a structure of values 	loeb :: t (t a -> a) -> t a-	loeb tt = fix $ \f -> ($ f) <$> tt+	loeb tt = fix (\f -> (\g -> g f) <$> tt) 	-- | Flipped infix version of 'comap' 	(<&>) :: t a -> (a -> b) -> t b 	x <&> f = f <$> x  	-- | Infix versions of `comap` with various nesting levels-	(<$$>) :: Covariant u => (a -> b) -> t :. u > a -> t :. u > b+	(<$$>) :: Covariant u => (a -> b) -> t :. u := a -> t :. u := b 	(<$$>) = (<$>) . (<$>) 	(<$$$>) :: (Covariant u, Covariant v)-		=> (a -> b) -> t :. u :. v > a -> t :. u :. v > b+		=> (a -> b) -> t :. u :. v := a -> t :. u :. v := b 	(<$$$>) = (<$>) . (<$>) . (<$>) 	(<$$$$>) :: (Covariant u, Covariant v, Covariant w)-		=> (a -> b) -> t :. u :. v :. w > a -> t :. u :. v :. w > b+		=> (a -> b) -> t :. u :. v :. w := a -> t :. u :. v :. w := b 	(<$$$$>) = (<$>) . (<$>) . (<$>) . (<$>)  	-- | Infix flipped versions of `comap` with various nesting levels-	(<&&>) :: Covariant u => t :. u > a -> (a -> b) -> t :. u > b+	(<&&>) :: Covariant u => t :. u := a -> (a -> b) -> t :. u := b 	x <&&> f = f <$$> x 	(<&&&>) :: (Covariant u, Covariant v)-		=> t :. u :. v > a -> (a -> b) -> t :. u :. v > b+		=> t :. u :. v := a -> (a -> b) -> t :. u :. v := b 	x <&&&> f = f <$$$> x 	(<&&&&>) :: (Covariant u, Covariant v, Covariant w)-		=> t :. u :. v :. w > a -> (a -> b) -> t :. u :. v :. w > b+		=> t :. u :. v :. w := a -> (a -> b) -> t :. u :. v :. w := b 	x <&&&&> f = f <$$$$> x  instance Covariant ((->) a) where
Pandora/Pattern/Functor/Distributive.hs view
@@ -1,7 +1,7 @@ module Pandora.Pattern.Functor.Distributive (Distributive (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism (identity, (.), (?))+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism (identity, (.), (%)) import Pandora.Pattern.Functor.Covariant (Covariant ((<$>)))  {- |@@ -17,25 +17,25 @@ class Covariant u => Distributive u where 	{-# MINIMAL (>>-) #-} 	-- | Infix and flipped version of 'collect'-	(>>-) :: Covariant t => t a -> (a -> u b) -> u :. t > b+	(>>-) :: Covariant t => t a -> (a -> u b) -> u :. t := b  	-- | Prefix version of '>>-'-	collect :: Covariant t => (a -> u b) -> t a -> u :. t > b+	collect :: Covariant t => (a -> u b) -> t a -> u :. t := b 	collect f t = t >>- f 	-- | The dual of 'sequence'-	distribute :: Covariant t => t :. u > a -> u :. t > a+	distribute :: Covariant t => t :. u := a -> u :. t := a 	distribute t = t >>- identity  	-- | Infix versions of `collect` with various nesting levels 	(>>>-) :: (Covariant t, Covariant v)-		=> t :. v > a -> (a -> u b) -> u :. t :. v > b+		=> t :. v := a -> (a -> u b) -> u :. t :. v := b 	x >>>- f = (collect . collect) f x 	(>>>>-) :: (Covariant t, Covariant v, Covariant w)-		=> t :. v :. w > a -> (a -> u b) -> u :. t :. v :. w > b+		=> t :. v :. w := a -> (a -> u b) -> u :. t :. v :. w := b 	x >>>>- f = (collect . collect . collect) f x 	(>>>>>-) :: (Covariant t, Covariant v, Covariant w, Covariant j)-		=> t :. v :. w :. j > a -> (a -> u b) -> u :. t :. v :. w :. j > b+		=> t :. v :. w :. j := a -> (a -> u b) -> u :. t :. v :. w :. j := b 	x >>>>>- f = (collect . collect . collect . collect) f x  instance Distributive ((->) e) where-	g >>- f = \e -> (f ? e) <$> g+	g >>- f = \e -> (f % e) <$> g
Pandora/Pattern/Functor/Divariant.hs view
@@ -2,14 +2,15 @@  import Pandora.Pattern.Functor.Covariant (Covariant) -import Pandora.Core.Morphism ((.), ($))+import Pandora.Core.Morphism ((.))  infixl 4 >->+infixr 0 $  {- | > When providing a new instance, you should ensure it satisfies the two laws: > * Identity: dimap identity identity ≡ identity-> * Composition: dimap (f . g) (h . i) ≡ dimap g h . dimap f i+> * Interpreted: dimap (f . g) (h . i) ≡ dimap g h . dimap f i -}  class (forall a . Covariant (t a)) => Divariant (t :: * -> * -> *) where@@ -19,7 +20,10 @@  	-- | Prefix version of '>->' 	dimap :: (a -> b) -> (c -> d) -> t b c -> t a d-	dimap f g x = f >-> g $ x+	dimap f g x = (f >-> g) x++	($) :: t a b -> t a b+	($) f = f  instance Divariant ((->)) where 	(>->) ab cd bc = cd . bc . ab
Pandora/Pattern/Functor/Extendable.hs view
@@ -1,7 +1,7 @@ module Pandora.Pattern.Functor.Extendable (Extendable (..)) where -import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Core.Morphism ((.), (?), identity)+import Pandora.Core.Functor (type (:.), type (:=))+import Pandora.Core.Morphism ((.), (%), identity) import Pandora.Pattern.Functor.Covariant (Covariant)  infixl 1 =>>@@ -20,12 +20,12 @@  	-- | Flipped version of '>>=', the dual of '=<<' 	(<<=) :: (t a -> b) -> t a -> t b-	(<<=) = (?) (=>>)+	(<<=) = (%) (=>>) 	-- | Prefix and flipped version of '=>>', the dual of 'bind' 	extend :: (t a -> b) -> t a -> t b 	extend f t = t =>> f 	-- | Clone existing structure, the dual of 'join'-	duplicate :: t a -> t :. t > a+	duplicate :: t a -> t :. t := a 	duplicate t = t =>> identity 	-- | Right-to-left Cokleisli composition 	(=<=) :: (t b -> c) -> (t a -> b) -> t a -> c
Pandora/Pattern/Functor/Invariant.hs view
@@ -3,7 +3,7 @@ {- | > When providing a new instance, you should ensure it satisfies the two laws: > Identity morphisms: invmap identity identity = identity-> Composition of morphisms: invmap g j . invmap f h = invmap (g . f) (h . j)+> Interpreted of morphisms: invmap g j . invmap f h = invmap (g . f) (h . j) -}  class Invariant (t :: * -> *) where
Pandora/Pattern/Functor/Representable.hs view
@@ -1,6 +1,6 @@ module Pandora.Pattern.Functor.Representable (Representable (..)) where -import Pandora.Core.Morphism (identity, (?))+import Pandora.Core.Morphism (identity, (%)) import Pandora.Pattern.Functor.Pointable (Pointable)  {- |@@ -24,5 +24,5 @@  instance Representable ((->) e) where 	type Representation ((->) e) = e-	(<#>) = (identity ?)+	(<#>) = (identity %) 	tabulate = identity
Pandora/Pattern/Functor/Traversable.hs view
@@ -1,6 +1,6 @@ module Pandora.Pattern.Functor.Traversable (Traversable (..)) where -import Pandora.Core.Functor (type (:.), type (>))+import Pandora.Core.Functor (type (:.), type (:=)) import Pandora.Core.Morphism (identity, (.)) import Pandora.Pattern.Functor.Covariant (Covariant) import Pandora.Pattern.Functor.Applicative (Applicative)@@ -22,22 +22,22 @@ class Covariant t => Traversable t where 	{-# MINIMAL (->>) #-} 	-- | Infix version of 'traverse'-	(->>) :: (Pointable u, Applicative u) => t a -> (a -> u b) -> u :. t > b+	(->>) :: (Pointable u, Applicative u) => t a -> (a -> u b) -> u :. t := b  	-- | Prefix version of '->>'-	traverse :: (Pointable u, Applicative u) => (a -> u b) -> t a -> u :. t > b+	traverse :: (Pointable u, Applicative u) => (a -> u b) -> t a -> u :. t := b 	traverse f t = t ->> f 	-- | The dual of 'distribute'-	sequence :: (Pointable u, Applicative u) => (t :. u) a -> u :. t > a+	sequence :: (Pointable u, Applicative u) => (t :. u) a -> u :. t := a 	sequence t = t ->> identity  	-- | Infix versions of `traverse` with various nesting levels 	(->>>) :: (Pointable u, Applicative u, Traversable v)-		=> v :. t > a -> (a -> u b) -> u :. v :. t > b+		=> v :. t := a -> (a -> u b) -> u :. v :. t := b 	x ->>> f = (traverse . traverse) f x 	(->>>>) :: (Pointable u, Applicative u, Traversable v, Traversable w)-		=> w :. v :. t > a -> (a -> u b) -> u :. w :. v :. t > b+		=> w :. v :. t := a -> (a -> u b) -> u :. w :. v :. t := b 	x ->>>> f = (traverse . traverse . traverse) f x 	(->>>>>) :: (Pointable u, Applicative u, Traversable v, Traversable w, Traversable j)-		=> j :. w :. v :. t > a -> (a -> u b) -> u :. j :. w :. v :. t > b+		=> j :. w :. v :. t := a -> (a -> u b) -> u :. j :. w :. v :. t := b 	x ->>>>> f = (traverse . traverse . traverse . traverse) f x
− Pandora/Pattern/Junction.hs
@@ -1,5 +0,0 @@-module Pandora.Pattern.Junction (module Exports) where--import Pandora.Pattern.Junction.Schemes as Exports-import Pandora.Pattern.Junction.Transformer as Exports-import Pandora.Pattern.Junction.Composition as Exports
− Pandora/Pattern/Junction/Composition.hs
@@ -1,6 +0,0 @@-module Pandora.Pattern.Junction.Composition (Composition (..)) where--class Composition t where-	{-# MINIMAL unwrap #-}-	type Primary t a :: *-	unwrap :: t a -> Primary t a
− Pandora/Pattern/Junction/Schemes.hs
@@ -1,7 +0,0 @@-module Pandora.Pattern.Junction.Schemes (module Exports) where--import Pandora.Pattern.Junction.Schemes.UTU as Exports-import Pandora.Pattern.Junction.Schemes.UT as Exports-import Pandora.Pattern.Junction.Schemes.TUVW as Exports-import Pandora.Pattern.Junction.Schemes.TUV as Exports-import Pandora.Pattern.Junction.Schemes.TU as Exports
− Pandora/Pattern/Junction/Schemes/TU.hs
@@ -1,10 +0,0 @@-module Pandora.Pattern.Junction.Schemes.TU (TU (..)) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))--newtype TU ct cu t u a = TU (t :. u > a)--instance Composition (TU ct cu t u) where-	type Primary (TU ct cu t u) a = t :. u > a-	unwrap (TU x) = x
− Pandora/Pattern/Junction/Schemes/TUV.hs
@@ -1,10 +0,0 @@-module Pandora.Pattern.Junction.Schemes.TUV (TUV (..)) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))--newtype TUV ct cu cv t u v a = TUV (t :. u :. v > a)--instance Composition (TUV ct cu cv t u v) where-	type Primary (TUV ct cu cv t u v) a = t :. u :. v > a-	unwrap (TUV x) = x
− Pandora/Pattern/Junction/Schemes/TUVW.hs
@@ -1,10 +0,0 @@-module Pandora.Pattern.Junction.Schemes.TUVW (TUVW (..)) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))--newtype TUVW ct cu cv cw t u v w a = TUVW (t :. u :. v :. w > a)--instance Composition (TUVW ct cu cv cw t u v w) where-	type Primary (TUVW ct cu cv cw t u v w) a = t :. u :. v :. w > a-	unwrap (TUVW x) = x
− Pandora/Pattern/Junction/Schemes/UT.hs
@@ -1,10 +0,0 @@-module Pandora.Pattern.Junction.Schemes.UT (UT (..)) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))--newtype UT ct cu t u a = UT (u :. t > a)--instance Composition (UT ct cu t u) where-	type Primary (UT ct cu t u) a = u :. t > a-	unwrap (UT x) = x
− Pandora/Pattern/Junction/Schemes/UTU.hs
@@ -1,10 +0,0 @@-module Pandora.Pattern.Junction.Schemes.UTU (UTU (..)) where--import Pandora.Core.Functor (type (:.), type (>))-import Pandora.Pattern.Junction.Composition (Composition (Primary, unwrap))--newtype UTU ct cu t u a = UTU (u :. t u > a)--instance Composition (UTU ct cu t u) where-	type Primary (UTU ct cu t u) a = u :. t u > a-	unwrap (UTU x) = x
− Pandora/Pattern/Junction/Transformer.hs
@@ -1,15 +0,0 @@-module Pandora.Pattern.Junction.Transformer (Transformer (..), type (:>)) where--import Pandora.Core.Transformation (type (~>))-import Pandora.Pattern.Junction.Composition (Composition)-import Pandora.Pattern.Functor.Covariant (Covariant)-import Pandora.Pattern.Functor.Pointable (Pointable)--class Composition t => Transformer t where-	{-# MINIMAL lay, wrap #-}-	type Schema (t :: * -> *) (u :: * -> *) = (r :: * -> *) | r -> t u-	lay :: Covariant u => u ~> Schema t u-	wrap :: Pointable u => t ~> Schema t u--infixr 1 :>-type (:>) t u a = Transformer t => Schema t u a
Pandora/Pattern/Object/Chain.hs view
@@ -1,6 +1,5 @@ module Pandora.Pattern.Object.Chain (Ordering (..), order, Chain (..)) where -import Pandora.Core.Morphism (($)) import Pandora.Pattern.Object.Setoid (Boolean (True, False), Setoid)  data Ordering = Less | Equal | Greater@@ -22,10 +21,10 @@ 	(<=>) :: a -> a -> Ordering  	(<) :: a -> a -> Boolean-	x < y = order True False False $ x <=> y+	x < y = order True False False (x <=> y) 	(<=) :: a -> a -> Boolean-	x <= y = order True True False $ x <=> y+	x <= y = order True True False (x <=> y) 	(>) :: a -> a -> Boolean-	x > y = order False False True $ x <=> y+	x > y = order False False True (x <=> y) 	(>=) :: a -> a -> Boolean-	x >= y = order False True True $ x <=> y+	x >= y = order False True True (x <=> y)
Pandora/Pattern/Object/Setoid.hs view
@@ -1,8 +1,7 @@-module Pandora.Pattern.Object.Setoid (Boolean (..), (&&), (||), not, bool, ifelse, Setoid (..)) where--import Pandora.Core.Morphism (($))+module Pandora.Pattern.Object.Setoid (Boolean (..), (&&), (||), (?), not, bool, Setoid (..)) where  infixr ||+infixr 1 ? infixr 3 && infix 4 ==, /= @@ -25,9 +24,9 @@ bool x _ False = x bool _ y True = y -ifelse :: a -> a -> Boolean -> a-ifelse x _ True = x-ifelse _ y False = y+(?) :: Boolean -> a -> a -> a+(?) True x _ = x+(?) False _ y = y  {- | > When providing a new instance, you should ensure it satisfies the four laws:@@ -42,4 +41,4 @@ 	(==) :: a -> a -> Boolean  	(/=) :: a -> a -> Boolean-	(/=) x y = not $ x == y+	(/=) x y = not (x == y)
pandora.cabal view
@@ -1,5 +1,5 @@ name:                pandora-version:             0.2.0+version:             0.2.1 synopsis:            A box of patterns and paradigms description:         Humble attempt to define a library for problem solving based on math abstractions. homepage:            https://github.com/iokasimov/pandora@@ -51,6 +51,16 @@     Pandora.Paradigm.Basis.Yoneda     -- Control flow primitives     Pandora.Paradigm.Controlflow+    -- Typeclassess about functor junctions+    Pandora.Paradigm.Controlflow.Joint+    Pandora.Paradigm.Controlflow.Joint.Interpreted+    Pandora.Paradigm.Controlflow.Joint.Transformer+    Pandora.Paradigm.Controlflow.Joint.Schemes+    Pandora.Paradigm.Controlflow.Joint.Schemes.TU+    Pandora.Paradigm.Controlflow.Joint.Schemes.TUV+    Pandora.Paradigm.Controlflow.Joint.Schemes.TUVW+    Pandora.Paradigm.Controlflow.Joint.Schemes.UT+    Pandora.Paradigm.Controlflow.Joint.Schemes.UTU     Pandora.Paradigm.Controlflow.Observable     Pandora.Paradigm.Controlflow.Pipeline     -- Tools for datastructures@@ -61,9 +71,12 @@     Pandora.Paradigm.Inventory.Storage     -- Tree-based datastructures     Pandora.Paradigm.Structure-    Pandora.Paradigm.Structure.Stack-    Pandora.Paradigm.Structure.Graph-    Pandora.Paradigm.Structure.Binary+    Pandora.Paradigm.Structure.Cartesian+    Pandora.Paradigm.Structure.Nonempty+    Pandora.Paradigm.Structure.Specific+    Pandora.Paradigm.Structure.Specific.Stack+    Pandora.Paradigm.Structure.Specific.Graph+    Pandora.Paradigm.Structure.Specific.Binary      Pandora.Pattern     -- Functor typeclassess@@ -88,16 +101,6 @@     Pandora.Pattern.Functor.Representable     Pandora.Pattern.Functor.Traversable     Pandora.Pattern.Functor.Divariant-    -- Typeclassess about functor junctions-    Pandora.Pattern.Junction-    Pandora.Pattern.Junction.Composition-    Pandora.Pattern.Junction.Transformer-    Pandora.Pattern.Junction.Schemes-    Pandora.Pattern.Junction.Schemes.TU-    Pandora.Pattern.Junction.Schemes.TUV-    Pandora.Pattern.Junction.Schemes.TUVW-    Pandora.Pattern.Junction.Schemes.UT-    Pandora.Pattern.Junction.Schemes.UTU     -- Typeclassess about object internals     Pandora.Pattern.Object     Pandora.Pattern.Object.Chain