module Pandora.Paradigm.Primary.Functor (module Exports, Equivalence, Comparison, match) where

import Pandora.Paradigm.Primary.Functor.Fix as Exports
import Pandora.Paradigm.Primary.Functor.Convergence as Exports
import Pandora.Paradigm.Primary.Functor.Predicate as Exports
import Pandora.Paradigm.Primary.Functor.These as Exports
import Pandora.Paradigm.Primary.Functor.Validation as Exports
import Pandora.Paradigm.Primary.Functor.Wedge as Exports
import Pandora.Paradigm.Primary.Functor.Wye as Exports
import Pandora.Paradigm.Primary.Functor.Edges as Exports
import Pandora.Paradigm.Primary.Functor.Conclusion as Exports
import Pandora.Paradigm.Primary.Functor.Maybe as Exports
import Pandora.Paradigm.Primary.Functor.Endo as Exports
import Pandora.Paradigm.Primary.Functor.Proxy as Exports
import Pandora.Paradigm.Primary.Functor.Tagged as Exports
import Pandora.Paradigm.Primary.Functor.Constant as Exports
import Pandora.Paradigm.Primary.Functor.Identity as Exports

import Pandora.Pattern.Category (($))
import Pandora.Paradigm.Primary.Algebraic.Product ((:*:) ((:*:)))
import Pandora.Paradigm.Primary.Object.Boolean (Boolean, (?))
import Pandora.Paradigm.Primary.Object.Ordering (Ordering)

type Equivalence = Convergence Boolean
type Comparison = Convergence Ordering

match :: Predicate a -> (a -> r) -> a -> r -> r :*: a
match :: Predicate a -> (a -> r) -> a -> r -> r :*: a
match (Predicate a -> Boolean
p) a -> r
f a
x r
r = a -> Boolean
p a
x Boolean -> (r :*: a) -> (r :*: a) -> r :*: a
forall a. Boolean -> a -> a -> a
? (a -> r
f a
x r -> a -> r :*: a
forall s a. s -> a -> s :*: a
:*: a
x) ((r :*: a) -> r :*: a) -> (r :*: a) -> r :*: a
forall (m :: * -> * -> *) a b. Category m => m (m a b) (m a b)
$ r
r r -> a -> r :*: a
forall s a. s -> a -> s :*: a
:*: a
x