Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 1f63639

Browse files
authored
Merge pull request #6 from rintcius/purescript-0.12
Upgrade to PureScript 0.12
2 parents ed50b1d + 1074c30 commit 1f63639

File tree

13 files changed

+34
-39
lines changed

13 files changed

+34
-39
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/node_modules/
55
npm-debug.log*
66
.psc-ide-port
7+
package-lock.json

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 6
4+
node_js: stable
55
install:
66
- npm install -g bower
77
- npm install && bower install

bower.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
"example"
2121
],
2222
"dependencies": {
23-
"purescript-enums": "^3.2.0",
24-
"purescript-formatters": "^3.0.0",
25-
"purescript-datetime": "^3.3.0",
26-
"purescript-halogen": "^3.0.1",
27-
"purescript-halogen-css": "^7.0.0",
28-
"purescript-generics-rep": "^5.0.0",
29-
"purescript-validation": "^3.1.0",
30-
"purescript-profunctor": "^3.1.0",
31-
"purescript-numbers": "^5.0.0",
32-
"purescript-these": "^3.0.0"
23+
"purescript-enums": "^4.0.0",
24+
"purescript-formatters": "^4.0.0",
25+
"purescript-datetime": "^4.1.0",
26+
"purescript-halogen": "^4.0.0",
27+
"purescript-halogen-css": "^8.0.0",
28+
"purescript-generics-rep": "^6.1.0",
29+
"purescript-validation": "^4.0.0",
30+
"purescript-profunctor": "^4.0.0",
31+
"purescript-numbers": "^6.0.0",
32+
"purescript-these": "^4.0.0"
3333
}
3434
}

example/src/Main.purs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module Main where
22

33
import Prelude
44

5-
import Control.Monad.Eff (Eff)
65
import Data.Bitraversable (bitraverse)
76
import Data.Date (Date, canonicalDate)
87
import Data.DateTime (DateTime(..))
@@ -18,8 +17,8 @@ import Data.Interval.Duration.Iso (IsoDuration, mkIsoDuration)
1817
import Data.Map (Map, lookup, insert)
1918
import Data.Maybe (Maybe(..), fromJust)
2019
import Data.Maybe.Last (Last(..))
21-
import Data.Monoid (mempty)
2220
import Data.Time (Time, setHour, setMinute)
21+
import Effect (Effect)
2322
import Halogen as H
2423
import Halogen.Aff as HA
2524
import Halogen.Component.ChildPath as CP
@@ -101,7 +100,7 @@ cpInterval = CP.cp5
101100
type HTML m = H.ParentHTML Query ChildQuery Slot m
102101
type DSL m = H.ParentDSL State Query ChildQuery Slot Void m
103102

104-
main Eff (HA.HalogenEffects ()) Unit
103+
main Effect Unit
105104
main = HA.runHalogenAff do
106105
body ← HA.awaitBody
107106
runUI example unit body
@@ -270,15 +269,15 @@ example =
270269
eval (HandleMessage payload next) = do
271270
case payload of
272271
MsgTime idx (NotifyChange val) →
273-
H.modify \s → s{ times = insert idx (show val) s.times }
272+
H.modify_ \s → s{ times = insert idx (show val) s.times }
274273
MsgDate idx (NotifyChange val) →
275-
H.modify \s → s{ dates = insert idx (show val) s.dates }
274+
H.modify_ \s → s{ dates = insert idx (show val) s.dates }
276275
MsgDateTime idx (NotifyChange val) →
277-
H.modify \s → s{ dateTimes = insert idx (show val) s.dateTimes }
276+
H.modify_ \s → s{ dateTimes = insert idx (show val) s.dateTimes }
278277
MsgDuration idx (NotifyChange val) →
279-
H.modify \s → s{ durations = insert idx (show val) s.durations }
278+
H.modify_ \s → s{ durations = insert idx (show val) s.durations }
280279
MsgInterval idx (NotifyChange val) →
281-
H.modify \s → s{ intervals = insert idx (show val) s.intervals }
280+
H.modify_ \s → s{ intervals = insert idx (show val) s.intervals }
282281
pure next
283282

