From 7dbf39dd1c31d083fd3822fb1339b2052b1e8260 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Mon, 2 May 2022 16:21:17 -0400 Subject: [PATCH] Update for PureScript 0.15 (#16) * Update for PureScript 0.15 * Update ci.yml * Update shell.nix --- .github/workflows/ci.yml | 5 ++- example/basic-hooks/Basic/Main.purs | 2 +- example/basic-no-action/NoAction/Main.purs | 2 +- example/basic/Basic/Main.purs | 2 +- example/redux-todo/ReduxTodo/Main.purs | 2 +- packages.dhall | 36 ++++++++++++++++++++-- shell.nix | 7 +++-- spago.dhall | 2 -- 8 files changed, 46 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15fb1ef..d139328 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,14 @@ jobs: steps: - uses: actions/checkout@v2 - + - uses: purescript-contrib/setup-purescript@main with: purs-tidy: "latest" + - name: Install esbuild + run: npm install --global esbuild@0.14.38 + - name: Build source run: npm run build diff --git a/example/basic-hooks/Basic/Main.purs b/example/basic-hooks/Basic/Main.purs index 293ac82..2aa2656 100644 --- a/example/basic-hooks/Basic/Main.purs +++ b/example/basic-hooks/Basic/Main.purs @@ -14,4 +14,4 @@ main :: Effect Unit main = launchAff_ do body <- HA.awaitBody root <- runStoreT BS.initialStore BS.reduce Counter.component - runUI root unit body + void $ runUI root unit body diff --git a/example/basic-no-action/NoAction/Main.purs b/example/basic-no-action/NoAction/Main.purs index 10766a0..bd5186c 100644 --- a/example/basic-no-action/NoAction/Main.purs +++ b/example/basic-no-action/NoAction/Main.purs @@ -14,4 +14,4 @@ main :: Effect Unit main = launchAff_ do body <- HA.awaitBody root <- runStoreT NAS.initialStore (#) Counter.component - runUI root unit body + void $ runUI root unit body diff --git a/example/basic/Basic/Main.purs b/example/basic/Basic/Main.purs index 5bf3c5f..180e958 100644 --- a/example/basic/Basic/Main.purs +++ b/example/basic/Basic/Main.purs @@ -14,4 +14,4 @@ main :: Effect Unit main = launchAff_ do body <- HA.awaitBody root <- runStoreT BS.initialStore BS.reduce Counter.component - runUI root unit body + void $ runUI root unit body diff --git a/example/redux-todo/ReduxTodo/Main.purs b/example/redux-todo/ReduxTodo/Main.purs index 8008139..83b4dfb 100644 --- a/example/redux-todo/ReduxTodo/Main.purs +++ b/example/redux-todo/ReduxTodo/Main.purs @@ -14,4 +14,4 @@ main :: Effect Unit main = launchAff_ do body <- HA.awaitBody root <- runStoreT Store.initialStore Store.reduce app - runUI root unit body + void $ runUI root unit body diff --git a/packages.dhall b/packages.dhall index bc3eb54..c7884e7 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,5 +1,37 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.14.7-20220303/packages.dhall - sha256:d7cbc15ea16768e4a4f99baa58a54559dd2648c6c1362de2469d9e41c23b28c3 + https://github.com/purescript/package-sets/releases/download/psc-0.15.0-20220502/packages.dhall + sha256:38d347aeba9fe6359c208abe87a5cecf1ffb14294f11ad19664ae35c59b6e29a in upstream + with + halogen-hooks = + { repo = "https://github.com/thomashoneyman/purescript-halogen-hooks" + , version = "v0.6.0" + , dependencies = + [ "aff" + , "arrays" + , "bifunctors" + , "effect" + , "exceptions" + , "foldable-traversable" + , "foreign-object" + , "free" + , "freeap" + , "halogen" + , "halogen-subscriptions" + , "maybe" + , "newtype" + , "ordered-collections" + , "parallel" + , "partial" + , "prelude" + , "refs" + , "tailrec" + , "transformers" + , "tuples" + , "unsafe-coerce" + , "unsafe-reference" + , "web-dom" + , "web-html" + ] + } diff --git a/shell.nix b/shell.nix index d66f19a..01af5db 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ let pkgs = import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/21.05.tar.gz"; + url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz"; }) {}; # To update to a newer version of easy-purescript-nix, run: @@ -10,8 +10,8 @@ let pursPkgs = import (pkgs.fetchFromGitHub { owner = "justinwoo"; repo = "easy-purescript-nix"; - rev = "aa72388ca0fb72ed64467f59a121db1f104897db"; - sha256 = "1j37v3ncnakhq7p4l2vqdn4li8bgwcc8cd2hk2fblxhnlglikgx2"; + rev = "0ad5775c1e80cdd952527db2da969982e39ff592"; + sha256 = "0x53ads5v8zqsk4r1mfpzf5913byifdpv5shnvxpgw634ifyj1kg"; }) { inherit pkgs; }; in pkgs.stdenv.mkDerivation { @@ -24,5 +24,6 @@ in pkgs.stdenv.mkDerivation { pursPkgs.purescript-language-server pkgs.nodejs-16_x + pkgs.esbuild ]; } diff --git a/spago.dhall b/spago.dhall index e38aa7f..0be50f5 100644 --- a/spago.dhall +++ b/spago.dhall @@ -3,7 +3,6 @@ [ "aff" , "distributive" , "effect" - , "foldable-traversable" , "fork" , "halogen" , "halogen-hooks" @@ -14,7 +13,6 @@ , "tailrec" , "transformers" , "tuples" - , "unsafe-coerce" , "unsafe-reference" ] , packages = ./packages.dhall