File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 " package.json"
2828 ],
2929 "dependencies" : {
30- "purescript-either" : " ~ 0.2.0" ,
31- "purescript-tuples" : " ~ 0.4.0"
30+ "purescript-either" : " ^ 0.2.0" ,
31+ "purescript-tuples" : " ^ 0.4.0"
3232 }
3333}
Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ class (Profunctor p) <= Choice p where
88 right :: forall a b c. p b c -> p (Either a b) (Either a c)
99```
1010
11- ##### Instances
12- ``` purescript
13- instance choiceArr :: Choice Function
14- ```
15-
1611The ` Choice ` class extends ` Profunctor ` with combinators for working with
1712sum types.
1813
1914` left ` and ` right ` lift values in a ` Profunctor ` to act on the ` Left ` and
2015` Right ` components of a sum, respectively.
2116
17+ ##### Instances
18+ ``` purescript
19+ instance choiceFn :: Choice Function
20+ ```
21+
2222#### ` (+++) `
2323
2424``` purescript
Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ class (Profunctor p) <= Strong p where
88 second :: forall a b c. p b c -> p (Tuple a b) (Tuple a c)
99```
1010
11- ##### Instances
12- ``` purescript
13- instance strongArr :: Strong Function
14- ```
15-
1611The ` Strong ` class extends ` Profunctor ` with combinators for working with
1712product types.
1813
1914` first ` and ` second ` lift values in a ` Profunctor ` to act on the first and
2015second components of a ` Tuple ` , respectively.
2116
17+ ##### Instances
18+ ``` purescript
19+ instance strongFn :: Strong Function
20+ ```
21+
2222#### ` (***) `
2323
2424``` purescript
Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ class Profunctor p where
77 dimap :: forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d
88```
99
10- ##### Instances
11- ``` purescript
12- instance profunctorArr :: Profunctor Function
13- ```
14-
1510A ` Profunctor ` is a ` Functor ` from the pair category ` (Type^op, Type) `
1611to ` Type ` .
1712
2924- Identity: ` dimap id id = id `
3025- Composition: ` dimap f1 g1 <<< dimap f2 g2 = dimap (f1 >>> f2) (g1 <<< g2) `
3126
27+ ##### Instances
28+ ``` purescript
29+ instance profunctorFn :: Profunctor Function
30+ ```
31+
3232#### ` lmap `
3333
3434``` purescript
Original file line number Diff line number Diff line change 33 "devDependencies" : {
44 "gulp" : " ^3.8.11" ,
55 "gulp-plumber" : " ^1.0.0" ,
6- "gulp-purescript" : " ^0.5.0" ,
6+ "gulp-purescript" : " ^0.5.0-rc.1 " ,
77 "rimraf" : " ^2.3.3"
88 }
99}
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ rmap b2c = dimap id b2c
3333arr :: forall a b p . (Category p , Profunctor p ) => (a -> b ) -> p a b
3434arr f = rmap f id
3535
36- instance profunctorArr :: Profunctor (-> ) where
36+ instance profunctorFn :: Profunctor (-> ) where
3737 dimap a2b c2d b2c = a2b >>> b2c >>> c2d
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class (Profunctor p) <= Choice p where
1414 left :: forall a b c . p a b -> p (Either a c ) (Either b c )
1515 right :: forall a b c . p b c -> p (Either a b ) (Either a c )
1616
17- instance choiceArr :: Choice (-> ) where
17+ instance choiceFn :: Choice (-> ) where
1818 left a2b (Left a) = Left $ a2b a
1919 left _ (Right c) = Right c
2020 right = (<$>)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class (Profunctor p) <= Strong p where
1414 first :: forall a b c . p a b -> p (Tuple a c ) (Tuple b c )
1515 second :: forall a b c . p b c -> p (Tuple a b ) (Tuple a c )
1616
17- instance strongArr :: Strong (-> ) where
17+ instance strongFn :: Strong (-> ) where
1818 first a2b (Tuple a c) = Tuple (a2b a) c
1919 second = (<$>)
2020
You can’t perform that action at this time.
0 commit comments