Skip to content

Commit cf538a6

Browse files
committed
Update for changes in prelude
1 parent 3a23145 commit cf538a6

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

.travis.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
2-
sudo: required
32
dist: trusty
4-
node_js: 5
3+
sudo: required
4+
node_js: 6
55
env:
66
- PATH=$HOME/purescript:$PATH
77
install:
@@ -13,12 +13,9 @@ install:
1313
- npm install
1414
- bower install
1515
script:
16-
- npm run build
16+
- npm run -s build
1717
after_success:
1818
- >-
1919
test $TRAVIS_TAG &&
20-
psc-publish > .pursuit.json &&
21-
curl -X POST http://pursuit.purescript.org/packages \
22-
-d @.pursuit.json \
23-
-H 'Accept: application/json' \
24-
-H "Authorization: token ${GITHUB_TOKEN}"
20+
echo $GITHUB_TOKEN | pulp login &&
21+
echo y | pulp publish --no-push

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"package.json"
2323
],
2424
"dependencies": {
25-
"purescript-contravariant": "^1.0.0-rc.1",
26-
"purescript-foldable-traversable": "^1.0.0-rc.1"
25+
"purescript-contravariant": "^1.0.0-rc.2",
26+
"purescript-foldable-traversable": "^1.0.0-rc.2"
2727
}
2828
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "pulp build"
5+
"build": "pulp build --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"pulp": "^8.1.0",
8+
"pulp": "^8.2.0",
9+
"purescript-psa": "^0.3.8",
910
"rimraf": "^2.5.0"
1011
}
1112
}

src/Data/Const.purs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import Control.Apply (class Apply)
55
import Control.Bind (class Bind)
66
import Control.Semigroupoid (class Semigroupoid)
77

8-
import Data.BooleanAlgebra (class BooleanAlgebra, not, (||), (&&))
8+
import Data.BooleanAlgebra (class BooleanAlgebra)
99
import Data.Bounded (class Bounded, bottom, top)
10-
import Data.BoundedOrd (class BoundedOrd)
11-
import Data.DivisionRing (class DivisionRing)
10+
import Data.CommutativeRing (class CommutativeRing)
1211
import Data.Eq (class Eq, (==))
12+
import Data.EuclideanRing (class EuclideanRing, mod, degree, (/))
13+
import Data.Field (class Field)
1314
import Data.Foldable (class Foldable)
1415
import Data.Functor (class Functor)
1516
import Data.Functor.Contravariant (class Contravariant)
1617
import Data.Functor.Invariant (class Invariant, imapF)
17-
import Data.ModuloSemiring (class ModuloSemiring, mod, (/))
18+
import Data.HeytingAlgebra (class HeytingAlgebra, not, implies, tt, ff, (&&), (||))
1819
import Data.Monoid (class Monoid, mempty)
19-
import Data.Num (class Num)
2020
import Data.Ord (class Ord, compare)
2121
import Data.Ring (class Ring, (-))
2222
import Data.Semigroup (class Semigroup, (<>))
@@ -47,8 +47,6 @@ instance boundedConst :: Bounded a => Bounded (Const a b) where
4747
top = Const top
4848
bottom = Const bottom
4949

50-
instance boundedOrdConst :: BoundedOrd a => BoundedOrd (Const a b)
51-
5250
instance showConst :: Show a => Show (Const a b) where
5351
show (Const x) = "(Const " <> show x <> ")"
5452

@@ -70,19 +68,25 @@ instance semiringConst :: Semiring a => Semiring (Const a b) where
7068
instance ringConst :: Ring a => Ring (Const a b) where
7169
sub (Const x) (Const y) = Const (x - y)
7270

73-
instance moduloSemiringConst :: ModuloSemiring a => ModuloSemiring (Const a b) where
71+
instance euclideanRingConst :: EuclideanRing a => EuclideanRing (Const a b) where
72+
degree (Const x) = degree x
7473
div (Const x) (Const y) = Const (x / y)
7574
mod (Const x) (Const y) = Const (x `mod` y)
7675

77-
instance divisionRingConst :: DivisionRing a => DivisionRing (Const a b)
76+
instance commutativeRingConst :: CommutativeRing a => CommutativeRing (Const a b)
7877

79-
instance numConst :: Num a => Num (Const a b)
78+
instance fieldConst :: Field a => Field (Const a b)
8079

81-
instance booleanAlgebraConst :: BooleanAlgebra a => BooleanAlgebra (Const a b) where
80+
instance heytingAlgebraConst :: HeytingAlgebra a => HeytingAlgebra (Const a b) where
81+
ff = Const ff
82+
tt = Const tt
83+
implies (Const x) (Const y) = Const (x `implies` y)
8284
conj (Const x) (Const y) = Const (x && y)
8385
disj (Const x) (Const y) = Const (x || y)
8486
not (Const x) = Const (not x)
8587

88+
instance booleanAlgebraConst :: BooleanAlgebra a => BooleanAlgebra (Const a b)
89+
8690
instance functorConst :: Functor (Const a) where
8791
map _ (Const x) = Const x
8892

0 commit comments

Comments
 (0)