Updates for PureScript v0.15

This commit is contained in:
Nick Saunders 2023-03-02 06:01:16 -07:00
parent 4c40891f56
commit 7999c1815a
6 changed files with 16 additions and 20 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
/.*
!/.gitignore
!/.eslintrc.json
!/.travis.yml

View File

@ -17,11 +17,11 @@
"package.json"
],
"dependencies": {
"purescript-prelude": "^3.0.0",
"purescript-eff": "^3.1.0"
"purescript-prelude": "^6.0.0",
"purescript-effect": "^4.0.0"
},
"devDependencies": {
"purescript-console": "^3.0.0",
"purescript-assert": "^3.0.0"
"purescript-console": "^6.0.0",
"purescript-assert": "^6.0.0"
}
}

View File

@ -7,7 +7,7 @@
"public": "AAAAC3NzaC1lZDI1NTE5AAAAICm0Ar7rHAWONOM4qA5q777/CQaN6cHvcBq3VXB7d5Yw"
}
],
"version": "0.5.1",
"version": "0.6.0",
"license": "MIT",
"location": {
"githubOwner": "mechairoi",
@ -15,7 +15,7 @@
},
"description": "Data.Unique for PureScript",
"dependencies": {
"prelude": ">=3.0.0 <4.0.0",
"eff": ">=3.1.0 <4.0.0"
"prelude": ">=6.0.0 <7.0.0",
"effect": ">=4.0.0 <5.0.0"
}
}

View File

@ -20,7 +20,7 @@ function iter(i) {
}
}
exports.newUnique = function () {
export function newUnique() {
iter(0);
return uniqueSource.length === 1 ? uniqueSource[0] + "" : uniqueSource.join(",");
};

View File

@ -1,17 +1,14 @@
module Data.Unique
( newUnique
, Unique()
, UNIQ()
, Unique
) where
import Control.Monad.Eff (Eff, kind Effect)
import Effect (Effect)
import Prelude (class Ord, class Eq, class Show, compare, (==))
foreign import data UNIQ :: Effect
newtype Unique = Unique String
foreign import newUnique :: forall e. Eff (uniq :: UNIQ | e) Unique
foreign import newUnique :: Effect Unique
instance showUnique :: Show Unique where
show (Unique a) = a

View File

@ -1,12 +1,12 @@
module Test.Main where
import Prelude ((==), ($), (/=), discard, bind, Unit)
import Data.Unique (newUnique, UNIQ)
import Test.Assert (assert, ASSERT)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (log, CONSOLE)
import Data.Unique (newUnique)
import Test.Assert (assert)
import Effect (Effect)
import Effect.Console (log)
main :: forall e. Eff (console :: CONSOLE , uniq :: UNIQ , assert :: ASSERT | e) Unit
main :: Effect Unit
main = do
log "Test Data.Unique"
a <- newUnique