284283

@@ -318,7 +317,7 @@ renderExample c items idx fmt' value'= unEither $ do
318317
[ HE.onClick $ HE.input_ $ c.setter idx val]
319318
[ HH.text txt]
320319
unEither StrOr (Array (HTML m)) Array (HTML m)
321-
unEither = either (HH.text >>> pure >>> HH.div_ >>> pure) id
320+
unEither = either (HH.text >>> pure >>> HH.div_ >>> pure) identity
322321

323322
timeConfig m. ExampleConfig
324323
String

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"private": true,
33
"scripts": {
4+
"refresh": "rimraf bower_components && rimraf output && bower i && npm run build",
45
"watch": "pulp --watch build --include example/src --to example/example.js",
56
"build": "pulp build --include example/src --to example/example.js"
67
},
78
"devDependencies": {
8-
"pulp": "^11.0.0",
9-
"purescript": "^0.11.0",
10-
"purescript-psa": "^0.5.0"
9+
"pulp": "^12.3.1",
10+
"purescript": "0.12.0",
11+
"purescript-psa": "^0.7.3"
1112
}
1213
}

src/Halogen/DatePicker/Component/Date.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Data.Functor.Coproduct.Nested (Coproduct2)
1313
import Data.Generic.Rep (class Generic)
1414
import Data.Generic.Rep.Show (genericShow)
1515
import Data.Maybe (Maybe(..), maybe)
16-
import Data.Monoid (mempty)
1716
import Data.Newtype (unwrap)
1817
import Data.Profunctor.Join (Join(..))
1918
import Data.Profunctor.Star (Star(..))

src/Halogen/DatePicker/Component/DateTime.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import Data.Functor.Coproduct (Coproduct, coproduct, right)
1414
import Data.Functor.Coproduct.Nested (Coproduct2)
1515
import Data.Maybe (Maybe(..), fromMaybe)
1616
import Data.Maybe.Last (Last(..))
17-
import Data.Monoid (mempty)
1817
import Data.Monoid.Additive (Additive(..))
1918
import Data.Newtype (unwrap)
2019
import Data.Profunctor.Join (Join(..))

src/Halogen/DatePicker/Component/Duration.purs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Data.Generic.Rep.Show (genericShow)
1111
import Data.Interval (Duration)
1212
import Data.Interval.Duration.Iso (IsoDuration, mkIsoDuration, unIsoDuration, Errors)
1313
import Data.Maybe (Maybe(..), fromMaybe)
14-
import Data.Monoid (mempty)
1514
import Data.Monoid.Endo (Endo(..))
1615
import Data.Newtype (unwrap)
1716
import Data.String (take)
@@ -88,7 +87,7 @@ evalDuration format (UpdateCommand cmd val next) = do
8887
_ → buildDuration format
8988
pure next
9089

91-
type BuildStep = Maybe (Endo Duration)
90+
type BuildStep = Maybe (Endo (->) Duration)
9291
buildDuration m
9392
. F.Format
9493
DSL m (Either (Tuple Boolean DurationError) IsoDuration)

src/Halogen/DatePicker/Component/Time.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Data.Functor.Coproduct.Nested (Coproduct2)
1313
import Data.Generic.Rep (class Generic)
1414
import Data.Generic.Rep.Show (genericShow)
1515
import Data.Maybe (Maybe(Nothing, Just), maybe)
16-
import Data.Monoid (mempty)
1716
import Data.Newtype (unwrap)
1817
import Data.Profunctor.Join (Join(..))
1918
import Data.Profunctor.Star (Star(..))

src/Halogen/DatePicker/Config.purs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Data.Generic.Rep.Monoid (genericMempty)
77
import Data.Generic.Rep.Semigroup (genericAppend)
88
import Data.Maybe (Maybe(..))
99
import Data.Maybe.Last (Last(..))
10-
import Data.Monoid (class Monoid)
1110
import Data.Newtype (class Newtype)
1211
import Halogen.HTML (ClassName(..))
1312

0 commit comments

Comments
 (0)