Skip to content

Commit 1e1111e

Browse files
authored
Merge pull request #20 from purescript/ps-0.11
Update for PureScript 0.11
2 parents 924be7a + 76ff0b0 commit 1e1111e

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
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
@@ -17,11 +17,11 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-foldable-traversable": "^2.2.0",
21-
"purescript-prelude": "^2.4.0"
20+
"purescript-foldable-traversable": "^3.0.0",
21+
"purescript-prelude": "^3.0.0"
2222
},
2323
"devDependencies": {
24-
"purescript-assert": "^2.0.0",
25-
"purescript-console": "^2.0.0"
24+
"purescript-assert": "^3.0.0",
25+
"purescript-console": "^3.0.0"
2626
}
2727
}

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/NonEmpty.purs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ foldl1 :: forall f a. Foldable f => (a -> a -> a) -> NonEmpty f a -> a
4646
foldl1 f (a :| fa) = foldl f a fa
4747

4848
-- | Fold a non-empty structure, collecting results in a `Semigroup`.
49-
foldMap1 :: forall f a s. (Semigroup s, Foldable f) => (a -> s) -> NonEmpty f a -> s
49+
foldMap1 :: forall f a s. Semigroup s => Foldable f => (a -> s) -> NonEmpty f a -> s
5050
foldMap1 f (a :| fa) = foldl (\s a1 -> s <> f a1) (f a) fa
5151

5252
-- | Fold a non-empty structure.
53-
fold1 :: forall f s. (Semigroup s, Foldable f) => NonEmpty f s -> s
53+
fold1 :: forall f s. Semigroup s => Foldable f => NonEmpty f s -> s
5454
fold1 = foldMap1 id
5555

5656
fromNonEmpty :: forall f a r. (a -> f a -> r) -> NonEmpty f a -> r
@@ -70,12 +70,14 @@ tail (_ :| xs) = xs
7070
instance showNonEmpty :: (Show a, Show (f a)) => Show (NonEmpty f a) where
7171
show (a :| fa) = "(NonEmpty " <> show a <> " " <> show fa <> ")"
7272

73-
derive instance eqNonEmpty :: (Eq a, Eq (f a)) => Eq (NonEmpty f a)
73+
instance eqNonEmpty :: (Eq1 f, Eq a) => Eq (NonEmpty f a) where
74+
eq = eq1
7475

7576
instance eq1NonEmpty :: Eq1 f => Eq1 (NonEmpty f) where
7677
eq1 (NonEmpty a fa) (NonEmpty b fb) = a == b && fa `eq1` fb
7778

78-
derive instance ordNonEmpty :: (Ord a, Ord (f a)) => Ord (NonEmpty f a)
79+
instance ordNonEmpty :: (Ord1 f, Ord a) => Ord (NonEmpty f a) where
80+
compare = compare1
7981

8082
instance ord1NonEmpty :: Ord1 f => Ord1 (NonEmpty f) where
8183
compare1 (NonEmpty a fa) (NonEmpty b fb) =

0 commit comments

Comments
 (0)