Skip to content
Merged
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: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"purescript-semirings": "^4.0.0",
"purescript-tuples": "^4.0.0",
"purescript-validation": "^3.0.0",
"purescript-aff": "^3.0.0",
"purescript-aff": "^4.0.0",
"purescript-control": "^3.0.0",
"purescript-console": "^3.0.0",
"purescript-integers": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build --censor-lib --strict",
"build": "pulp build -- --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
Expand Down
17 changes: 8 additions & 9 deletions src/Routing.purs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ module Routing (
matchesAff'
) where

import Prelude (Unit, unit, pure, const, ($))
import Control.Monad.Eff (Eff())
import Control.Monad.Aff (Aff(), makeAff)
import Data.Maybe (Maybe(..))
import Control.Monad.Aff (Aff, makeAff, nonCanceler)
import Control.Monad.Eff (Eff)
import Data.Either (Either(..), either)
import Data.Tuple (Tuple(..))
import Data.Maybe (Maybe(..))
import Data.String.Regex as R
import Data.String.Regex.Flags as RF

import Routing.Parser (parse)
import Data.Tuple (Tuple(..))
import Prelude (Unit, const, pure, unit, ($), (<$))
import Routing.Match (Match, runMatch)
import Routing.Parser (parse)


foreign import decodeURIComponent :: String -> String
Expand Down Expand Up @@ -53,9 +52,9 @@ matches' decoder routing cb = hashes $ \old new ->
matchesAff' :: forall e a. (String -> String) ->
Match a -> Aff e (Tuple (Maybe a) a)
matchesAff' decoder routing =
makeAff \_ k -> do
makeAff \k -> nonCanceler <$
matches' decoder routing \old new ->
k $ Tuple old new
k $ Right $ Tuple old new

matchesAff :: forall e a. Match a -> Aff e (Tuple (Maybe a) a)
matchesAff = matchesAff' decodeURIComponent
Expand Down