Skip to content

Commit b524aba

Browse files
committed
Updates for 0.11.1
1 parent 5905939 commit b524aba

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

bower.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
"url": "git://github.com/paf31/purescript-string-parsers.git"
2020
},
2121
"dependencies": {
22-
"purescript-control": "^2.0.0",
23-
"purescript-arrays": "^3.0.0",
24-
"purescript-maybe": "^2.0.1",
25-
"purescript-strings": "^2.0.2",
26-
"purescript-foldable-traversable": "^2.0.0",
27-
"purescript-either": "^2.0.0",
28-
"purescript-lists": "^3.1.0",
29-
"purescript-tailrec": "^2.0.0"
22+
"purescript-control": "^3.0.0",
23+
"purescript-arrays": "^4.0.0",
24+
"purescript-maybe": "^3.0.0",
25+
"purescript-strings": "^3.0.0",
26+
"purescript-foldable-traversable": "^3.0.0",
27+
"purescript-either": "^3.0.0",
28+
"purescript-lists": "^4.0.0",
29+
"purescript-tailrec": "^3.0.0"
3030
},
3131
"devDependencies": {
3232
"purescript-math": "^2.0.0",
33-
"purescript-console": "^2.0.0",
34-
"purescript-assert": "^2.0.0"
33+
"purescript-console": "^3.0.0",
34+
"purescript-assert": "^3.0.0"
3535
}
3636
}

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "pulp build --censor-lib --strict",
6-
"test": "pulp build -I test"
5+
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
6+
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"pulp": "^9.0.1",
9+
"jscs": "^2.8.0",
10+
"jshint": "^2.9.1",
11+
"pulp": "^10.0.4",
1012
"purescript-psa": "^0.3.9",
11-
"purescript": "^0.10.1",
12-
"rimraf": "^2.5.4"
13+
"rimraf": "^2.5.0"
1314
}
1415
}

src/Text/Parsing/StringParser.purs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ data ParseError = ParseError String
2929
instance showParseError :: Show ParseError where
3030
show (ParseError msg) = msg
3131

32-
instance eqParseError :: Eq ParseError where
33-
eq (ParseError x) (ParseError y) = x == y
32+
derive instance eqParseError :: Eq ParseError
33+
34+
derive instance ordParseError :: Ord ParseError
3435

3536
-- | A parser is represented as a function which takes a pair of
3637
-- | continuations for failure and success.

src/Text/Parsing/StringParser/Combinators.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ chainr1' p f a = (do f' <- f
140140
pure $ f' a a') <|> pure a
141141

142142
-- | Parse using any of a collection of parsers.
143-
choice :: forall f a. (Foldable f) => f (Parser a) -> Parser a
143+
choice :: forall f a. Foldable f => f (Parser a) -> Parser a
144144
choice = foldl (<|>) (fail "Nothing to parse")
145145

146146
-- | Parse values until a terminator.

src/Text/Parsing/StringParser/String.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ skipSpaces :: Parser Unit
8484
skipSpaces = void whiteSpace
8585

8686
-- | Match one of the characters in the foldable structure.
87-
oneOf :: forall f. (Foldable f) => f Char -> Parser Char
87+
oneOf :: forall f. Foldable f => f Char -> Parser Char
8888
oneOf = satisfy <<< flip elem
8989

9090
-- | Match any character not in the foldable structure.
91-
noneOf :: forall f. (Foldable f) => f Char -> Parser Char
91+
noneOf :: forall f. Foldable f => f Char -> Parser Char
9292
noneOf = satisfy <<< flip notElem
9393

9494
-- | Match any lower case character.

test/Main.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parens = between (string "(") (string ")")
2222

2323
nested :: Parser Int
2424
nested = fix $ \p -> (do
25-
string "a"
25+
_ <- string "a"
2626
pure 0) <|> ((+) 1) <$> parens p
2727

2828
opTest :: Parser String
@@ -73,7 +73,7 @@ main = do
7373
assert $ expectResult ("a":"a":"a":Nil) (many (string "a")) "aaa"
7474
assert $ parseFail (many1 (string "a")) ""
7575
assert $ canParse (parens (do
76-
string "a"
76+
_ <- string "a"
7777
optionMaybe $ string "b")) "(ab)"
7878
assert $ expectResult ("a":"a":"a":Nil) (string "a" `sepBy1` string ",") "a,a,a"
7979
assert $ canParse (do

0 commit comments

Comments
 (0)