Skip to content

Commit 134f477

Browse files
authored
Merge pull request #12 from bosyi/master
Updated for PureScript 0.12
2 parents 9dfcb3d + cff4602 commit 134f477

File tree

4 files changed

+15
-22
lines changed

4 files changed

+15
-22
lines changed

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 6
5-
env:
6-
- PATH=$HOME/purescript:$PATH
4+
node_js: 10
75
install:
8-
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/v0.11.3/linux64.tar.gz
9-
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
10-
- chmod a+x $HOME/purescript
11-
- npm install -g bower pulp
6+
- npm install -g bower pulp purescript@0.12.0
127
script:
13-
- npm install && bower install && pulp test
8+
- bower install && pulp test
149
after_success:
1510
- >-
1611
test $TRAVIS_TAG &&

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
"url": "https://github.com/nwolverson/purescript-csv.git"
1616
},
1717
"dependencies": {
18-
"purescript-parsing": "^4.0.0",
19-
"purescript-arrays": "^4.0.1",
20-
"purescript-maps": "^3.0.0"
18+
"purescript-arrays": "^5.0.0",
19+
"purescript-ordered-collections": "^1.0.0",
20+
"purescript-parsing": "^5.0.1"
2121
},
2222
"devDependencies": {
23-
"purescript-console": "^3.0.0",
24-
"purescript-quickcheck": "^4.0.0",
25-
"purescript-test-unit": "^11.0.0"
23+
"purescript-console": "^4.1.0",
24+
"purescript-quickcheck": "^5.0.0",
25+
"purescript-test-unit": "^14.0.0"
2626
}
2727
}

src/Text/Parsing/CSV.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Control.Alt ((<|>))
66
import Data.Array (some)
77
import Data.Foldable (all)
88
import Data.List (List(..), zip)
9-
import Data.String (fromCharArray, toCharArray, singleton)
9+
import Data.String.CodeUnits (fromCharArray, toCharArray, singleton)
1010
import Text.Parsing.Parser (Parser)
1111
import Text.Parsing.Parser.Combinators (sepEndBy, sepBy1, between)
1212
import Text.Parsing.Parser.String (eof, satisfy, string)
@@ -32,7 +32,7 @@ makeChars xs = do
3232
fromCharArray <$> some char
3333
where
3434
char = satisfy $ excluded xs
35-
excluded ys = \x -> all id $ terms ys <*> [x]
35+
excluded ys = \x -> all identity $ terms ys <*> [x]
3636
terms ys = map (/=) $ toCharArray ys
3737

3838
makeQchars :: Char -> P String

test/Main.purs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
module Test.Main where
22

33
import Prelude
4-
import Data.Map as M
5-
import Control.Monad.Aff.AVar (AVAR)
6-
import Control.Monad.Eff (Eff)
7-
import Control.Monad.Eff.Console (CONSOLE)
4+
85
import Data.Either (Either(Left, Right))
96
import Data.List (fromFoldable, List, head)
7+
import Data.Map as M
108
import Data.Maybe (fromMaybe)
9+
import Effect (Effect)
1110
import Test.Unit (test)
1211
import Test.Unit.Assert (assert)
13-
import Test.Unit.Console (TESTOUTPUT)
1412
import Test.Unit.Main (runTest)
1513
import Text.Parsing.CSV (P, Parsers, defaultParsers, makeParsers)
1614
import Text.Parsing.Parser (runParser)
@@ -45,7 +43,7 @@ testFileResult = fromFoldable $ fromFoldable <$> testData
4543
testFileEmptyEndLineResult :: List (List String)
4644
testFileEmptyEndLineResult = fromFoldable $ fromFoldable <$> testData <> [[""]]
4745

48-
main :: e. Eff (avar :: AVAR, testOutput :: TESTOUTPUT, console CONSOLE | e) Unit
46+
main :: Effect Unit
4947
main = runTest do
5048
test "chars" do
5149
assert "parses chars" $ parses defaultParsers.chars "abc" "abc"

0 commit comments

Comments
 (0)