Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|---|
Safe Haskell | None |
Control.Category.Schoenfinkel
Description
This library generalizes curry
and uncurry
and also gives them
more appropriate names.
import Control.Category.Schoenfinkel main :: IO () main = print (unschoen atan2 (2, 3))
For your convenience there are also Unicode variants of both the
Schoenfinkel
class and its two functions.
- class Category cat => Schoenfinkel cat where
- newtype WrappedSchoenfinkel cat a b = WrappedSchoenfinkel {
- unwrapSchoenfinkel :: cat a b
- type Schönfinkel = Schoenfinkel
- type WrappedSchönfinkel = WrappedSchoenfinkel
- schön :: Schoenfinkel cat => cat (a, b) c -> cat a (cat b c)
- unschön :: Schoenfinkel cat => cat a (cat b c) -> cat (a, b) c
- hässlich :: Schoenfinkel cat => cat a (cat b c) -> cat (a, b) c
Schoenfinkelization
class Category cat => Schoenfinkel cat whereSource
Categories that support Schönfinkelization.
Instances
Schoenfinkel (->) | |
Monad m => Schoenfinkel (Kleisli m) | |
ArrowApply cat => Schoenfinkel (WrappedSchoenfinkel cat) |
ArrowApply-based
newtype WrappedSchoenfinkel cat a b Source
Every ArrowApply
gives rise to a Schoenfinkel
.
Constructors
WrappedSchoenfinkel | |
Fields
|
Instances
Arrow cat => Arrow (WrappedSchoenfinkel cat) | |
ArrowZero cat => ArrowZero (WrappedSchoenfinkel cat) | |
ArrowPlus cat => ArrowPlus (WrappedSchoenfinkel cat) | |
ArrowChoice cat => ArrowChoice (WrappedSchoenfinkel cat) | |
ArrowApply cat => ArrowApply (WrappedSchoenfinkel cat) | |
ArrowLoop cat => ArrowLoop (WrappedSchoenfinkel cat) | |
Category cat => Category (WrappedSchoenfinkel cat) | |
ArrowApply cat => Schoenfinkel (WrappedSchoenfinkel cat) | |
Functor (cat a) => Functor (WrappedSchoenfinkel cat a) | |
Applicative (cat a) => Applicative (WrappedSchoenfinkel cat a) | |
Alternative (cat a) => Alternative (WrappedSchoenfinkel cat a) |
Unicode variants
type Schönfinkel = SchoenfinkelSource
Unicode version of Schoenfinkel
if you prefer.
type WrappedSchönfinkel = WrappedSchoenfinkelSource
Unicode version of WrappedSchoenfinkel
if you prefer.
schön :: Schoenfinkel cat => cat (a, b) c -> cat a (cat b c)Source
Unicode version of schoen
if you prefer.
unschön :: Schoenfinkel cat => cat a (cat b c) -> cat (a, b) cSource
Unicode version of unschoen
if you prefer.
hässlich :: Schoenfinkel cat => cat a (cat b c) -> cat (a, b) cSource
Another appropriate name for 'uncurry'/'unschoen'.