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

Commit a2e2a7d

Browse files
authored
Merge pull request #44 from themoritz/master
purs 0.11 changes
2 parents 4be095a + 286006f commit a2e2a7d

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
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
install:
66
- npm install -g bower
77
- npm install

bower.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"package.json"
1919
],
2020
"dependencies": {
21-
"purescript-console": "^2.0.0",
22-
"purescript-enums": "^2.0.0",
23-
"purescript-exceptions": "^2.0.0",
24-
"purescript-free": "^3.0.0",
25-
"purescript-machines": "^2.0.0",
26-
"purescript-random": "^2.0.0",
27-
"purescript-arrays": "^3.0.0",
28-
"purescript-datetime": "^2.1.1"
21+
"purescript-console": "^3.0.0",
22+
"purescript-enums": "^3.0.0",
23+
"purescript-exceptions": "^3.0.0",
24+
"purescript-free": "^4.0.0",
25+
"purescript-machines": "^4.0.0",
26+
"purescript-random": "^3.0.0",
27+
"purescript-arrays": "^4.0.1",
28+
"purescript-datetime": "^3.0.0"
2929
}
3030
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"pulp": "^10.0.0",
10-
"purescript-psa": "^0.3.9",
11-
"purescript": "^0.10.2",
12-
"rimraf": "^2.5.4"
9+
"pulp": "^11.0.0",
10+
"purescript-psa": "^0.5.0",
11+
"purescript": "^0.11.1",
12+
"rimraf": "^2.6.1"
1313
}
1414
}

src/Test/StrongCheck.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import Test.StrongCheck.Arbitrary (class Arbitrary, arbitrary, class Coarbitrary
4747
import Test.StrongCheck.LCG (Seed, mkSeed) as Exports
4848

4949
-- | A type synonym for StrongCheck effects in Eff.
50-
type SC eff a = Eff (console :: CONSOLE, random :: RANDOM, err :: EXCEPTION | eff) a
50+
type SC eff a = Eff (console :: CONSOLE, random :: RANDOM, exception :: EXCEPTION | eff) a
5151

5252
-- | The result of a property test.
5353
data Result = Success | Failed String
@@ -165,7 +165,7 @@ statCheckPure s freq prop = try 100
165165
defState :: Seed -> GenState
166166
defState s = (GenState {seed: s, size: 10})
167167

168-
check :: forall eff prop f. (Testable prop, Foldable f) => (prop -> f (Tuple Seed Result)) -> prop -> SC eff Unit
168+
check :: forall eff prop f. Testable prop => Foldable f => (prop -> f (Tuple Seed Result)) -> prop -> SC eff Unit
169169
check f prop = do
170170
let results = f prop
171171
let successes = countSuccesses results
@@ -201,7 +201,7 @@ infix 1 annotate as <?>
201201

202202
-- | Asserts that two values are equal, resulting in a `Failure` if they are
203203
-- | not, with a message showing the values involved.
204-
assertEq :: forall a. (Eq a, Show a) => a -> a -> Result
204+
assertEq :: forall a. Eq a => Show a => a -> a -> Result
205205
assertEq a b = a == b <?> msg
206206
where
207207
msg = show a <> " /= " <> show b
@@ -210,7 +210,7 @@ infix 2 assertEq as ===
210210

211211
-- | Asserts that two values are not equal, resulting in a `Failure` if they
212212
-- | are, with a message showing the values involved.
213-
assertNotEq :: forall a. (Eq a, Show a) => a -> a -> Result
213+
assertNotEq :: forall a. Eq a => Show a => a -> a -> Result
214214
assertNotEq a b = a /= b <?> msg
215215
where
216216
msg = show a <> " == " <> show b

src/Test/StrongCheck/Data/ArbDateTime.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ instance arbitraryArbTime ∷ Arbitrary ArbTime where
3131

3232
instance coarbitraryArbTimeCoarbitrary ArbTime where
3333
coarbitrary (ArbTime t) = do
34-
coarbitrary $ fromEnum (DT.hour t)
35-
coarbitrary $ fromEnum (DT.minute t)
36-
coarbitrary $ fromEnum (DT.second t)
34+
_ <- coarbitrary $ fromEnum (DT.hour t)
35+
_ <- coarbitrary $ fromEnum (DT.minute t)
36+
_ <- coarbitrary $ fromEnum (DT.second t)
3737
coarbitrary $ fromEnum (DT.millisecond t)
3838

3939
newtype ArbDate = ArbDate DT.Date
@@ -55,8 +55,8 @@ instance arbitraryArbDate ∷ Arbitrary ArbDate where
5555

5656
instance coarbitraryArbDateCoarbitrary ArbDate where
5757
coarbitrary (ArbDate dt) = do
58-
coarbitrary $ fromEnum (DT.year dt)
59-
coarbitrary $ fromEnum (DT.month dt)
58+
_ <- coarbitrary $ fromEnum (DT.year dt)
59+
_ <- coarbitrary $ fromEnum (DT.month dt)
6060
coarbitrary $ fromEnum (DT.day dt)
6161

6262
newtype ArbDateTime = ArbDateTime DT.DateTime
@@ -74,5 +74,5 @@ instance arbitraryArbDateTime ∷ Arbitrary ArbDateTime where
7474

7575
instance coarbitraryArbDateTimeCoarbitrary ArbDateTime where
7676
coarbitrary (ArbDateTime dt) = do
77-
coarbitrary $ ArbDate (DT.date dt)
77+
_ <- coarbitrary $ ArbDate (DT.date dt)
7878
coarbitrary $ ArbTime (DT.time dt)

src/Test/StrongCheck/Landscape.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ sampleHere :: forall a. Perturb a => Int -> Landscape a -> Array a
109109
sampleHere n = (<$>) (unDriverState >>> \v -> v.value) <<< sampleHere' n
110110

111111
-- | Moves to a location in a landscape that was previously sampled.
112-
moveTo :: forall a. (Eq a, Perturb a) => a -> Landscape a -> Maybe (Landscape a)
112+
moveTo :: forall a. Eq a => Perturb a => a -> Landscape a -> Maybe (Landscape a)
113113
moveTo a v = Landscape <$> moveIt a v
114114
where moveIt a' = force <<< L.head <<< L.filter (\v' -> (unDriverState (head v')).value == a') <<< tail <<< unLandscape
115115

src/Test/StrongCheck/Perturb.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ k0 = Math.log(maxNumber + 1.0)
273273
square :: Number -> Number
274274
square = flip Math.pow 2.0
275275

276-
toDist :: forall f. (Foldable f, Functor f) => f Number -> Number
276+
toDist :: forall f. Foldable f => Functor f => f Number -> Number
277277
toDist xs = Math.sqrt (sum $ square <$> xs)
278278

279279
delta :: Number -> Number -> Number

0 commit comments

Comments
 (0)