first-class-families-0.8.2.0: First-class type families

Safe Haskell | Safe-Inferred
Language | Haskell2010

Fcf.Combinators

Description

General fcf combinators.

See also Fcf.Data.Function for more.

Synopsis

- data Pure (b :: a) (c :: a)
- data Pure1 (c :: a -> b) (d :: a) (e :: b)
- data Pure2 (d :: a -> b -> c) (e :: a) (f :: b) (g :: c)
- data Pure3 (e :: a -> b -> c -> d) (f :: a) (g :: b) (h :: c) (i :: d)
- data Pure4 (f :: a -> b -> c -> d -> e) (g :: a) (h :: b) (i :: c) (j :: d) (k :: e)
- data Pure5 (g :: a -> b -> c -> d -> e -> f) (h :: a) (i :: b) (j :: c) (k :: d) (l :: e) (m :: f)
- data Pure6 (h :: a -> b -> c -> d -> e -> f -> g) (i :: a) (j :: b) (k :: c) (l :: d) (m :: e) (n :: f) (o :: g)
- data Pure7 (i :: a -> b -> c -> d -> e -> f -> g -> h) (j :: a) (k :: b) (l :: c) (m :: d) (n :: e) (o :: f) (p :: g) (q :: h)
- data Pure8 (j :: a -> b -> c -> d -> e -> f -> g -> h -> i) (k :: a) (l :: b) (m :: c) (n :: d) (o :: e) (p :: f) (q :: g) (r :: h) (s :: i)
- data Pure9 (k :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j) (l :: a) (m :: b) (n :: c) (o :: d) (p :: e) (q :: f) (r :: g) (s :: h) (t :: i) (u :: j)
- data ((c :: a -> Exp b) =<< (d :: Exp a)) (e :: b)
- data ((c :: Exp a) >>= (d :: a -> Exp b)) (e :: b)
- data ((d :: b -> Exp c) <=< (e :: a -> Exp b)) (f :: a) (g :: c)
- type LiftM = (=<<) :: (a -> Exp b) -> Exp a -> b -> Type
- data LiftM2 (d :: a -> b -> Exp c) (e :: Exp a) (f :: Exp b) (g :: c)
- data LiftM3 (e :: a -> b -> c -> Exp d) (f :: Exp a) (g :: Exp b) (h :: Exp c) (i :: d)
- data Join (b :: Exp (Exp a)) (c :: a)
- data ((c :: a -> b) <$> (d :: Exp a)) (e :: b)
- data ((c :: Exp (a -> b)) <*> (d :: Exp a)) (e :: b)
- data Flip (d :: a -> b -> Exp c) (e :: b) (f :: a) (g :: c)
- data ConstFn (c :: a) (d :: b) (e :: a)
- data ((c :: a -> Exp b) $ (d :: a)) (e :: b)

# Documentation

data Pure (b :: a) (c :: a) Source #

#### Instances

Instances details

type Eval (Pure x :: a -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure x :: a -> Type) = x

data Pure1 (c :: a -> b) (d :: a) (e :: b) Source #

#### Instances

Instances details

type Eval (Pure1 f x :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure1 f x :: a2 -> Type) = f x

data Pure2 (d :: a -> b -> c) (e :: a) (f :: b) (g :: c) Source #

#### Instances

Instances details

type Eval (Pure2 f x y :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure2 f x y :: a2 -> Type) = f x y

data Pure3 (e :: a -> b -> c -> d) (f :: a) (g :: b) (h :: c) (i :: d) Source #

#### Instances

Instances details

type Eval (Pure3 f x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure3 f x y z :: a2 -> Type) = f x y z

data Pure4 (f :: a -> b -> c -> d -> e) (g :: a) (h :: b) (i :: c) (j :: d) (k :: e) Source #

#### Instances

Instances details

type Eval (Pure4 f w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure4 f w x y z :: a2 -> Type) = f w x y z

data Pure5 (g :: a -> b -> c -> d -> e -> f) (h :: a) (i :: b) (j :: c) (k :: d) (l :: e) (m :: f) Source #

#### Instances

Instances details

type Eval (Pure5 f v w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure5 f v w x y z :: a2 -> Type) = f v w x y z

data Pure6 (h :: a -> b -> c -> d -> e -> f -> g) (i :: a) (j :: b) (k :: c) (l :: d) (m :: e) (n :: f) (o :: g) Source #

