Skip to content

Commit 0bf0186

Browse files
committed
Use indexl
1 parent b72c5af commit 0bf0186

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"purescript-aff": "^4.0.0",
3939
"purescript-control": "^3.0.0",
4040
"purescript-console": "^3.0.0",
41-
"purescript-integers": "^3.0.0"
41+
"purescript-integers": "^3.0.0",
42+
"purescript-foldable-traversable": "^3.7.1"
4243
},
4344
"devDependencies": {
4445
"purescript-console": "^3.0.0",

src/Routing/Hash.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import DOM.HTML.Event.EventTypes (hashchange)
2020
import DOM.HTML.Location as L
2121
import DOM.HTML.Types (windowToEventTarget)
2222
import DOM.HTML.Window (location)
23-
import Data.Foldable (class Foldable, find)
23+
import Data.Foldable (class Foldable, indexl)
2424
import Data.Maybe (Maybe(..), fromMaybe, maybe)
2525
import Data.String (Pattern(..), stripPrefix)
2626
import Routing (RoutingEffects, match, matchWith)
@@ -87,5 +87,5 @@ matchesWith parser cb = foldHashes go (go Nothing)
8787
where
8888
go a =
8989
maybe (pure a) (\b -> Just b <$ cb a b)
90-
<<< find (const true)
90+
<<< indexl 0
9191
<<< parser

0 commit comments

Comments
 (0)