-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Combining functions -- -- MPTC/FD generalisations of (.) and flip @package function-combine @version 0.0.1 module Control.Combine data Z Z :: Z data S n S :: n -> S n zero :: Z one :: S Z two :: S (S Z) three :: S (S (S Z)) class Nat n fromNat :: (Nat n, Enum e) => n -> e class ComposeType n a b c | n a b -> c data C f g class Compose n a b c | n a b -> c compose :: Compose n a b c => n -> a -> b -> c class FlipType n a b | n a -> b class RotType n a b | n a -> b data R a class Rot n a b | n a -> b rot :: Rot n a b => n -> a -> b instance (RotType n a b, Apply (R a) n (a -> b)) => Rot n a b instance (Apply (R b) (S n) (b -> f), FlipType (S n) a ((c -> d -> e) -> d -> c -> e), Compose n ((c -> d -> e) -> d -> c -> e) a b) => Apply (R a) (S (S n)) (a -> f) instance Apply (R (b -> a -> c)) (S Z) ((b -> a -> c) -> a -> b -> c) instance Apply (R a) Z (a -> a) instance (RotType (S n) b g, FlipType (S n) a ((d -> e -> f) -> e -> d -> f), ComposeType n ((d -> e -> f) -> e -> d -> f) a b) => RotType (S (S n)) a g instance (TypeCast d b, TypeCast e a, TypeCast f c) => RotType (S Z) (a -> b -> c) (d -> e -> f) instance TypeCast a b => RotType Z a b instance FlipType n f ((a -> b -> c -> d) -> b -> a -> c -> d) => FlipType (S n) f ((b -> c -> d) -> c -> b -> d) instance (TypeCast d a, TypeCast e b, TypeCast f c) => FlipType Z (a -> b -> c) ((d -> e -> f) -> e -> d -> f) instance (ComposeType n (b -> c) (a -> f) (d -> e), Apply (C (b -> c) (a -> f)) n ((b -> c) -> (a -> f) -> d -> e)) => Compose n (b -> c) (a -> f) (d -> e) instance Apply (C (b -> c) s) n ((b -> c) -> s -> t) => Apply (C (b -> c) (a -> s)) (S n) ((b -> c) -> (a -> s) -> a -> t) instance Apply (C (b -> c) (a -> b)) Z ((b -> c) -> (a -> b) -> a -> c) instance ComposeType n (b -> c) s t => ComposeType (S n) (b -> c) (a -> s) (a -> t) instance (TypeCast d a, TypeCast e c, TypeCast f b) => ComposeType Z (b -> c) (a -> f) (d -> e) instance Nat n => Nat (S n) instance Nat Z