first-class-families-0.8.1.0: First-class type families
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 ((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 ((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)