Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class Semigroupoid p where Source #
(.) :: (CategoryC p b c, CategoryC p a b, CategoryC p a c) => CategoryT p b c -> CategoryT p a b -> CategoryT p a c infixr 9 Source #
Semigroupoid FunctionP Source # | |
Semigroupoid p => Semigroupoid (Identity p) Source # | |
Semigroupoid p => Semigroupoid (Dual p) Source # | |
Semigroup m => Semigroupoid (MonoidAsCategory m) Source # | |
(Semigroupoid p1, Semigroupoid p2) => Semigroupoid (p1, p2) Source # | |
Semigroupoid p => Semigroupoid (FunctorCategoryP (BasicFunctorP (* -> *) []) p) Source # | |
Semigroupoid p => Semigroupoid (FunctorCategoryP (BasicFunctorP (* -> *) Maybe) p) Source # | |
(Semigroupoid p1, Semigroupoid p2, Semigroupoid p3) => Semigroupoid (p1, p2, p3) Source # | |
(Semigroupoid p1, Semigroupoid p2, Semigroupoid p3, Semigroupoid p4) => Semigroupoid (p1, p2, p3, p4) Source # | |
(Semigroupoid p1, Semigroupoid p2, Semigroupoid p3, Semigroupoid p4, Semigroupoid p5) => Semigroupoid (p1, p2, p3, p4, p5) Source # | |
(<<<) :: (Semigroupoid p, CategoryC p b c, CategoryC p a b, CategoryC p a c) => CategoryT p b c -> CategoryT p a b -> CategoryT p a c Source #
(>>>) :: (Semigroupoid p, CategoryC p a b, CategoryC p b c, CategoryC p a c) => CategoryT p a b -> CategoryT p b c -> CategoryT p a c Source #
class Semigroupoid p => Category p where Source #
id :: (CategoryC p a a, ExoCategoryC p a a, t ~ CategoryT p a a, t ~ ExoCategoryT p a a) => t Source #
Category FunctionP Source # | |
Category p => Category (Identity p) Source # | |
Category p => Category (Dual p) Source # | |
(Semigroup m, Monoid m) => Category (MonoidAsCategory m) Source # | |
Semigroupoid p => Category (FunctorCategoryP (BasicFunctorP (* -> *) []) p) Source # | |
Semigroupoid p => Category (FunctorCategoryP (BasicFunctorP (* -> *) Maybe) p) Source # | |
class Semigroupoid p => Const p where Source #
type family CategoryT (p :: Type) (a :: Type) (b :: Type) = (f :: Type) | f -> p a b Source #
type CategoryT FunctionP a b Source # | |
type CategoryT (Identity p) a b Source # | |
type CategoryT (Dual p) a b Source # | |
type CategoryT (MonoidAsCategory a) Void Void Source # | |
type CategoryT (FunctorCategoryP (BasicFunctorP (* -> *) []) p) a b Source # | |
type CategoryT (FunctorCategoryP (BasicFunctorP (* -> *) Maybe) p) a b Source # | |
type CategoryT (p1, p2) (a1, a2) (b1, b2) Source # | |
type CategoryT (p1, p2, p3) (a1, a2, a3) (b1, b2, b3) Source # | |
type CategoryT (p1, p2, p3, p4) (a1, a2, a3, a4) (b1, b2, b3, b4) Source # | |
type CategoryT (p1, p2, p3, p4, p5) (a1, a2, a3, a4, a5) (b1, b2, b3, b4, b5) Source # | |
type family ExoCategoryT (p :: Type) (a :: Type) (b :: Type) = (f :: Type) | f -> p a b Source #
type ExoCategoryT FunctionP a b Source # | |
type ExoCategoryT (Identity p) a b Source # | |
type ExoCategoryT (Dual p) a b Source # | |
type ExoCategoryT (FunctorCategoryP (BasicFunctorP (* -> *) []) p) [a] [b] Source # | |
type ExoCategoryT (FunctorCategoryP (BasicFunctorP (* -> *) Maybe) p) (Maybe a) (Maybe b) Source # | |
type ExoCategoryT (p1, p2) (a1, a2) (b1, b2) Source # | |
type ExoCategoryT (p1, p2, p3) (a1, a2, a3) (b1, b2, b3) Source # | |
type ExoCategoryT (p1, p2, p3, p4) (a1, a2, a3, a4) (b1, b2, b3, b4) Source # | |
type ExoCategoryT (p1, p2, p3, p4, p5) (a1, a2, a3, a4, a5) (b1, b2, b3, b4, b5) Source # | |
type CategorySrcC p a = FromMaybeConstraintFunc (CategorySrcC' p) a Source #
type family CategorySrcC' (p :: Type) :: Maybe (Type -> Constraint) Source #
type CategorySrcC' FunctionP Source # | |
type CategorySrcC' (Identity p) Source # | |
type CategorySrcC' (Dual p) Source # | |
type CategorySrcC' (MonoidAsCategory _) Source # | |
type CategorySrcC' (p1, p2) Source # | |
type CategorySrcC' (FunctorCategoryP _ p) Source # | |
type CategorySrcC' (p1, p2, p3) Source # | |
type CategorySrcC' (p1, p2, p3, p4) Source # | |
type CategorySrcC' (p1, p2, p3, p4, p5) Source # | |
type family ExoCategorySrcC (p :: Type) (a :: Type) :: Constraint Source #
type ExoCategorySrcC FunctionP a Source # | |
type ExoCategorySrcC (Identity p) a Source # | |
type ExoCategorySrcC (Dual p) a Source # | |
type ExoCategorySrcC (p1, p2) a Source # | |
type ExoCategorySrcC (FunctorCategoryP functorP p) a Source # | |
type ExoCategorySrcC (p1, p2, p3) a Source # | |
type ExoCategorySrcC (p1, p2, p3, p4) a Source # | |
type ExoCategorySrcC (p1, p2, p3, p4, p5) a Source # | |
type CategoryDstC p a = FromMaybeConstraintFunc (CategoryDstC' p) a Source #
type family CategoryDstC' (p :: Type) :: Maybe (Type -> Constraint) Source #
type CategoryDstC' FunctionP Source # | |
type CategoryDstC' (Identity p) Source # | |
type CategoryDstC' (Dual p) Source # | |
type CategoryDstC' (MonoidAsCategory _) Source # | |
type CategoryDstC' (p1, p2) Source # | |
type CategoryDstC' (FunctorCategoryP _ p) Source # | |
type CategoryDstC' (p1, p2, p3) Source # | |
type CategoryDstC' (p1, p2, p3, p4) Source # | |
type CategoryDstC' (p1, p2, p3, p4, p5) Source # | |
type family ExoCategoryDstC (p :: Type) (b :: Type) :: Constraint Source #
type ExoCategoryDstC FunctionP b Source # | |
type ExoCategoryDstC (Identity p) b Source # | |
type ExoCategoryDstC (Dual p) b Source # | |
type ExoCategoryDstC (p1, p2) b Source # | |
type ExoCategoryDstC (FunctorCategoryP functorP p) b Source # | |
type ExoCategoryDstC (p1, p2, p3) b Source # | |
type ExoCategoryDstC (p1, p2, p3, p4) b Source # | |
type ExoCategoryDstC (p1, p2, p3, p4, p5) b Source # | |
type CategoryC p a b = (CategorySrcC p a, CategoryDstC p b) Source #
type ExoCategoryC p a b = (ExoCategorySrcC p a, ExoCategoryDstC p b) Source #
type IsSemigroupoid t p a b = (Semigroupoid p, t ~ CategoryT p a b, CategoryC p a b) Source #
type ExoIsSemigroupoid t p a b = (Semigroupoid p, t ~ ExoCategoryT p a b, ExoCategoryC p a b) Source #
type IsCategory t p a b = (IsSemigroupoid t p a b, Category p) Source #
type ExoIsCategory t p a b = (ExoIsSemigroupoid t p a b, Category p) Source #
type family FunctorT (p :: Type) (a :: Type) = (b :: Type) | b -> p a Source #
type FunctorT (BasicFunctorP (* -> *) []) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Maybe) a Source # | |
type FunctorT (BasicFunctorP (* -> *) IO) a Source # | |
type FunctorT (BasicFunctorP (* -> *) (Either a)) b Source # | |
type FunctorT (BasicFunctorP (* -> *) (Array i)) e Source # | |
type FunctorT (BasicFunctorP (* -> *) Min) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Max) a Source # | |
type FunctorT (BasicFunctorP (* -> *) First) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Last) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Option) a Source # | |
type FunctorT (BasicFunctorP (* -> *) NonEmpty) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Identity) a Source # | |
type FunctorT (BasicFunctorP (* -> *) Tree) a Source # | |
type FunctorSrcC p a = FromMaybeConstraintFunc (FunctorSrcC' p) a Source #
type FunctorDstC p a = FromMaybeConstraintFunc (FunctorDstC' p) a Source #
type family FunctorSrcC' (p :: Type) :: Maybe (Type -> Constraint) Source #
type FunctorSrcC' (BasicFunctorP k _) Source # | |
type family FunctorDstC' (p :: Type) :: Maybe (Type -> Constraint) Source #
type FunctorDstC' (BasicFunctorP k _) Source # | |
type family FromMaybeConstraintFunc (p :: Maybe (Type -> Constraint)) :: Type -> Constraint where ... Source #
FromMaybeConstraintFunc Nothing = EmptyConstraint | |
FromMaybeConstraintFunc (Just c) = c |
type UnconstrainedFunctor cat p = (Functor cat p, FunctorSrcC' p ~ Nothing, FunctorDstC' p ~ Nothing) Source #
data BasicFunctorP f Source #
data FunctorCategoryP (functorP :: Type) (p :: Type) Source #
class Semigroupoid cat => Functor cat p where Source #
fmap :: (ra ~ FunctorT p a, rb ~ FunctorT p b, CategoryC cat a b, CategoryC cat ra rb, FunctorSrcC p a, FunctorDstC p b) => CategoryT cat a b -> CategoryT cat ra rb Source #
fmap :: (Lift p, Pure p, ra ~ FunctorT p a, rb ~ FunctorT p b, CategoryC cat a b, CategoryC cat ra rb, FunctorSrcC p a, FunctorDstC p b, cat ~ FunctionP, FunctorSrcC' p ~ Nothing, FunctorDstC' p ~ Nothing) => CategoryT cat a b -> CategoryT cat ra rb Source #
Functor FunctionP (BasicFunctorP (* -> *) []) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Maybe) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) IO) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) (Either a)) Source # | |
Ix i => Functor FunctionP (BasicFunctorP (* -> *) (Array i)) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Min) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Max) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) First) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Last) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Option) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) NonEmpty) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Identity) Source # | |
Functor FunctionP (BasicFunctorP (* -> *) Tree) Source # | |
Functor cat p => Functor (Identity cat) p Source # | |
Functor cat p => Functor (FunctorCategoryP (BasicFunctorP (* -> *) []) cat) p Source # | |
Functor cat p => Functor (FunctorCategoryP (BasicFunctorP (* -> *) Maybe) cat) p Source # | |
(<$>) :: (Functor cat p, ra ~ FunctorT p a, rb ~ FunctorT p b, CategoryC cat a b, CategoryC cat ra rb, FunctorSrcC p a, FunctorDstC p b) => CategoryT cat a b -> CategoryT cat ra rb infixl 4 Source #
class Functor cat p => ConstFunctor cat p where Source #
(<$) :: (ra ~ FunctorT p a, rb ~ FunctorT p b, CategoryC cat a b, CategoryC cat ra rb, FunctorSrcC p a, FunctorDstC p b) => b -> CategoryT cat ra rb infixl 4 Source #
(<$) :: (Const cat, ra ~ FunctorT p a, rb ~ FunctorT p b, CategoryC cat a b, CategoryC cat ra rb, FunctorSrcC p a, FunctorDstC p b) => b -> CategoryT cat ra rb infixl 4 Source #
(Functor cat p, Const cat) => ConstFunctor cat p Source # | |
pure :: FunctorDstC p a => a -> FunctorT p a Source #
Pure (BasicFunctorP (* -> *) []) Source # | |
Pure (BasicFunctorP (* -> *) Maybe) Source # | |
Pure (BasicFunctorP (* -> *) IO) Source # | |
Pure (BasicFunctorP (* -> *) (Either a)) Source # | |
(Ix i, Num i) => Pure (BasicFunctorP (* -> *) (Array i)) Source # | |
Pure (BasicFunctorP (* -> *) Min) Source # | |
Pure (BasicFunctorP (* -> *) Max) Source # | |
Pure (BasicFunctorP (* -> *) First) Source # | |
Pure (BasicFunctorP (* -> *) Last) Source # | |
Pure (BasicFunctorP (* -> *) Option) Source # | |
Pure (BasicFunctorP (* -> *) NonEmpty) Source # | |
Pure (BasicFunctorP (* -> *) Identity) Source # | |
Pure (BasicFunctorP (* -> *) Tree) Source # | |
class Functor FunctionP p => Lift p where Source #
liftA2 :: (FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p c) => (a -> b -> c) -> FunctorT p a -> FunctorT p b -> FunctorT p c Source #
liftA2 :: (Monad p, Pure p, FunctorSrcC' p ~ Nothing, FunctorDstC' p ~ Nothing) => (a -> b -> c) -> FunctorT p a -> FunctorT p b -> FunctorT p c Source #
(*>) :: (FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p b) => FunctorT p a -> FunctorT p b -> FunctorT p b infixl 4 Source #
(<*) :: (FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p a) => FunctorT p a -> FunctorT p b -> FunctorT p a infixl 4 Source #
Lift (BasicFunctorP (* -> *) []) Source # | |
Lift (BasicFunctorP (* -> *) Maybe) Source # | |
Lift (BasicFunctorP (* -> *) IO) Source # | |
Lift (BasicFunctorP (* -> *) (Either a)) Source # | |
(Ix i, Num i) => Lift (BasicFunctorP (* -> *) (Array i)) Source # | |
Lift (BasicFunctorP (* -> *) Min) Source # | |
Lift (BasicFunctorP (* -> *) Max) Source # | |
Lift (BasicFunctorP (* -> *) First) Source # | |
Lift (BasicFunctorP (* -> *) Last) Source # | |
Lift (BasicFunctorP (* -> *) Option) Source # | |
Lift (BasicFunctorP (* -> *) NonEmpty) Source # | |
Lift (BasicFunctorP (* -> *) Identity) Source # | |
Lift (BasicFunctorP (* -> *) Tree) Source # | |
class Lift p => Apply p where Source #
(<*>) :: FunctorT p (a -> b) -> FunctorT p a -> FunctorT p b infixl 4 Source #
(<*>) :: (FunctorSrcC' p ~ Nothing, FunctorDstC' p ~ Nothing) => FunctorT p (a -> b) -> FunctorT p a -> FunctorT p b infixl 4 Source #
Apply (BasicFunctorP (* -> *) []) Source # | |
Apply (BasicFunctorP (* -> *) Maybe) Source # | |
Apply (BasicFunctorP (* -> *) IO) Source # | |
Apply (BasicFunctorP (* -> *) (Either a)) Source # | |
Apply (BasicFunctorP (* -> *) Min) Source # | |
Apply (BasicFunctorP (* -> *) Max) Source # | |
Apply (BasicFunctorP (* -> *) First) Source # | |
Apply (BasicFunctorP (* -> *) Last) Source # | |
Apply (BasicFunctorP (* -> *) Option) Source # | |
Apply (BasicFunctorP (* -> *) NonEmpty) Source # | |
Apply (BasicFunctorP (* -> *) Identity) Source # | |
Apply (BasicFunctorP (* -> *) Tree) Source # | |
type Applicative p = (Apply p, Pure p) Source #
class (Lift p, Pure p) => Monad p where Source #
(>>=) :: (FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p b) => FunctorT p a -> (a -> FunctorT p b) -> FunctorT p b infixl 1 Source #
(>>) :: (FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p b) => FunctorT p a -> FunctorT p b -> FunctorT p b infixl 1 Source #
Monad (BasicFunctorP (* -> *) []) Source # | |
Monad (BasicFunctorP (* -> *) Maybe) Source # | |
Monad (BasicFunctorP (* -> *) IO) Source # | |
Monad (BasicFunctorP (* -> *) (Either a)) Source # | |
Monad (BasicFunctorP (* -> *) Min) Source # | |
Monad (BasicFunctorP (* -> *) Max) Source # | |
Monad (BasicFunctorP (* -> *) First) Source # | |
Monad (BasicFunctorP (* -> *) Last) Source # | |
Monad (BasicFunctorP (* -> *) Option) Source # | |
Monad (BasicFunctorP (* -> *) NonEmpty) Source # | |
Monad (BasicFunctorP (* -> *) Identity) Source # | |
Monad (BasicFunctorP (* -> *) Tree) Source # | |
(=<<) :: (Monad p, FunctorSrcC p a, FunctorSrcC p b, FunctorDstC p b) => (a -> FunctorT p b) -> FunctorT p a -> FunctorT p b infixr 1 Source #