From dbc4c385e6c436eed4299ae2c0bb2cc278cf2410 Mon Sep 17 00:00:00 2001 From: Vladimir Kalnitsky Date: Thu, 9 Jun 2022 00:43:02 +0400 Subject: [PATCH] Upgrade to purs v0.15 (#26) --- package.json | 1 + packages.dhall | 40 ++++++++++---------- src/Options/Applicative/Builder/Completer.js | 4 +- src/Options/Applicative/Common.purs | 3 +- src/Options/Applicative/Help/Chunk.purs | 2 - src/Options/Applicative/Help/Core.purs | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index b15a5c7..a333179 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "scripts": { "build": "pulp build -- --strict", "test": "pulp test" diff --git a/packages.dhall b/packages.dhall index a7fee36..bba651a 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,24 +1,24 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210409/packages.dhall sha256:e81c2f2ce790c0e0d79869d22f7a37d16caeb5bd81cfda71d46c58f6199fd33f + https://github.com/purescript/package-sets/releases/download/psc-0.15.0-20220507/packages.dhall + sha256:cf54330f3bc1b25a093b69bff8489180c954b43668c81288901a2ec29a08cc64 with open-memoize = - { dependencies = - [ "console" - , "effect" - , "psci-support" - , "strings" - , "lists" - , "either" - , "integers" - , "lazy" - , "maybe" - , "partial" - , "prelude" - , "tuples" - ] - , repo = - "https://github.com/purescript-open-community/purescript-open-memoize.git" - , version = - "v6.1.0" - } + { dependencies = + [ "console" + , "effect" + , "psci-support" + , "strings" + , "lists" + , "either" + , "integers" + , "lazy" + , "maybe" + , "partial" + , "prelude" + , "tuples" + ] + , repo = + "https://github.com/purescript-open-community/purescript-open-memoize.git" + , version = "v6.1.0" + } in upstream diff --git a/src/Options/Applicative/Builder/Completer.js b/src/Options/Applicative/Builder/Completer.js index 92218ac..b0c359e 100644 --- a/src/Options/Applicative/Builder/Completer.js +++ b/src/Options/Applicative/Builder/Completer.js @@ -1,7 +1,7 @@ "use strict"; -var execSync = require('child_process').execSync; +import execSync from 'child_process'; -exports.execSyncCommand = function(command) { +export function execSyncCommand (command) { return function() { return execSync(command); }; diff --git a/src/Options/Applicative/Common.purs b/src/Options/Applicative/Common.purs index 083a2a1..8a7a22c 100644 --- a/src/Options/Applicative/Common.purs +++ b/src/Options/Applicative/Common.purs @@ -21,10 +21,11 @@ module Options.Applicative.Common ( import Prelude import Control.Alt ((<|>)) +import Control.Alternative (guard) import Control.Monad.Free as Free import Control.Monad.State.Trans (StateT(..), get, put, runStateT) import Control.Monad.Trans.Class (lift) -import Control.MonadZero (empty, guard) +import Control.Plus (empty) import Data.Array as Array import Data.Exists (mkExists, runExists) import Data.Foldable (any, elem, oneOf) diff --git a/src/Options/Applicative/Help/Chunk.purs b/src/Options/Applicative/Help/Chunk.purs index fddcf07..6d18085 100644 --- a/src/Options/Applicative/Help/Chunk.purs +++ b/src/Options/Applicative/Help/Chunk.purs @@ -19,7 +19,6 @@ import Prelude import Control.Alt (class Alt) import Control.Alternative (class Alternative, class Plus) -import Control.MonadZero (class MonadZero) import Data.Foldable (fold, foldr) import Data.Generic.Rep (class Generic) import Data.Show.Generic (genericShow) @@ -45,7 +44,6 @@ derive newtype instance chunkPlus :: Plus Chunk derive newtype instance chunkAlternative :: Alternative Chunk derive newtype instance chunkBind :: Bind Chunk derive newtype instance chunkMonad :: Monad Chunk -derive newtype instance chunkMonadZero :: MonadZero Chunk instance chunkSemigroup :: Semigroup a => Semigroup (Chunk a) where append = chunked append diff --git a/src/Options/Applicative/Help/Core.purs b/src/Options/Applicative/Help/Core.purs index f223dc3..d6f27ae 100644 --- a/src/Options/Applicative/Help/Core.purs +++ b/src/Options/Applicative/Help/Core.purs @@ -17,7 +17,7 @@ module Options.Applicative.Help.Core import Prelude -import Control.MonadZero (guard) +import Control.Alternative (guard) import Data.Array (foldr) import Data.Array as Array import Data.Array.NonEmpty (NonEmptyArray)