Skip to content

Commit 1062425

Browse files
authored
Merge pull request #13 from purescript/compiler/0.12
Update for PureScript 0.12
2 parents 3265868 + 080a2ad commit 1062425

File tree

6 files changed

+36
-29
lines changed

6 files changed

+36
-29
lines changed

.gitignore

+1
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

+22-16
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "purescript-bifunctors",
33
"homepage": "https://github.com/purescript/purescript-bifunctors",
44
"description": "Bifunctors and biapplicatives",
5-
"license": "MIT",
5+
"license": "BSD-3-Clause",
66
"repository": {
77
"type": "git",
88
"url": "git://github.com/purescript/purescript-bifunctors.git"
@@ -17,7 +17,7 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-control": "^3.0.0",
21-
"purescript-newtype": "^2.0.0"
20+
"purescript-prelude": "^4.0.0",
21+
"purescript-newtype": "^3.0.0"
2222
}
2323
}

package.json

+3-3
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/Control/Biapply.purs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Control.Biapply where
22

3-
import Data.Function (const, id)
3+
import Data.Function (const, identity)
44

55
import Data.Bifunctor (class Bifunctor, bimap)
66

@@ -10,7 +10,7 @@ import Data.Bifunctor (class Bifunctor, bimap)
1010
-- | ```purescript
1111
-- | bipure f g <<$>> x <<*>> y
1212
-- | ```
13-
infixl 4 id as <<$>>
13+
infixl 4 identity as <<$>>
1414

1515
-- | `Biapply` captures type constructors of two arguments which support lifting of
1616
-- | functions of one or more arguments, in the sense of `Apply`.
@@ -21,7 +21,7 @@ infixl 4 biapply as <<*>>
2121

2222
-- | Keep the results of the second computation.
2323
biapplyFirst :: forall w a b c d. Biapply w => w a b -> w c d -> w c d
24-
biapplyFirst a b = bimap (const id) (const id) <<$>> a <<*>> b
24+
biapplyFirst a b = bimap (const identity) (const identity) <<$>> a <<*>> b
2525

2626
infixl 4 biapplyFirst as *>>
2727

src/Data/Bifunctor.purs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Data.Bifunctor where
22

3-
import Control.Category (id)
3+
import Control.Category (identity)
44

55
-- | A `Bifunctor` is a `Functor` from the pair category `(Type, Type)` to `Type`.
66
-- |
@@ -12,16 +12,16 @@ import Control.Category (id)
1212
-- |
1313
-- | Laws:
1414
-- |
15-
-- | - Identity: `bimap id id == id`
15+
-- | - Identity: `bimap identity identity == identity`
1616
-- | - Composition: `bimap f1 g1 <<< bimap f2 g2 == bimap (f1 <<< f2) (g1 <<< g2)`
1717
-- |
1818
class Bifunctor f where
1919
bimap :: forall a b c d. (a -> b) -> (c -> d) -> f a c -> f b d
2020

2121
-- | Map a function over the first type argument of a `Bifunctor`.
2222
lmap :: forall f a b c. Bifunctor f => (a -> b) -> f a c -> f b c
23-
lmap f = bimap f id
23+
lmap f = bimap f identity
2424

2525
-- | Map a function over the second type arguments of a `Bifunctor`.
2626
rmap :: forall f a b c. Bifunctor f => (b -> c) -> f a b -> f a c
27-
rmap = bimap id
27+
rmap = bimap identity

0 commit comments

Comments
 (0)