File tree 4 files changed +12
-12
lines changed
4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 17
17
" package.json"
18
18
],
19
19
"dependencies" : {
20
- "purescript-control" : " ^3.0.0 " ,
21
- "purescript-newtype" : " ^2.0.0 "
20
+ "purescript-control" : " purescript/purescript-control#compiler/0.12 " ,
21
+ "purescript-newtype" : " purescript/purescript-newtype#compiler/0.12 "
22
22
}
23
23
}
Original file line number Diff line number Diff line change 5
5
"build" : " pulp build -- --censor-lib --strict"
6
6
},
7
7
"devDependencies" : {
8
- "pulp" : " ^10 .0.4 " ,
9
- "purescript-psa" : " ^0.5.0-rc.1 " ,
10
- "rimraf" : " ^2.6.1 "
8
+ "pulp" : " ^12 .0.1 " ,
9
+ "purescript-psa" : " ^0.6.0 " ,
10
+ "rimraf" : " ^2.6.2 "
11
11
}
12
12
}
Original file line number Diff line number Diff line change 1
1
module Control.Biapply where
2
2
3
- import Data.Function (const , id )
3
+ import Data.Function (const , identity )
4
4
5
5
import Data.Bifunctor (class Bifunctor , bimap )
6
6
@@ -10,7 +10,7 @@ import Data.Bifunctor (class Bifunctor, bimap)
10
10
-- | ```purescript
11
11
-- | bipure f g <<$>> x <<*>> y
12
12
-- | ```
13
- infixl 4 id as <<$>>
13
+ infixl 4 identity as <<$>>
14
14
15
15
-- | `Biapply` captures type constructors of two arguments which support lifting of
16
16
-- | functions of one or more arguments, in the sense of `Apply`.
@@ -21,7 +21,7 @@ infixl 4 biapply as <<*>>
21
21
22
22
-- | Keep the results of the second computation.
23
23
biapplyFirst :: forall w a b c d . Biapply w => w a b -> w c d -> w c d
24
- biapplyFirst a b = bimap (const id ) (const id ) <<$>> a <<*>> b
24
+ biapplyFirst a b = bimap (const identity ) (const identity ) <<$>> a <<*>> b
25
25
26
26
infixl 4 biapplyFirst as *>>
27
27
Original file line number Diff line number Diff line change 1
1
module Data.Bifunctor where
2
2
3
- import Control.Category (id )
3
+ import Control.Category (identity )
4
4
5
5
-- | A `Bifunctor` is a `Functor` from the pair category `(Type, Type)` to `Type`.
6
6
-- |
@@ -12,16 +12,16 @@ import Control.Category (id)
12
12
-- |
13
13
-- | Laws:
14
14
-- |
15
- -- | - Identity: `bimap id id == id `
15
+ -- | - Identity: `bimap identity identity == identity `
16
16
-- | - Composition: `bimap f1 g1 <<< bimap f2 g2 == bimap (f1 <<< f2) (g1 <<< g2)`
17
17
-- |
18
18
class Bifunctor f where
19
19
bimap :: forall a b c d . (a -> b ) -> (c -> d ) -> f a c -> f b d
20
20
21
21
-- | Map a function over the first type argument of a `Bifunctor`.
22
22
lmap :: forall f a b c . Bifunctor f => (a -> b ) -> f a c -> f b c
23
- lmap f = bimap f id
23
+ lmap f = bimap f identity
24
24
25
25
-- | Map a function over the second type arguments of a `Bifunctor`.
26
26
rmap :: forall f a b c . Bifunctor f => (b -> c ) -> f a b -> f a c
27
- rmap = bimap id
27
+ rmap = bimap identity
You can’t perform that action at this time.
0 commit comments