Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 47ce397

Browse files
authored
Merge pull request #39 from purescript/ps-0.11
Update for PureScript 0.11
2 parents 5de077c + 0fd12f8 commit 47ce397

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 6
4+
node_js: stable
55
env:
66
- PATH=$HOME/purescript:$PATH
77
install:

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"package.json"
2020
],
2121
"dependencies": {
22-
"purescript-maps": "^2.0.0",
23-
"purescript-tailrec": "^2.0.0"
22+
"purescript-maps": "^3.0.0",
23+
"purescript-tailrec": "^3.0.0"
2424
},
2525
"devDependencies": {
26-
"purescript-assert": "^2.0.0",
27-
"purescript-console": "^2.0.0"
26+
"purescript-assert": "^3.0.0",
27+
"purescript-console": "^3.0.0"
2828
}
2929
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "pulp build --censor-lib --strict",
5+
"build": "pulp build -- --censor-lib --strict",
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"pulp": "^9.0.1",
10-
"purescript-psa": "^0.3.9",
11-
"rimraf": "^2.5.0"
9+
"pulp": "^10.0.4",
10+
"purescript-psa": "^0.5.0-rc.1",
11+
"rimraf": "^2.6.1"
1212
}
1313
}

src/Data/Set.purs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import Control.Monad.Rec.Class (Step(..), tailRecM2)
3131
import Control.Monad.ST (ST)
3232

3333
import Data.Array as Array
34+
import Data.Eq (class Eq1)
3435
import Data.Array.ST (STArray, emptySTArray, runSTArray, pushSTArray)
3536
import Data.Foldable (class Foldable, foldMap, foldl, foldr)
3637
import Data.List (List)
@@ -45,7 +46,7 @@ import Partial.Unsafe (unsafePartial)
4546
data Set a = Set (M.Map a Unit)
4647

4748
-- | Create a set from a foldable structure.
48-
fromFoldable :: forall f a. (Foldable f, Ord a) => f a -> Set a
49+
fromFoldable :: forall f a. Foldable f => Ord a => f a -> Set a
4950
fromFoldable = foldl (\m a -> insert a m) empty
5051

5152
-- | Convert a set to an unfoldable structure.
@@ -58,6 +59,9 @@ toList (Set m) = M.keys m
5859
instance eqSet :: Eq a => Eq (Set a) where
5960
eq (Set m1) (Set m2) = m1 == m2
6061

62+
instance eq1Set :: Eq1 Set where
63+
eq1 = eq
64+
6165
instance showSet :: Show a => Show (Set a) where
6266
show s = "(fromFoldable " <> show (toList s) <> ")"
6367

@@ -124,7 +128,7 @@ union :: forall a. Ord a => Set a -> Set a -> Set a
124128
union (Set m1) (Set m2) = Set (m1 `M.union` m2)
125129

126130
-- | Form the union of a collection of sets
127-
unions :: forall f a. (Foldable f, Ord a) => f (Set a) -> Set a
131+
unions :: forall f a. Foldable f => Ord a => f (Set a) -> Set a
128132
unions = foldl union empty
129133

130134
-- | Form the set difference

0 commit comments

Comments
 (0)