Skip to content

Commit 8f87b7d

Browse files
authored
Merge pull request #29 from purescript/compiler/0.12
Updates for 0.12
2 parents 4721788 + 0689a56 commit 8f87b7d

File tree

5 files changed

+39
-32
lines changed

5 files changed

+39
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/bower_components/
55
/node_modules/
66
/output/
7+
package-lock.json

LICENSE

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
The MIT License (MIT)
1+
Copyright 2018 PureScript
22

3-
Copyright (c) 2014 PureScript
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
45

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of
6-
this software and associated documentation files (the "Software"), to deal in
7-
the Software without restriction, including without limitation the rights to
8-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software is furnished to do so,
10-
subject to the following conditions:
6+
1. Redistributions of source code must retain the above copyright notice, this
7+
list of conditions and the following disclaimer.
118

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation and/or
11+
other materials provided with the distribution.
1412

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
3. Neither the name of the copyright holder nor the names of its contributors
14+
may be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

bower.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "purescript-tuples",
33
"homepage": "https://github.com/purescript/purescript-tuples",
4-
"description": "Tuple data type and utility functions",
5-
"license": "MIT",
4+
"license": "BSD-3-Clause",
65
"repository": {
76
"type": "git",
87
"url": "git://github.com/purescript/purescript-tuples.git"
@@ -17,9 +16,14 @@
1716
"package.json"
1817
],
1918
"dependencies": {
20-
"purescript-foldable-traversable": "^3.0.0",
21-
"purescript-prelude": "^3.0.0",
22-
"purescript-distributive": "^3.0.0",
23-
"purescript-type-equality": "^2.1.0"
19+
"purescript-bifunctors": "^4.0.0",
20+
"purescript-control": "^4.0.0",
21+
"purescript-distributive": "^4.0.0",
22+
"purescript-foldable-traversable": "^4.0.0",
23+
"purescript-invariant": "^4.0.0",
24+
"purescript-maybe": "^4.0.0",
25+
"purescript-newtype": "^3.0.0",
26+
"purescript-prelude": "^4.0.0",
27+
"purescript-type-equality": "^3.0.0"
2428
}
2529
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build": "pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"pulp": "^10.0.4",
9-
"purescript-psa": "^0.5.0-rc.1",
10-
"rimraf": "^2.6.1"
8+
"pulp": "^12.2.0",
9+
"purescript-psa": "^0.6.0",
10+
"rimraf": "^2.6.2"
1111
}
1212
}

src/Data/Tuple.purs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import Control.Biapply (class Biapply)
88
import Control.Comonad (class Comonad)
99
import Control.Extend (class Extend)
1010
import Control.Lazy (class Lazy, defer)
11-
1211
import Data.Bifoldable (class Bifoldable)
1312
import Data.Bifunctor (class Bifunctor)
1413
import Data.Bitraversable (class Bitraversable)
@@ -19,11 +18,9 @@ import Data.Functor.Invariant (class Invariant, imapF)
1918
import Data.HeytingAlgebra (implies, ff, tt)
2019
import Data.Maybe (Maybe(..))
2120
import Data.Maybe.First (First(..))
22-
import Data.Monoid (class Monoid, mempty)
2321
import Data.Newtype (unwrap)
2422
import Data.Ord (class Ord1)
2523
import Data.Traversable (class Traversable)
26-
2724
import Type.Equality (class TypeEquals, from)
2825

2926
-- | A simple product type for wrapping a pair of component values.
@@ -38,15 +35,15 @@ instance showTuple :: (Show a, Show b) => Show (Tuple a b) where
3835
-- | there are `Eq` instances for both component types.
3936
derive instance eqTuple :: (Eq a, Eq b) => Eq (Tuple a b)
4037

41-
instance eq1Tuple :: Eq a => Eq1 (Tuple a) where eq1 = eq
38+
derive instance eq1Tuple :: Eq a => Eq1 (Tuple a)
4239

4340
-- | Allows `Tuple`s to be compared with `compare`, `>`, `>=`, `<` and `<=`
4441
-- | whenever there are `Ord` instances for both component types. To obtain
4542
-- | the result, the `fst`s are `compare`d, and if they are `EQ`ual, the
4643
-- | `snd`s are `compare`d.
4744
derive instance ordTuple :: (Ord a, Ord b) => Ord (Tuple a b)
4845

49-
instance ord1Tuple :: Ord a => Ord1 (Tuple a) where compare1 = compare
46+
derive instance ord1Tuple :: Ord a => Ord1 (Tuple a)
5047

5148
instance boundedTuple :: (Bounded a, Bounded b) => Bounded (Tuple a b) where
5249
top = Tuple top top
@@ -94,8 +91,7 @@ instance booleanAlgebraTuple :: (BooleanAlgebra a, BooleanAlgebra b) => BooleanA
9491
-- | ```purescript
9592
-- | f <$> (Tuple x y) = Tuple x (f y)
9693
-- | ````
97-
instance functorTuple :: Functor (Tuple a) where
98-
map f (Tuple x y) = Tuple x (f y)
94+
derive instance functorTuple :: Functor (Tuple a)
9995

10096
instance invariantTuple :: Invariant (Tuple a) where
10197
imap = imapF

0 commit comments

Comments
 (0)