Skip to content

Commit fffff8f

Browse files
authored
Merge pull request #40 from purescript/compiler/0.12
Update for PureScript 0.12
2 parents 5a72eae + 9f3d2e3 commit fffff8f

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "purescript-maybe",
33
"homepage": "https://github.com/purescript/purescript-maybe",
4-
"description": "Optional values",
5-
"license": "MIT",
4+
"license": "BSD-3-Clause",
65
"repository": {
76
"type": "git",
87
"url": "git://github.com/purescript/purescript-maybe.git"
@@ -17,7 +16,9 @@
1716
"package.json"
1817
],
1918
"dependencies": {
20-
"purescript-monoid": "^3.0.0",
21-
"purescript-prelude": "^3.0.0"
19+
"purescript-prelude": "^4.0.0",
20+
"purescript-control": "^4.0.0",
21+
"purescript-invariant": "^4.0.0",
22+
"purescript-newtype": "^3.0.0"
2223
}
2324
}

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/Data/Maybe.purs

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Control.Plus (class Plus)
1010

1111
import Data.Eq (class Eq1)
1212
import Data.Functor.Invariant (class Invariant, imapF)
13-
import Data.Monoid (class Monoid)
1413
import Data.Ord (class Ord1)
1514

1615
-- | The `Maybe` type is used to represent optional values and can be seen as
@@ -242,7 +241,7 @@ maybe' _ f (Just a) = f a
242241
-- | fromMaybe x (Just y) == y
243242
-- | ```
244243
fromMaybe :: forall a. a -> Maybe a -> a
245-
fromMaybe a = maybe a id
244+
fromMaybe a = maybe a identity
246245

247246
-- | Similar to `fromMaybe` but for use in cases where the default value may be
248247
-- | expensive to compute. As PureScript is not lazy, the standard `fromMaybe`
@@ -254,7 +253,7 @@ fromMaybe a = maybe a id
254253
-- | fromMaybe' (\_ -> x) (Just y) == y
255254
-- | ```
256255
fromMaybe' :: forall a. (Unit -> a) -> Maybe a -> a
257-
fromMaybe' a = maybe' a id
256+
fromMaybe' a = maybe' a identity
258257

259258
-- | Returns `true` when the `Maybe` value was constructed with `Just`.
260259
isJust :: forall a. Maybe a -> Boolean

src/Data/Maybe/First.purs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Control.MonadZero (class MonadZero, class Alternative, class Plus, class
77
import Data.Eq (class Eq1)
88
import Data.Functor.Invariant (class Invariant)
99
import Data.Maybe (Maybe(..))
10-
import Data.Monoid (class Monoid, mempty)
1110
import Data.Newtype (class Newtype)
1211
import Data.Ord (class Ord1)
1312

src/Data/Maybe/Last.purs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Control.MonadZero (class MonadZero, class Alternative, class Plus, class
77
import Data.Eq (class Eq1)
88
import Data.Functor.Invariant (class Invariant)
99
import Data.Maybe (Maybe(..))
10-
import Data.Monoid (class Monoid, mempty)
1110
import Data.Newtype (class Newtype)
1211
import Data.Ord (class Ord1)
1312

0 commit comments

Comments
 (0)