Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v0.14.0-rc3 #76

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Set up a PureScript toolchain
uses: purescript-contrib/setup-purescript@main
with:
purescript: "0.14.0-rc3"

- name: Cache PureScript dependencies
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20201007/packages.dhall sha256:35633f6f591b94d216392c9e0500207bb1fec42dd355f4fecdfd186956567b6b
https://raw.githubusercontent.com/purescript/package-sets/prepare-0.14/src/packages.dhall

in upstream
2 changes: 1 addition & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, "either"
, "foldable-traversable"
, "generics-rep"
, "globals"
, "numbers"
, "integers"
, "lists"
, "maybe"
Expand Down
2 changes: 1 addition & 1 deletion src/Routing.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Routing
import Prelude

import Data.Either (Either)
import Global.Unsafe (unsafeDecodeURIComponent)
-- import Global.Unsafe (unsafeDecodeURIComponent)
import Routing.Match (Match, runMatch)
import Routing.Parser (parse)

Expand Down
10 changes: 4 additions & 6 deletions src/Routing/Match.purs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Data.String.NonEmpty (NonEmptyString)
import Data.String.NonEmpty as NES
import Data.Tuple (Tuple(..), snd)
import Data.Validation.Semiring (V, invalid, unV)
import Global (readFloat, isNaN)
import Data.Number as Number
import Routing.Match.Error (MatchError(..), showMatchError)
import Routing.Types (Route, RoutePart(..))

Expand Down Expand Up @@ -70,11 +70,9 @@ num :: Match Number
num = Match \route ->
case route of
Cons (Path input) rs ->
let res = readFloat input in
if isNaN res then
invalid $ free ExpectedNumber
else
pure $ Tuple rs res
case Number.fromString input of
Just res | not (Number.isNaN res) -> pure $ Tuple rs res
_ -> invalid $ free ExpectedNumber
_ ->
invalid $ free ExpectedNumber

Expand Down