| Copyright | (c) Conal Elliott 2007 | 
|---|---|
| License | BSD3 | 
| Maintainer | conal@conal.net | 
| Stability | experimental | 
| Portability | multi-parameter type classes | 
| Safe Haskell | None | 
| Language | Haskell98 | 
Data.Lambda
Description
Make function-like things
type LambdaTy src snk = forall a b. src a -> snk b -> snk (a -> b) Source #
Type of lambda method.  Think of src as the bound variable (or
 pattern) part of a lambda and snk as the expression part.  They
 combine to form a function-typed expression. 
 Instance template:
  instance (Applicative f, Lambda src snk)
    => Lambda (f :. src) (f :. snk) where
      lambda = apLambda
class Lambda src snk where Source #
Type constructor class for function-like things having lambda-like construction.
Minimal complete definition
Instances
| Lambda IO OI Source # | |
| Applicative f => Lambda f ((:->:) f (Const * o)) Source # | |
| Applicative f => Lambda f ((:.) (Flip (->) o) f) Source # | |
| Applicative f => Lambda f ((:.) f (Flip (->) o)) Source # | |
| Lambda Id (Flip (->) o) Source # | |
| (Lambda src snk, Lambda dom' ran') => Lambda ((:*:) src dom') ((:*:) snk ran') Source # | |
| (Arrow j, Unlambda f f', Lambda g g') => Lambda (Arrw j f g) (Arrw j f' g') Source # | |
Dissect function-like things
class Unlambda src snk | snk -> src where Source #
Like Unpair, but for functions.  Minimal instance definition: either (a)
 unlambda or (b) both of fsrc and fres.