Skip to content

Commit 32787f4

Browse files
v6.0.0 (#292)
Co-authored-by: Thomas Honeyman <admin@thomashoneyman.com>
1 parent 5f1ba9f commit 32787f4

File tree

14 files changed

+117
-56
lines changed

14 files changed

+117
-56
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
with:
1616
purescript: "unstable"
1717

18-
- uses: actions/setup-node@v1
18+
- uses: actions/setup-node@v2
1919
with:
20-
node-version: "12"
20+
node-version: "14.x"
2121

2222
- name: Install dependencies
2323
run: |

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ Notable changes to this project are documented in this file. The format is based
44

55
## [Unreleased]
66

7+
Breaking changes:
8+
9+
New features:
10+
11+
Bugfixes:
12+
13+
Other improvements:
14+
15+
## [v6.0.0](https://github.com/purescript/purescript-prelude/releases/tag/v6.0.0) - 2022-04-27
16+
717
Breaking changes:
818
- Migrated FFI to ES Modules (#287 by @kl0tl and @JordanMartinez)
919
- Change Generic Rep's `NoConstructors` to newtype `Void` (#282 by @JordanMartinez)

src/Control/Applicative.purs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module Control.Applicative
2-
( class Applicative, pure
2+
( class Applicative
3+
, pure
34
, liftA1
4-
, unless, when
5+
, unless
6+
, when
57
, module Control.Apply
68
, module Data.Functor
79
) where
@@ -37,7 +39,7 @@ instance applicativeFn :: Applicative ((->) r) where
3739
pure x _ = x
3840

3941
instance applicativeArray :: Applicative Array where
40-
pure x = [x]
42+
pure x = [ x ]
4143

4244
instance applicativeProxy :: Applicative Proxy where
4345
pure _ = Proxy

src/Control/Apply.purs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
module Control.Apply
2-
( class Apply, apply, (<*>)
3-
, applyFirst, (<*)
4-
, applySecond, (*>)
5-
, lift2, lift3, lift4, lift5
2+
( class Apply
3+
, apply
4+
, (<*>)
5+
, applyFirst
6+
, (<*)
7+
, applySecond
8+
, (*>)
9+
, lift2
10+
, lift3
11+
, lift4
12+
, lift5
613
, module Data.Functor
714
) where
815

src/Control/Category.purs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module Control.Category
2-
( class Category, identity
2+
( class Category
3+
, identity
34
, module Control.Semigroupoid
45
) where
56

src/Control/Monad.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ whenM mb m = do
6262
-- | Perform a monadic action unless a condition is true, where the conditional
6363
-- | value is also in a monadic context.
6464
unlessM :: forall m. Monad m => m Boolean -> m Unit -> m Unit
65-
unlessM mb m = do
65+
unlessM mb m = do
6666
b <- mb
6767
unless b m
6868

src/Data/EuclideanRing.purs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module Data.EuclideanRing
2-
( class EuclideanRing, degree, div, mod, (/)
2+
( class EuclideanRing
3+
, degree
4+
, div
5+
, mod
6+
, (/)
37
, gcd
48
, lcm
59
, module Data.CommutativeRing
@@ -86,13 +90,11 @@ foreign import numDiv :: Number -> Number -> Number
8690
-- | The *greatest common divisor* of two values.
8791
gcd :: forall a. Eq a => EuclideanRing a => a -> a -> a
8892
gcd a b =
89-
if b == zero
90-
then a
91-
else gcd b (a `mod` b)
93+
if b == zero then a
94+
else gcd b (a `mod` b)
9295

9396
-- | The *least common multiple* of two values.
9497
lcm :: forall a. Eq a => EuclideanRing a => a -> a -> a
9598
lcm a b =
96-
if a == zero || b == zero
97-
then zero
98-
else a * b / gcd a b
99+
if a == zero || b == zero then zero
100+
else a * b / gcd a b

src/Data/Function.purs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module Data.Function
22
( flip
33
, const
4-
, apply, ($)
5-
, applyFlipped, (#)
4+
, apply
5+
, ($)
6+
, applyFlipped
7+
, (#)
68
, applyN
79
, on
810
, module Control.Category
@@ -103,7 +105,7 @@ applyN :: forall a. (a -> a) -> Int -> a -> a
103105
applyN f = go
104106
where
105107
go n acc
106-
| n <= 0 = acc
108+
| n <= 0 = acc
107109
| otherwise = go (n - 1) (f acc)
108110

109111
-- | The `on` function is used to change the domain of a binary operator.

src/Data/Functor.purs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
module Data.Functor
2-
( class Functor, map, (<$>)
3-
, mapFlipped, (<#>)
2+
( class Functor
3+
, map
4+
, (<$>)
5+
, mapFlipped
6+
, (<#>)
47
, void
5-
, voidRight, (<$)
6-
, voidLeft, ($>)
7-
, flap, (<@>)
8+
, voidRight
9+
, (<$)
10+
, voidLeft
11+
, ($>)
12+
, flap
13+
, (<@>)
814
) where
915

1016
import Data.Function (const, compose)

src/Data/Ordering.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ instance eqOrdering :: Eq Ordering where
1616
eq LT LT = true
1717
eq GT GT = true
1818
eq EQ EQ = true
19-
eq _ _ = false
19+
eq _ _ = false
2020

2121
instance semigroupOrdering :: Semigroup Ordering where
2222
append LT _ = LT

0 commit comments

Comments
 (0)