Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
node_js: stable
env:
- PATH=$HOME/purescript:$PATH
install:
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- npm install -g bower
- npm install
- bower install
script:
- bower install --production
- npm run -s build
- bower install
- npm -s test
after_success:
- >-
test $TRAVIS_TAG &&
echo $GITHUB_TOKEN | pulp login &&
echo y | pulp publish --no-push
- >-
test $TRAVIS_TAG &&
echo $GITHUB_TOKEN | pulp login &&
echo y | pulp publish --no-push
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"package.json"
],
"dependencies": {
"purescript-maybe": "^2.0.0",
"purescript-functions": "^2.0.0"
"purescript-maybe": "^3.0.0",
"purescript-functions": "^3.0.0"
},
"repository": {
"type": "git",
"url": "git://github.com/paf31/purescript-nullable.git"
},
"devDependencies": {
"purescript-console": "^2.0.0"
"purescript-console": "^3.0.0"
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^9.0.1",
"pulp": "^10.0.4",
"purescript-psa": "^0.3.9",
"purescript": "^0.10.1",
"rimraf": "^2.5.0"
}
}
6 changes: 3 additions & 3 deletions src/Data/Nullable.purs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Data.Maybe (Maybe(..), maybe)
-- |
-- | This type constructor may be useful when interoperating with JavaScript functions
-- | which accept or return null values.
foreign import data Nullable :: * -> *
foreign import data Nullable :: Type -> Type

-- | The null value.
foreign import null :: forall a. Nullable a
Expand All @@ -38,8 +38,8 @@ toMaybe n = runFn3 nullable n Nothing Just
instance showNullable :: Show a => Show (Nullable a) where
show = maybe "null" show <<< toMaybe

instance eqNullable :: (Eq a) => Eq (Nullable a) where
instance eqNullable :: Eq a => Eq (Nullable a) where
eq = eq `on` toMaybe

instance ordNullable :: (Ord a) => Ord (Nullable a) where
instance ordNullable :: Ord a => Ord (Nullable a) where
compare = compare `on` toMaybe