Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 3e49aa4

Browse files
authored
Merge pull request #27 from slamdata/ps-0.14
Update for GH actions, PS 0.14
2 parents 1bacf69 + 46f5b58 commit 3e49aa4

File tree

8 files changed

+48
-54
lines changed

8 files changed

+48
-54
lines changed

.github/workflows/ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: purescript-contrib/setup-purescript@main
14+
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: "12"
18+
19+
- name: Install dependencies
20+
run: |
21+
npm install -g bower
22+
npm install
23+
bower install --production
24+
25+
- name: Build source
26+
run: npm run-script build
27+
28+
- name: Run tests
29+
run: |
30+
bower install
31+
npm run-script test --if-present

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.*
22
!/.gitignore
3-
!/.travis.yml
3+
!/.github
44
/bower_components/
55
/node_modules/
66
/output/

.travis.yml

-17
This file was deleted.

bower.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"license": "Apache-2.0",
44
"repository": {
55
"type": "git",
6-
"url": "git://github.com/slamdata/purescript-ejson.git"
6+
"url": "https://github.com/slamdata/purescript-ejson.git"
77
},
88
"ignore": [
99
"**/.*",
@@ -15,16 +15,16 @@
1515
"package.json"
1616
],
1717
"dependencies": {
18-
"purescript-ordered-collections": "^1.0.0",
19-
"purescript-matryoshka": "^0.4.0",
20-
"purescript-bifunctors": "^4.0.0",
21-
"purescript-newtype": "^3.0.0",
22-
"purescript-parsing": "^5.0.1",
23-
"purescript-precise": "^4.0.0",
24-
"purescript-profunctor-lenses": "^6.0.0",
25-
"purescript-datetime": "^4.0.0"
18+
"purescript-ordered-collections": "^2.0.1",
19+
"purescript-matryoshka": "^0.5.0",
20+
"purescript-bifunctors": "^5.0.0",
21+
"purescript-newtype": "^4.0.0",
22+
"purescript-parsing": "^6.0.1",
23+
"purescript-precise": "^5.0.0",
24+
"purescript-profunctor-lenses": "^7.0.0",
25+
"purescript-datetime": "^5.0.2"
2626
},
2727
"devDependencies": {
28-
"purescript-quickcheck": "^6.0.0"
28+
"purescript-quickcheck": "^7.0.0"
2929
}
3030
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"pulp": "^12.0.0",
10-
"purescript": "^0.12.0",
11-
"purescript-psa": "^0.6.0",
12-
"rimraf": "^2.6.1"
9+
"pulp": "^15.0.0",
10+
"purescript": "^0.14.1",
11+
"purescript-psa": "^0.8.2",
12+
"rimraf": "^3.0.2"
1313
}
1414
}

src/Data/Json/Extended/Cursor.purs

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ import Prelude
55
import Data.Array as A
66
import Data.Bifunctor (lmap)
77
import Data.Eq (class Eq1)
8-
import Data.Foldable (class Foldable)
8+
import Data.Foldable (class Foldable, lookup)
99
import Data.Functor.Mu (Mu)
1010
import Data.Json.Extended (EJson)
1111
import Data.Json.Extended as EJ
1212
import Data.Maybe (Maybe(..), maybe)
1313
import Data.Ord (class Ord1)
1414
import Data.TacitString (TacitString)
1515
import Data.Traversable (class Traversable, traverse)
16-
import Data.Tuple (Tuple(..), lookup)
17-
16+
import Data.Tuple (Tuple(..))
1817
import Matryoshka (Algebra, cata, project, embed)
1918

2019
-- | A cursor to a location in an EJson value.

src/Data/Json/Extended/Signature/Parse.purs

-16
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,6 @@ parseDigit =
110110
, 9 <$ PS.string "9"
111111
]
112112

113-
parse10 m. Monad m P.ParserT String m Int
114-
parse10 = (tens <$> parseDigit <*> parseDigit) <|> parseDigit
115-
where
116-
tens x y = x * 10 + y
117-
118-
parse1000 m. Monad m P.ParserT String m Int
119-
parse1000
120-
= (thousands <$> parseDigit <*> parseDigit <*> parseDigit <*> parseDigit)
121-
<|> (hundreds <$> parseDigit <*> parseDigit <*> parseDigit)
122-
<|> (tens <$> parseDigit <*> parseDigit)
123-
<|> parseDigit
124-
where
125-
thousands x y z w = x * 1000 + y * 100 + z * 10 + w
126-
hundreds x y z = x * 100 + y * 10 + z
127-
tens x y = x * 10 + y
128-
129113
-- | This is used for parsing both `Int` and `HugeInt` values so has some extra
130114
-- | arguments. The `n` value should be 10 in the appropriate type, used to
131115
-- | move the place of each digit that is parsed. The `Int -> n` function

src/Data/Json/Extended/Signature/Render.purs

-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ commaSep = F.intercalate ", "
4343
renderPairs Array (T.Tuple String String) String
4444
renderPairs = commaSep <<< map (\(T.Tuple k v) → k <> ": " <> v)
4545

46-
parens String String
47-
parens str = "(" <> str <> ")"
48-
4946
squares String String
5047
squares str = "[" <> str <> "]"
5148

0 commit comments

Comments
 (0)