Skip to content

Commit e9ad54f

Browse files
committed
compiler 0.12 updates
1 parent 4d246b5 commit e9ad54f

File tree

4 files changed

+34
-17
lines changed

4 files changed

+34
-17
lines changed

bower.json

Lines changed: 11 additions & 11 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": "^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"
22+
"purescript-control": "#compiler/0.12",
23+
"purescript-arrays": "#compiler/0.12",
24+
"purescript-maybe": "#compiler/0.12",
25+
"purescript-strings": "#compiler/0.12",
26+
"purescript-foldable-traversable": "#compiler/0.12",
27+
"purescript-either": "#compiler/0.12",
28+
"purescript-lists": "#compiler/0.12",
29+
"purescript-tailrec": "#compiler/0.12"
3030
},
3131
"devDependencies": {
32-
"purescript-math": "^2.0.0",
33-
"purescript-console": "^3.0.0",
34-
"purescript-assert": "^3.0.0"
32+
"purescript-math": "#compiler/0.12",
33+
"purescript-console": "#compiler/0.12",
34+
"purescript-assert": "#compiler/0.12"
3535
}
3636
}

psc-package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "purescript-string-parsers",
3+
"set": "compiler/0.12",
4+
"source": "https://github.com/justinwoo/package-sets.git",
5+
"depends": [
6+
"control",
7+
"arrays",
8+
"maybe",
9+
"strings",
10+
"foldable-traversable",
11+
"either",
12+
"lists",
13+
"tailrec",
14+
"math",
15+
"console",
16+
"assert"
17+
]
18+
}

src/Text/Parsing/StringParser/Expr.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ buildExprParser operators simpleExpr =
4646
prefixOp = choice accum.prefix <?> ""
4747
postfixOp = choice accum.postfix <?> ""
4848

49-
postfixP = postfixOp <|> pure id
50-
prefixP = prefixOp <|> pure id
49+
postfixP = postfixOp <|> pure identity
50+
prefixP = prefixOp <|> pure identity
5151
in do
5252
x <- termP prefixP term postfixP
5353
rassocP x rassocOp prefixP term postfixP

test/Main.purs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ module Test.Main where
33
import Prelude hiding (between)
44

55
import Control.Alt ((<|>))
6-
import Control.Monad.Eff (Eff)
7-
import Control.Monad.Eff.Console (CONSOLE)
6+
import Effect (Effect)
87

98
import Data.Either (isLeft, isRight, Either(..))
109
import Data.Foldable (fold)
@@ -13,7 +12,7 @@ import Data.List.Lazy (take, repeat)
1312
import Data.String (joinWith, singleton)
1413
import Data.Unfoldable (replicate)
1514

16-
import Test.Assert (assert', ASSERT, assert)
15+
import Test.Assert (assert', assert)
1716
import Text.Parsing.StringParser (Parser, runParser, try)
1817
import Text.Parsing.StringParser.Combinators (many1, endBy1, sepBy1, optionMaybe, many, manyTill, many1Till, chainl, fix, between)
1918
import Text.Parsing.StringParser.Expr (Assoc(..), Operator(..), buildExprParser)
@@ -64,7 +63,7 @@ parseFail p input = isLeft $ runParser p input
6463
expectResult :: forall a. (Eq a) => a -> Parser a -> String -> Boolean
6564
expectResult res p input = runParser p input == Right res
6665

67-
main :: forall e. Eff (console :: CONSOLE, assert :: ASSERT | e) Unit
66+
main :: Effect Unit
6867
main = do
6968
assert' "many should not blow the stack" $ canParse (many (string "a")) (joinWith "" $ replicate 100000 "a")
7069
assert' "many failing after" $ parseFail (do

0 commit comments

Comments
 (0)