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

Commit

Permalink
Update for GH actions, PS 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed Apr 25, 2021
1 parent 1bacf69 commit 46f5b58
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 54 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: purescript-contrib/setup-purescript@main

- uses: actions/setup-node@v1
with:
node-version: "12"

- name: Install dependencies
run: |
npm install -g bower
npm install
bower install --production
- name: Build source
run: npm run-script build

- name: Run tests
run: |
bower install
npm run-script test --if-present
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.*
!/.gitignore
!/.travis.yml
!/.github
/bower_components/
/node_modules/
/output/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

20 changes: 10 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git://github.com/slamdata/purescript-ejson.git"
"url": "https://github.com/slamdata/purescript-ejson.git"
},
"ignore": [
"**/.*",
Expand All @@ -15,16 +15,16 @@
"package.json"
],
"dependencies": {
"purescript-ordered-collections": "^1.0.0",
"purescript-matryoshka": "^0.4.0",
"purescript-bifunctors": "^4.0.0",
"purescript-newtype": "^3.0.0",
"purescript-parsing": "^5.0.1",
"purescript-precise": "^4.0.0",
"purescript-profunctor-lenses": "^6.0.0",
"purescript-datetime": "^4.0.0"
"purescript-ordered-collections": "^2.0.1",
"purescript-matryoshka": "^0.5.0",
"purescript-bifunctors": "^5.0.0",
"purescript-newtype": "^4.0.0",
"purescript-parsing": "^6.0.1",
"purescript-precise": "^5.0.0",
"purescript-profunctor-lenses": "^7.0.0",
"purescript-datetime": "^5.0.2"
},
"devDependencies": {
"purescript-quickcheck": "^6.0.0"
"purescript-quickcheck": "^7.0.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"test": "pulp test"
},
"devDependencies": {
"pulp": "^12.0.0",
"purescript": "^0.12.0",
"purescript-psa": "^0.6.0",
"rimraf": "^2.6.1"
"pulp": "^15.0.0",
"purescript": "^0.14.1",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
}
}
5 changes: 2 additions & 3 deletions src/Data/Json/Extended/Cursor.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import Prelude
import Data.Array as A
import Data.Bifunctor (lmap)
import Data.Eq (class Eq1)
import Data.Foldable (class Foldable)
import Data.Foldable (class Foldable, lookup)
import Data.Functor.Mu (Mu)
import Data.Json.Extended (EJson)
import Data.Json.Extended as EJ
import Data.Maybe (Maybe(..), maybe)
import Data.Ord (class Ord1)
import Data.TacitString (TacitString)
import Data.Traversable (class Traversable, traverse)
import Data.Tuple (Tuple(..), lookup)

import Data.Tuple (Tuple(..))
import Matryoshka (Algebra, cata, project, embed)

-- | A cursor to a location in an EJson value.
Expand Down
16 changes: 0 additions & 16 deletions src/Data/Json/Extended/Signature/Parse.purs
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,6 @@ parseDigit =
, 9 <$ PS.string "9"
]

parse10 m. Monad m P.ParserT String m Int
parse10 = (tens <$> parseDigit <*> parseDigit) <|> parseDigit
where
tens x y = x * 10 + y

parse1000 m. Monad m P.ParserT String m Int
parse1000
= (thousands <$> parseDigit <*> parseDigit <*> parseDigit <*> parseDigit)
<|> (hundreds <$> parseDigit <*> parseDigit <*> parseDigit)
<|> (tens <$> parseDigit <*> parseDigit)
<|> parseDigit
where
thousands x y z w = x * 1000 + y * 100 + z * 10 + w
hundreds x y z = x * 100 + y * 10 + z
tens x y = x * 10 + y

-- | This is used for parsing both `Int` and `HugeInt` values so has some extra
-- | arguments. The `n` value should be 10 in the appropriate type, used to
-- | move the place of each digit that is parsed. The `Int -> n` function
Expand Down
3 changes: 0 additions & 3 deletions src/Data/Json/Extended/Signature/Render.purs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ commaSep = F.intercalate ", "
renderPairs Array (T.Tuple String String) String
renderPairs = commaSep <<< map (\(T.Tuple k v) → k <> ": " <> v)

parens String String
parens str = "(" <> str <> ")"

squares String String
squares str = "[" <> str <> "]"

Expand Down

0 comments on commit 46f5b58

Please sign in to comment.