Skip to content

Commit 40eff75

Browse files
committed
update dependencies and fix code for latest Data.String
1 parent 20a9b06 commit 40eff75

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
"package.json"
1919
],
2020
"dependencies": {
21-
"purescript-transformers": "~0.1.0",
22-
"purescript-either": "*",
23-
"purescript-maybe": "~0.2.0",
24-
"purescript-arrays": "~0.2.0",
25-
"purescript-strings": "*",
26-
"purescript-foldable-traversable": "*"
21+
"purescript-transformers": "~0.2.1",
22+
"purescript-either": "~0.1.3",
23+
"purescript-maybe": "~0.2.1",
24+
"purescript-arrays": "~0.2.1",
25+
"purescript-strings": "~0.3.0",
26+
"purescript-foldable-traversable": "~0.1.3"
2727
}
2828
}

docs/Module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
type Parser s a = ParserT s Identity a
1111

1212
newtype ParserT s m a where
13-
ParserT :: s -> m { consumed :: Boolean, result :: Either ParseError a, input :: s } -> ParserT s m a
13+
ParserT :: (s -> m { consumed :: Boolean, result :: Either ParseError a, input :: s }) -> ParserT s m a
1414

1515

1616
### Type Class Instances

src/Text/Parsing/Parser/String.purs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Data.String
44
import Data.Either
55
import Data.Foldable
66
import Data.Monoid
7+
import Data.Maybe
8+
import Data.Char
79

810
import Control.Alt
911
import Control.Alternative
@@ -28,9 +30,9 @@ string s = ParserT $ \s' ->
2830

2931
char :: forall m. (Monad m) => ParserT String m String
3032
char = ParserT $ \s' ->
31-
return $ case s' of
32-
"" -> { consumed: false, input: s', result: Left (strMsg "Unexpected EOF") }
33-
_ -> { consumed: true, input: drop 1 s', result: Right (charAt 0 s') }
33+
return $ case charAt 0 s' of
34+
Nothing -> { consumed: false, input: s', result: Left (strMsg "Unexpected EOF") }
35+
Just c -> { consumed: true, input: drop 1 s', result: Right (charString c) }
3436

3537
satisfy :: forall m. (Monad m) => (String -> Boolean) -> ParserT String m String
3638
satisfy f = try do

0 commit comments

Comments
 (0)