Skip to content

Commit 8dc25f5

Browse files
committed
Bump deps for compiler/0.12
1 parent 1145444 commit 8dc25f5

9 files changed

Lines changed: 21 additions & 22 deletions

File tree

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "purescript-profunctor",
33
"homepage": "https://github.com/purescript/purescript-profunctor",
4-
"description": "Profunctor typeclass for PureScript",
4+
"description": "Profunctor type class for PureScript",
55
"authors": [
66
"Hardy Jones <jones3.hardy@gmail.com>",
77
"Sean Chalmers <sclhiannan@gmail.com>",
@@ -22,10 +22,10 @@
2222
"package.json"
2323
],
2424
"dependencies": {
25-
"purescript-contravariant": "^3.0.0",
26-
"purescript-distributive": "^3.0.0",
27-
"purescript-either": "^3.0.0",
28-
"purescript-exists": "^3.0.0",
29-
"purescript-tuples": "^4.0.0"
25+
"purescript-contravariant": "#compiler/0.12",
26+
"purescript-distributive": "#compiler/0.12",
27+
"purescript-either": "#compiler/0.12",
28+
"purescript-exists": "#compiler/0.12",
29+
"purescript-tuples": "#compiler/0.12"
3030
}
3131
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build": "pulp build -- --censor-lib --strict"
66
},
77
"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"
1111
}
1212
}

src/Data/Profunctor.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ import Data.Newtype (class Newtype, wrap, unwrap)
1717
-- |
1818
-- | Laws:
1919
-- |
20-
-- | - Identity: `dimap id id = id`
20+
-- | - Identity: `dimap identity identity = identity`
2121
-- | - Composition: `dimap f1 g1 <<< dimap f2 g2 = dimap (f1 >>> f2) (g1 <<< g2)`
2222
class Profunctor p where
2323
dimap :: forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d
2424

2525
-- | Map a function over the (contravariant) first type argument only.
2626
lmap :: forall a b c p. Profunctor p => (a -> b) -> p b c -> p a c
27-
lmap a2b = dimap a2b id
27+
lmap a2b = dimap a2b identity
2828

2929
-- | Map a function over the (covariant) second type argument only.
3030
rmap :: forall a b c p. Profunctor p => (b -> c) -> p a b -> p a c
31-
rmap b2c = dimap id b2c
31+
rmap b2c = dimap identity b2c
3232

3333
-- | Lift a pure function into any `Profunctor` which is also a `Category`.
3434
arr :: forall a b p. Category p => Profunctor p => (a -> b) -> p a b
35-
arr f = rmap f id
35+
arr f = rmap f identity
3636

3737
unwrapIso :: forall p t a. Profunctor p => Newtype t a => p t t -> p a a
3838
unwrapIso = dimap wrap unwrap

src/Data/Profunctor/Choice.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ fanin
8181
fanin l r = (l +++ r) >>> join
8282
where
8383
join :: p (Either c c) c
84-
join = dimap (either id id) id id
84+
join = dimap (either identity identity) identity identity
8585

8686
infixr 2 fanin as |||

src/Data/Profunctor/Costar.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ instance semigroupoidCostar :: Extend f => Semigroupoid (Costar f) where
2727
compose (Costar f) (Costar g) = Costar (f =<= g)
2828

2929
instance categoryCostar :: Comonad f => Category (Costar f) where
30-
id = Costar extract
30+
identity = Costar extract
3131

3232
instance functorCostar :: Functor (Costar f a) where
3333
map f (Costar g) = Costar (f <<< g)
@@ -65,10 +65,10 @@ instance costrongCostar :: Functor f => Costrong (Costar f) where
6565

6666
instance cochoiceCostar :: Applicative f => Cochoice (Costar f) where
6767
unleft (Costar f) =
68-
let g = either id (\r -> g (pure (Right r))) <<< f
68+
let g = either identity (\r -> g (pure (Right r))) <<< f
6969
in Costar (g <<< map Left)
7070
unright (Costar f) =
71-
let g = either (\l -> g (pure (Left l))) id <<< f
71+
let g = either (\l -> g (pure (Left l))) identity <<< f
7272
in Costar (g <<< map Right)
7373

7474
instance closedCostar :: Functor f => Closed (Costar f) where

src/Data/Profunctor/Join.purs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Prelude
55
import Data.Functor.Invariant (class Invariant)
66
import Data.Newtype (class Newtype)
77
import Data.Profunctor (class Profunctor, dimap)
8-
import Data.Monoid (class Monoid)
98

109
-- | Turns a `Profunctor` into a `Invariant` functor by equating the two type
1110
-- | arguments.
@@ -22,7 +21,7 @@ instance semigroupJoin :: Semigroupoid p => Semigroup (Join p a) where
2221
append (Join a) (Join b) = Join (a <<< b)
2322

2423
instance monoidJoin :: Category p => Monoid (Join p a) where
25-
mempty = Join id
24+
mempty = Join identity
2625

2726
instance invariantJoin :: Profunctor p => Invariant (Join p) where
2827
imap f g (Join a) = Join (dimap g f a)

src/Data/Profunctor/Split.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ unSplit :: forall f a b r. (forall x. (a -> x) -> (x -> b) -> f x -> r) -> Split
3030
unSplit f (Split e) = runExists (\(SplitF g h fx) -> f g h fx) e
3131

3232
liftSplit :: forall f a. f a -> Split f a a
33-
liftSplit = split id id
33+
liftSplit = split identity identity
3434

3535
lowerSplit :: forall f a. Invariant f => Split f a a -> f a
3636
lowerSplit = unSplit (flip imap)

src/Data/Profunctor/Star.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ instance semigroupoidStar :: Bind f => Semigroupoid (Star f) where
2929
compose (Star f) (Star g) = Star \x -> g x >>= f
3030

3131
instance categoryStar :: Monad f => Category (Star f) where
32-
id = Star pure
32+
identity = Star pure
3333

3434
instance functorStar :: Functor f => Functor (Star f a) where
3535
map f (Star g) = Star (map f <<< g)

src/Data/Profunctor/Strong.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ fanout
7878
fanout l r = split >>> (l *** r)
7979
where
8080
split :: p a (Tuple a a)
81-
split = dimap id (\a -> Tuple a a) id
81+
split = dimap identity (\a -> Tuple a a) identity
8282

8383
infixr 3 fanout as &&&

0 commit comments

Comments
 (0)