Skip to content

Commit

Permalink
Merge pull request #12 from bosyi/master
Browse files Browse the repository at this point in the history
Updated for PureScript 0.12
  • Loading branch information
nwolverson committed Aug 3, 2018
2 parents 9dfcb3d + cff4602 commit 134f477
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
env:
- PATH=$HOME/purescript:$PATH
node_js: 10
install:
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/v0.11.3/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- npm install -g bower pulp
- npm install -g bower pulp purescript@0.12.0
script:
- npm install && bower install && pulp test
- bower install && pulp test
after_success:
- >-
test $TRAVIS_TAG &&
Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"url": "https://github.com/nwolverson/purescript-csv.git"
},
"dependencies": {
"purescript-parsing": "^4.0.0",
"purescript-arrays": "^4.0.1",
"purescript-maps": "^3.0.0"
"purescript-arrays": "^5.0.0",
"purescript-ordered-collections": "^1.0.0",
"purescript-parsing": "^5.0.1"
},
"devDependencies": {
"purescript-console": "^3.0.0",
"purescript-quickcheck": "^4.0.0",
"purescript-test-unit": "^11.0.0"
"purescript-console": "^4.1.0",
"purescript-quickcheck": "^5.0.0",
"purescript-test-unit": "^14.0.0"
}
}
4 changes: 2 additions & 2 deletions src/Text/Parsing/CSV.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Control.Alt ((<|>))
import Data.Array (some)
import Data.Foldable (all)
import Data.List (List(..), zip)
import Data.String (fromCharArray, toCharArray, singleton)
import Data.String.CodeUnits (fromCharArray, toCharArray, singleton)
import Text.Parsing.Parser (Parser)
import Text.Parsing.Parser.Combinators (sepEndBy, sepBy1, between)
import Text.Parsing.Parser.String (eof, satisfy, string)
Expand All @@ -32,7 +32,7 @@ makeChars xs = do
fromCharArray <$> some char
where
char = satisfy $ excluded xs
excluded ys = \x -> all id $ terms ys <*> [x]
excluded ys = \x -> all identity $ terms ys <*> [x]
terms ys = map (/=) $ toCharArray ys

makeQchars :: Char -> P String
Expand Down
10 changes: 4 additions & 6 deletions test/Main.purs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
module Test.Main where

import Prelude
import Data.Map as M
import Control.Monad.Aff.AVar (AVAR)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE)

import Data.Either (Either(Left, Right))
import Data.List (fromFoldable, List, head)
import Data.Map as M
import Data.Maybe (fromMaybe)
import Effect (Effect)
import Test.Unit (test)
import Test.Unit.Assert (assert)
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest)
import Text.Parsing.CSV (P, Parsers, defaultParsers, makeParsers)
import Text.Parsing.Parser (runParser)
Expand Down Expand Up @@ -45,7 +43,7 @@ testFileResult = fromFoldable $ fromFoldable <$> testData
testFileEmptyEndLineResult :: List (List String)
testFileEmptyEndLineResult = fromFoldable $ fromFoldable <$> testData <> [[""]]

main :: e. Eff (avar :: AVAR, testOutput :: TESTOUTPUT, console CONSOLE | e) Unit
main :: Effect Unit
main = runTest do
test "chars" do
assert "parses chars" $ parses defaultParsers.chars "abc" "abc"
Expand Down

0 comments on commit 134f477

Please sign in to comment.