diff --git a/.travis.yml b/.travis.yml index 8daa38c..116705f 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 ec7fb7f..e401464 100644 --- a/bower.json +++ b/bower.json @@ -16,26 +16,26 @@ "package.json" ], "dependencies": { - "purescript-arrays": "^5.0.0", - "purescript-control": "^4.0.0", - "purescript-either": "^4.0.0", - "purescript-enums": "^4.0.0", - "purescript-foldable-traversable": "^4.0.0", - "purescript-gen": "^2.0.0", - "purescript-integers": "^4.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-tailrec": "^4.0.0", - "purescript-tuples": "^5.0.0", - "purescript-unfoldable": "^4.0.0", - "purescript-unsafe-coerce": "^4.0.0" + "purescript-arrays": "master", + "purescript-control": "master", + "purescript-either": "master", + "purescript-enums": "master", + "purescript-foldable-traversable": "master", + "purescript-gen": "master", + "purescript-integers": "master", + "purescript-maybe": "master", + "purescript-newtype": "master", + "purescript-nonempty": "master", + "purescript-partial": "master", + "purescript-prelude": "master", + "purescript-tailrec": "master", + "purescript-tuples": "master", + "purescript-unfoldable": "master", + "purescript-unsafe-coerce": "master" }, "devDependencies": { - "purescript-assert": "^4.0.0", - "purescript-console": "^4.0.0", - "purescript-minibench": "^2.0.0" + "purescript-assert": "master", + "purescript-console": "master", + "purescript-minibench": "master" } } diff --git a/package.json b/package.json index e868f88..1f09388 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "eslint": "^4.19.1", "pulp": "^15.0.0", - "purescript-psa": "^0.6.0", + "purescript-psa": "^0.8.0", "rimraf": "^2.6.2" } } diff --git a/src/Data/String/Regex/Unsafe.purs b/src/Data/String/Regex/Unsafe.purs index 0a982c6..3cbd0ae 100644 --- a/src/Data/String/Regex/Unsafe.purs +++ b/src/Data/String/Regex/Unsafe.purs @@ -2,13 +2,14 @@ module Data.String.Regex.Unsafe ( unsafeRegex ) where -import Data.Either (fromRight) +import Control.Category (identity) +import Data.Either (either) import Data.String.Regex (Regex, regex) import Data.String.Regex.Flags (RegexFlags) -import Partial.Unsafe (unsafePartial) +import Partial.Unsafe (unsafeCrashWith) -- | Constructs a `Regex` from a pattern string and flags. Fails with -- | an exception if the pattern contains a syntax error. unsafeRegex :: String -> RegexFlags -> Regex -unsafeRegex s f = unsafePartial fromRight (regex s f) +unsafeRegex s f = either unsafeCrashWith identity (regex s f)