Skip to content

Commit 04f3635

Browse files
author
Charles Scalfani
committed
Upgraded to 18
1 parent e0ea26b commit 04f3635

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

Test/App.elm

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
port module Test.App exposing (..)
22

3-
import Html exposing (..)
4-
import Html.App
3+
import Platform
54
import Time exposing (..)
65
import Websocket exposing (..)
76
import Listener
@@ -53,11 +52,10 @@ init =
5352
model ! [ Websocket.startServer ServerError ServerStatus UnhandledMessage Nothing Nothing model.wsPort ]
5453

5554

56-
main : Program Never
55+
main : Program Never Model Msg
5756
main =
58-
Html.App.program
57+
Platform.program
5958
{ init = init
60-
, view = (\_ -> text "")
6159
, update = update
6260
, subscriptions = subscriptions
6361
}

aBuild.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rm -r elm-stuff/build-artifacts && elm make Test/App.elm --output elm.js

buildTest.sh build.sh

File renamed without changes.

elm-package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.0",
2+
"version": "3.0.0",
33
"summary": "Websocket Server Effects Manager for Elm",
44
"repository": "https://github.com/panosoft/elm-websocket-server.git",
55
"license": "Unlicense",
@@ -12,9 +12,8 @@
1212
],
1313
"native-modules": true,
1414
"dependencies": {
15-
"elm-lang/core": "4.0.5 <= v < 5.0.0",
16-
"elm-lang/html": "1.1.0 <= v < 2.0.0",
17-
"panosoft/elm-debugf": "1.0.0 <= v < 2.0.0"
15+
"elm-lang/core": "5.0.0 <= v < 6.0.0",
16+
"panosoft/elm-debugf": "2.0.0 <= v < 3.0.0"
1817
},
19-
"elm-version": "0.17.1 <= v < 0.18.0"
18+
"elm-version": "0.18.0 <= v < 0.19.0"
2019
}

src/Websocket.elm

+5-4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The native driver is https://github.com/websockets/ws
3030
3131
-}
3232

33+
import Tuple exposing (first, second)
3334
import Dict exposing (Dict)
3435
import Task exposing (Task)
3536
import DebugF exposing (log, toStringF)
@@ -216,12 +217,12 @@ type alias State msg =
216217

217218
(&>) : Task x a -> Task x b -> Task x b
218219
(&>) t1 t2 =
219-
t1 `Task.andThen` \_ -> t2
220+
t1 |> Task.andThen (\_ -> t2)
220221

221222

222223
(&>>) : Task x a -> (a -> Task x b) -> Task x b
223224
(&>>) t1 f =
224-
t1 `Task.andThen` f
225+
t1 |> Task.andThen f
225226

226227

227228

@@ -490,8 +491,8 @@ getServer state wsPort =
490491
listenerTaggers : State msg -> WSPort -> Maybe Path -> List (ListenerTaggers msg)
491492
listenerTaggers state wsPort maybePath =
492493
Dict.toList state.listeners
493-
|> List.filter (\( ( wsPort', path ), taggers ) -> wsPort' == wsPort && maybePath |?> (\path' -> path' == path) ?= True)
494-
|> List.map snd
494+
|> List.filter (\( ( wsPort_, path ), taggers ) -> wsPort_ == wsPort && maybePath |?> (\path_ -> path_ == path) ?= True)
495+
|> List.map second
495496

496497

497498
withListenerTaggers : State msg -> WSPort -> Maybe Path -> (List (ListenerTaggers msg) -> Task Never (State msg)) -> Task Never (State msg)

0 commit comments

Comments
 (0)