#### Instances

Instances details

type Eval (Pure6 f2 u v w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure6 f2 u v w x y z :: a2 -> Type) = f2 u v w x y z

data Pure7 (i :: a -> b -> c -> d -> e -> f -> g -> h) (j :: a) (k :: b) (l :: c) (m :: d) (n :: e) (o :: f) (p :: g) (q :: h) Source #

#### Instances

Instances details

type Eval (Pure7 f2 t u v w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure7 f2 t u v w x y z :: a2 -> Type) = f2 t u v w x y z

data Pure8 (j :: a -> b -> c -> d -> e -> f -> g -> h -> i) (k :: a) (l :: b) (m :: c) (n :: d) (o :: e) (p :: f) (q :: g) (r :: h) (s :: i) Source #

#### Instances

Instances details

type Eval (Pure8 f2 s t u v w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure8 f2 s t u v w x y z :: a2 -> Type) = f2 s t u v w x y z

data Pure9 (k :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j) (l :: a) (m :: b) (n :: c) (o :: d) (p :: e) (q :: f) (r :: g) (s :: h) (t :: i) (u :: j) Source #

#### Instances

Instances details

type Eval (Pure9 f2 r s t u v w x y z :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Pure9 f2 r s t u v w x y z :: a2 -> Type) = f2 r s t u v w x y z

data ((c :: a -> Exp b) =<< (d :: Exp a)) (e :: b) infixr 1 Source #

#### Instances

Instances details

type Eval (k =<< e :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (k =<< e :: a2 -> Type) = Eval (k (Eval e))

data ((c :: Exp a) >>= (d :: a -> Exp b)) (e :: b) infixl 1 Source #

#### Instances

Instances details

type Eval (e >>= k :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (e >>= k :: a2 -> Type) = Eval (k (Eval e))

data ((d :: b -> Exp c) <=< (e :: a -> Exp b)) (f :: a) (g :: c) infixr 1 Source #

#### Instances

Instances details

type Eval ((f <=< g) x :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval ((f <=< g) x :: a2 -> Type) = Eval (f (Eval (g x)))

type LiftM = (=<<) :: (a -> Exp b) -> Exp a -> b -> Type Source #

data LiftM2 (d :: a -> b -> Exp c) (e :: Exp a) (f :: Exp b) (g :: c) Source #

#### Instances

Instances details

type Eval (LiftM2 f x y :: a3 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (LiftM2 f x y :: a3 -> Type) = Eval (f (Eval x) (Eval y))

data LiftM3 (e :: a -> b -> c -> Exp d) (f :: Exp a) (g :: Exp b) (h :: Exp c) (i :: d) Source #

#### Instances

Instances details

type Eval (LiftM3 f x y z :: a4 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (LiftM3 f x y z :: a4 -> Type) = Eval (f (Eval x) (Eval y) (Eval z))

data Join (b :: Exp (Exp a)) (c :: a) Source #

#### Instances

Instances details

type Eval (Join e :: a -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Join e :: a -> Type) = Eval (Eval e)

data ((c :: a -> b) <$> (d :: Exp a)) (e :: b) infixl 4 Source #

#### Instances

Instances details

type Eval (f <$> e :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (f <$> e :: a2 -> Type) = f (Eval e)

data ((c :: Exp (a -> b)) <*> (d :: Exp a)) (e :: b) infixl 4 Source #

#### Instances

Instances details

type Eval (f <*> e :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (f <*> e :: a2 -> Type) = Eval f (Eval e)

data Flip (d :: a -> b -> Exp c) (e :: b) (f :: a) (g :: c) Source #

#### Instances

Instances details

type Eval (Flip f y x :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (Flip f y x :: a2 -> Type) = Eval (f x y)

data ConstFn (c :: a) (d :: b) (e :: a) Source #

#### Instances

Instances details

type Eval (ConstFn a2 _b :: a1 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (ConstFn a2 _b :: a1 -> Type) = a2

data ((c :: a -> Exp b) $ (d :: a)) (e :: b) infixr 0 Source #

Note that this denotes the identity function, so `($) f` can usually be replaced with `f`.

#### Instances

Instances details

type Eval (f $ a3 :: a2 -> Type) Source # |
Instance details Defined in Fcf.Combinators type Eval (f $ a3 :: a2 -> Type) = Eval (f a3)