Skip to content

Commit f613785

Browse files
authored
Merge pull request #11 from purescript/compiler/0.12
Updates for 0.12
2 parents 01cfb04 + 20ba896 commit f613785

File tree

5 files changed

+35
-35
lines changed

5 files changed

+35
-35
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"name": "purescript-const",
33
"homepage": "https://github.com/purescript/purescript-const",
4-
"description": "Constant data type for PureScript",
54
"authors": [
65
"Hardy Jones <jones3.hardy@gmail.com>",
76
"Gary Burgess <gary.burgess@gmail.com>",
87
"Sean Chalmers <sclhiannan@gmail.com>"
98
],
10-
"license": "MIT",
9+
"license": "BSD-3-Clause",
1110
"repository": {
1211
"type": "git",
1312
"url": "git://github.com/purescript/purescript-const.git"
@@ -22,7 +21,10 @@
2221
"package.json"
2322
],
2423
"dependencies": {
25-
"purescript-contravariant": "^3.0.0",
26-
"purescript-foldable-traversable": "^3.0.0"
24+
"purescript-contravariant": "^4.0.0",
25+
"purescript-foldable-traversable": "^4.0.0",
26+
"purescript-invariant": "^4.0.0",
27+
"purescript-newtype": "^3.0.0",
28+
"purescript-prelude": "^4.0.0"
2729
}
2830
}

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": "^12.0.1",
9-
"purescript-psa": "^0.5.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/Const.purs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Data.Eq (class Eq1)
66
import Data.Foldable (class Foldable)
77
import Data.Functor.Contravariant (class Contravariant)
88
import Data.Functor.Invariant (class Invariant, imapF)
9-
import Data.Monoid (class Monoid, mempty)
109
import Data.Newtype (class Newtype)
1110
import Data.Ord (class Ord1)
1211
import Data.Traversable (class Traversable)
@@ -24,13 +23,11 @@ derive instance newtypeConst :: Newtype (Const a b) _
2423

2524
derive newtype instance eqConst :: Eq a => Eq (Const a b)
2625

27-
instance eq1Const :: Eq a => Eq1 (Const a) where
28-
eq1 = eq
26+
derive instance eq1Const :: Eq a => Eq1 (Const a)
2927

3028
derive newtype instance ordConst :: Ord a => Ord (Const a b)
3129

32-
instance ord1Const :: Ord a => Ord1 (Const a) where
33-
compare1 = compare
30+
derive instance ord1Const :: Ord a => Ord1 (Const a)
3431

3532
derive newtype instance boundedConst :: Bounded a => Bounded (Const a b)
3633

@@ -52,14 +49,11 @@ derive newtype instance euclideanRingConst :: EuclideanRing a => EuclideanRing (
5249

5350
derive newtype instance commutativeRingConst :: CommutativeRing a => CommutativeRing (Const a b)
5451

55-
derive newtype instance fieldConst :: Field a => Field (Const a b)
56-
5752
derive newtype instance heytingAlgebraConst :: HeytingAlgebra a => HeytingAlgebra (Const a b)
5853

5954
derive newtype instance booleanAlgebraConst :: BooleanAlgebra a => BooleanAlgebra (Const a b)
6055

61-
instance functorConst :: Functor (Const a) where
62-
map _ (Const x) = Const x
56+
derive instance functorConst :: Functor (Const a)
6357

6458
instance invariantConst :: Invariant (Const a) where
6559
imap = imapF
@@ -70,9 +64,6 @@ instance contravariantConst :: Contravariant (Const a) where
7064
instance applyConst :: Semigroup a => Apply (Const a) where
7165
apply (Const x) (Const y) = Const (x <> y)
7266

73-
instance bindConst :: Semigroup a => Bind (Const a) where
74-
bind (Const x) _ = Const x
75-
7667
instance applicativeConst :: Monoid a => Applicative (Const a) where
7768
pure _ = Const mempty
7869

0 commit comments

Comments
 (0)