diff --git a/.travis.yml b/.travis.yml index c33fb6f..a9f23ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js dist: trusty sudo: required -node_js: 6 +node_js: stable env: - PATH=$HOME/purescript:$PATH install: diff --git a/bower.json b/bower.json index 2d7fe91..a04d6fd 100644 --- a/bower.json +++ b/bower.json @@ -17,11 +17,11 @@ "package.json" ], "dependencies": { - "purescript-foldable-traversable": "^2.2.0", - "purescript-prelude": "^2.4.0" + "purescript-foldable-traversable": "^3.0.0", + "purescript-prelude": "^3.0.0" }, "devDependencies": { - "purescript-assert": "^2.0.0", - "purescript-console": "^2.0.0" + "purescript-assert": "^3.0.0", + "purescript-console": "^3.0.0" } } diff --git a/package.json b/package.json index 5054554..bf77170 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "private": true, "scripts": { "clean": "rimraf output && rimraf .pulp-cache", - "build": "pulp build --censor-lib --strict", + "build": "pulp build -- --censor-lib --strict", "test": "pulp test" }, "devDependencies": { - "pulp": "^9.0.1", - "purescript-psa": "^0.3.9", - "rimraf": "^2.5.0" + "pulp": "^10.0.4", + "purescript-psa": "^0.5.0-rc.1", + "rimraf": "^2.6.1" } } diff --git a/src/Data/NonEmpty.purs b/src/Data/NonEmpty.purs index d91d00d..dad163c 100644 --- a/src/Data/NonEmpty.purs +++ b/src/Data/NonEmpty.purs @@ -46,11 +46,11 @@ foldl1 :: forall f a. Foldable f => (a -> a -> a) -> NonEmpty f a -> a foldl1 f (a :| fa) = foldl f a fa -- | Fold a non-empty structure, collecting results in a `Semigroup`. -foldMap1 :: forall f a s. (Semigroup s, Foldable f) => (a -> s) -> NonEmpty f a -> s +foldMap1 :: forall f a s. Semigroup s => Foldable f => (a -> s) -> NonEmpty f a -> s foldMap1 f (a :| fa) = foldl (\s a1 -> s <> f a1) (f a) fa -- | Fold a non-empty structure. -fold1 :: forall f s. (Semigroup s, Foldable f) => NonEmpty f s -> s +fold1 :: forall f s. Semigroup s => Foldable f => NonEmpty f s -> s fold1 = foldMap1 id fromNonEmpty :: forall f a r. (a -> f a -> r) -> NonEmpty f a -> r @@ -70,12 +70,14 @@ tail (_ :| xs) = xs instance showNonEmpty :: (Show a, Show (f a)) => Show (NonEmpty f a) where show (a :| fa) = "(NonEmpty " <> show a <> " " <> show fa <> ")" -derive instance eqNonEmpty :: (Eq a, Eq (f a)) => Eq (NonEmpty f a) +instance eqNonEmpty :: (Eq1 f, Eq a) => Eq (NonEmpty f a) where + eq = eq1 instance eq1NonEmpty :: Eq1 f => Eq1 (NonEmpty f) where eq1 (NonEmpty a fa) (NonEmpty b fb) = a == b && fa `eq1` fb -derive instance ordNonEmpty :: (Ord a, Ord (f a)) => Ord (NonEmpty f a) +instance ordNonEmpty :: (Ord1 f, Ord a) => Ord (NonEmpty f a) where + compare = compare1 instance ord1NonEmpty :: Ord1 f => Ord1 (NonEmpty f) where compare1 (NonEmpty a fa) (NonEmpty b fb) =