Skip to content

Commit e7377f3

Browse files
bodilLiamGoodacre
authored andcommitted
Update for psc 0.10.
1 parent a27e397 commit e7377f3

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"package.json"
1919
],
2020
"dependencies": {
21-
"purescript-foldable-traversable": "^1.0.0",
22-
"purescript-identity": "^1.1.0",
23-
"purescript-arrays": "^1.0.0",
24-
"purescript-either": "^1.0.0"
21+
"purescript-foldable-traversable": "^2.0.0",
22+
"purescript-identity": "^2.0.0",
23+
"purescript-arrays": "^3.0.0",
24+
"purescript-either": "^2.0.0"
2525
},
2626
"devDependencies": {
27-
"purescript-assert": "^1.0.0",
28-
"purescript-console": "^1.0.0"
27+
"purescript-assert": "^2.0.0",
28+
"purescript-console": "^2.0.0"
2929
}
3030
}

src/Data/Filterable.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Prelude (const)
1717
import Control.Category ((<<<), id)
1818
import Control.Bind ((=<<))
1919
import Data.Semigroup ((<>))
20-
import Data.Functor (class Functor, (<$>))
20+
import Data.Functor (class Functor)
2121
import Data.Foldable (foldl)
2222
import Data.Monoid (class Monoid, mempty)
2323
import Data.Maybe (Maybe(..))

src/Data/Witherable.purs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ import Data.Unit (unit)
1414
import Control.Category ((<<<), id)
1515
import Control.Applicative (class Applicative, pure)
1616
import Data.Monoid (class Monoid, mempty)
17-
import Data.Identity (Identity(..), runIdentity)
17+
import Data.Identity (Identity(..))
1818
import Data.Filterable (class Filterable, partitioned, filtered)
1919
import Data.Functor (map)
2020
import Data.Either (Either(..))
2121
import Data.Maybe (Maybe(..))
22+
import Data.Newtype (unwrap)
2223
import Data.Traversable (class Traversable, traverse)
2324

2425
-- | `Witherable` represents data structures which can be _partitioned_ with
@@ -55,12 +56,12 @@ class (Filterable t, Traversable t) <= Witherable t where
5556
-- | A default implementation of `parititonMap` given a `Witherable`.
5657
partitionMapByWilt :: forall t a l r. Witherable t =>
5758
(a -> Either l r) -> t a -> { left :: t l, right :: t r }
58-
partitionMapByWilt p = runIdentity <<< wilt (Identity <<< p)
59+
partitionMapByWilt p = unwrap <<< wilt (Identity <<< p)
5960

6061
-- | A default implementation of `filterMap` given a `Witherable`.
6162
filterMapByWither :: forall t a b. Witherable t =>
6263
(a -> Maybe b) -> t a -> t b
63-
filterMapByWither p = runIdentity <<< wither (Identity <<< p)
64+
filterMapByWither p = unwrap <<< wither (Identity <<< p)
6465

6566
-- | A default implementation of `traverse` given a `Witherable`.
6667
traverseByWither :: forall t m a b. (Witherable t, Applicative m) =>

0 commit comments

Comments
 (0)