From baac4cfc150eee79e241101a042222be48813ec0 Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Tue, 20 Oct 2020 22:37:00 +0200 Subject: [PATCH 1/3] Update TAG to v0.14.0-rc3; dependencies to master; psa to v0.8.0 --- .travis.yml | 3 ++- bower.json | 24 ++++++++++++------------ package.json | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28a61c0..c39bb0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ node_js: stable env: - PATH=$HOME/purescript:$PATH install: - - TAG=$(basename $(curl --location --silent --output /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) + # - TAG=$(basename $(curl --location --silent --output /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) + - TAG=v0.14.0-rc3 - curl --location --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - chmod a+x $HOME/purescript diff --git a/bower.json b/bower.json index bf03fdb..cd20c3e 100644 --- a/bower.json +++ b/bower.json @@ -17,19 +17,19 @@ "package.json" ], "dependencies": { - "purescript-control": "^4.0.0", - "purescript-either": "^4.0.0", - "purescript-gen": "^2.0.0", - "purescript-maybe": "^4.0.0", - "purescript-newtype": "^3.0.0", - "purescript-nonempty": "^5.0.0", - "purescript-partial": "^2.0.0", - "purescript-prelude": "^4.0.0", - "purescript-tuples": "^5.0.0", - "purescript-unfoldable": "^4.0.0" + "purescript-control": "master", + "purescript-either": "master", + "purescript-gen": "master", + "purescript-maybe": "master", + "purescript-newtype": "master", + "purescript-nonempty": "master", + "purescript-partial": "master", + "purescript-prelude": "master", + "purescript-tuples": "master", + "purescript-unfoldable": "master" }, "devDependencies": { - "purescript-assert": "^4.0.0", - "purescript-console": "^4.0.0" + "purescript-assert": "master", + "purescript-console": "master" } } diff --git a/package.json b/package.json index d408361..1fac874 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "devDependencies": { "pulp": "^15.0.0", - "purescript-psa": "^0.6.0", + "purescript-psa": "^0.8.0", "rimraf": "^2.6.2" } } From 2037f2375527b13caa7eede4b0113567f4831ebd Mon Sep 17 00:00:00 2001 From: Cyril Sobierajewicz Date: Sat, 18 Jul 2020 18:44:07 +0200 Subject: [PATCH 2/3] Add roles declarations to forbid unsafe coercions --- src/Data/Enum.purs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/Enum.purs b/src/Data/Enum.purs index 0bb9287..d2a8d4d 100644 --- a/src/Data/Enum.purs +++ b/src/Data/Enum.purs @@ -162,6 +162,8 @@ toEnumWithDefaults low high x = case toEnum x of -- | A type for the size of finite enumerations. newtype Cardinality a = Cardinality Int +type role Cardinality representational + derive instance newtypeCardinality :: Newtype (Cardinality a) _ derive newtype instance eqCardinality :: Eq (Cardinality a) derive newtype instance ordCardinality :: Ord (Cardinality a) From cd9df5e00d190a361dfdcf91f00057329afb296d Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Fri, 13 Nov 2020 20:55:11 -0800 Subject: [PATCH 3/3] Fix warninig: add kind signature to Cardinality --- src/Data/Enum.purs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Enum.purs b/src/Data/Enum.purs index d2a8d4d..2a4e0f8 100644 --- a/src/Data/Enum.purs +++ b/src/Data/Enum.purs @@ -160,6 +160,7 @@ toEnumWithDefaults low high x = case toEnum x of Nothing -> if x < fromEnum (bottom :: a) then low else high -- | A type for the size of finite enumerations. +newtype Cardinality :: forall k. k -> Type newtype Cardinality a = Cardinality Int type role Cardinality representational