Skip to content

Commit 090fedd

Browse files
authored
Merge pull request #6 from purescript-contrib/compiler/0.12
Updates for 0.12
2 parents 91c9e4b + 3821fee commit 090fedd

File tree

7 files changed

+48
-65
lines changed

7 files changed

+48
-65
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ language: node_js
22
dist: trusty
33
sudo: required
44
node_js: stable
5+
env:
6+
- PATH=$HOME/purescript:$PATH
57
install:
8+
- 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')
9+
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
10+
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
11+
- chmod a+x $HOME/purescript
612
- npm install -g bower
713
- npm install
814
- bower install --production
915
script:
1016
- npm run -s build
17+
- bower install
18+
- npm run -s test
1119
after_success:
1220
- >-
1321
test $TRAVIS_TAG &&

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"package.json"
1717
],
1818
"dependencies": {
19-
"purescript-eff": "^3.0.0",
20-
"purescript-datetime": "^3.0.0"
19+
"purescript-effect": "^2.0.0",
20+
"purescript-datetime": "^4.0.0"
2121
}
2222
}

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
"build": "eslint src && pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8-
"eslint": "^3.19.0",
9-
"pulp": "^11.0.0",
10-
"purescript-psa": "^0.5.0",
11-
"purescript": "^0.11.1",
12-
"rimraf": "^2.6.1"
8+
"eslint": "^4.19.1",
9+
"pulp": "^12.2.0",
10+
"purescript-psa": "^0.6.0",
11+
"rimraf": "^2.6.2"
1312
}
1413
}

src/Control/Monad/Eff/Now.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Control/Monad/Eff/Now.purs

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/Effect/Now.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
exports.now = function () {
4+
return Date.now();
5+
};

src/Effect/Now.purs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module Effect.Now
2+
( now
3+
, nowDateTime
4+
, nowDate
5+
, nowTime
6+
) where
7+
8+
import Prelude
9+
10+
import Data.DateTime (Date, DateTime, Time, date, time)
11+
import Data.DateTime.Instant (Instant, toDateTime)
12+
import Effect (Effect)
13+
14+
-- | Gets an `Instant` value for the date and time according to the current
15+
-- | machine’s clock.
16+
foreign import now :: Effect Instant
17+
18+
-- | Gets a `DateTime` value for the date and time according to the current
19+
-- | machine’s clock.
20+
nowDateTime :: Effect DateTime
21+
nowDateTime = toDateTime <$> now
22+
23+
-- | Gets the date according to the current machine’s clock.
24+
nowDate :: Effect Date
25+
nowDate = date <<< toDateTime <$> now
26+
27+
-- | Gets the time according to the current machine’s clock.
28+
nowTime :: Effect Time
29+
nowTime = time <<< toDateTime <$> now

0 commit comments

Comments
 (0)