Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
81ad9e8
add optional Foreign encoding and decoding
shmish111 May 8, 2019
80774b2
remove TODO
shmish111 May 8, 2019
ecd2bd8
use https://github.com/paf31/purescript-foreign-generic/pull/52
shmish111 May 10, 2019
70f1654
Whitespace changes.
krisajenkins May 17, 2019
02de37e
Refactoring the code to use a structured printing library.
krisajenkins May 20, 2019
d9bf17a
Bugfix for Encode/Decode constraints.
krisajenkins May 21, 2019
8eace90
Bugfix for decode/encode instances on recursive types.
krisajenkins May 22, 2019
4ef961c
You can now generate `Eq` instances for something like `Proxy :: Prox…
krisajenkins May 23, 2019
05b5b62
Whitespace changes.
krisajenkins May 23, 2019
72fbe2d
You can now generate a `Show` instance based on `genericShow`.
krisajenkins May 23, 2019
a7069a5
Aeson-compatible encodings for Enums*.
krisajenkins May 24, 2019
02bd099
Bugfix for Encode/Decode constraints.
krisajenkins May 21, 2019
de2574e
You can now generate a `Show` instance based on `genericShow`.
krisajenkins May 23, 2019
b310e6a
Applying hlint suggestions.
krisajenkins Sep 20, 2019
1fc332d
You can now generate `Ord` instances for something like `Proxy :: Pro…
krisajenkins Sep 20, 2019
e68e46d
Bugfix for genericShow.
krisajenkins Jul 11, 2019
1e7ca3d
genericShow now supports parameterised types.
krisajenkins Aug 2, 2019
5e25608
Adding Functor support.
krisajenkins Aug 9, 2019
0c3dd26
fix haddock
shmish111 Sep 13, 2019
0042602
Version 0.13.1.0.
krisajenkins Sep 20, 2019
fb8a038
Updating for PureScript 0.13.
krisajenkins Sep 30, 2019
a76b119
Adding support for Eq1 instances.
krisajenkins Nov 20, 2019
28c3777
Factoring out some duplicated code in the typeclass instance-generation.
krisajenkins Nov 26, 2019
6a92d78
use a newer stackage
shmish111 Feb 5, 2021
755841f
Merge pull request #1 from input-output-hk/eq1
jhbertra Oct 5, 2021
808d12c
run lorri init
Oct 5, 2021
62ead0a
Add flake.nix
Oct 5, 2021
2276c49
Update import module for genericShow
Oct 5, 2021
13381aa
0.14.0.0
Oct 5, 2021
c867392
Remove shell params
Oct 5, 2021
0cd3f0c
Merge pull request #3 from input-output-hk/jhbertra/ps-014
jhbertra Oct 5, 2021
0240a54
Replace foreign-generic with Argonaut
Oct 8, 2021
542274f
Add roundtrip test project
Oct 8, 2021
38b502a
Add compile test
Oct 8, 2021
6c5c39d
Add Aesone round trip test
Oct 12, 2021
44fe87f
Spawn only one process and check warnings
Oct 13, 2021
1e0cebf
Remove Proxy from API
Oct 13, 2021
1d311a8
Add lenses to test
Oct 13, 2021
f9c9fe9
Fix bugs with nested decoders
Oct 13, 2021
69f69a5
Simplify test type
Oct 13, 2021
12aa42c
Integrate json helpers
Oct 20, 2021
2231292
Refactor printing
Oct 20, 2021
7bc806f
Merge pull request #4 from input-output-hk/jhbertra/ps-014
jhbertra Oct 20, 2021
e6d4f98
Export everything again
Oct 20, 2021
c898b46
Fix problems with inline records in sum types
Oct 25, 2021
55c951d
Make sum type encoding better
Oct 25, 2021
2953fb1
Update sum type encode/decode
Oct 25, 2021
2f91764
Add recursive types to test
Oct 25, 2021
35d863b
Merge pull request #5 from input-output-hk/jhbertra/bug-fixes
jhbertra Oct 25, 2021
132a6d1
Fix handling of multi record constructors
Oct 27, 2021
27501fe
Fix encoding of nullary constructors
Oct 28, 2021
366fc70
Add support for set and map json
Oct 28, 2021
569fc66
Update json-helpers dependency
Nov 4, 2021
7d3b750
Add ormolu to nix shell
Jan 20, 2022
b4c4069
Add support for custom instances
Jan 20, 2022
9550caf
Format everything with ormolu
Jan 21, 2022
759012a
Add newlines at the end of module files
Jan 21, 2022
a62b87c
Fix type extraction for custom instances
Jan 21, 2022
47a1f11
Add import lines for custom instances
Jan 21, 2022
2b58aa6
Add package namespacing support
paluh Jun 22, 2022
51e8404
Make package namespacing introduction backward compatible.
paluh Jul 7, 2022
7e554e5
Merge pull request #10 from paluh/master
jhbertra Jul 7, 2022
53f4e98
copy Stylish Haskell, Nix Flake config
peterbecich Sep 18, 2023
94c66ef
fix compilation
peterbecich Sep 24, 2023
faf275c
`nix flake update`
peterbecich Sep 4, 2023
b5fbac0
format with Fourmolu and then Stylish Haskell
peterbecich Sep 24, 2023
cf3de1d
WIP merge IOHK fork
peterbecich Sep 25, 2023
35ecb0e
`genericShow` instance provided by IOHK fork
peterbecich Sep 30, 2023
027e5e7
Encode/Decode instances by IOHK using `purescript-bridge-json-helpers`
peterbecich Sep 30, 2023
a57e39e
bump to version 0.16.0.0; delete boilerplate
peterbecich Sep 30, 2023
fba4c7a
generate `DecodeJsonField`
peterbecich Sep 30, 2023
974d7db
delete unused `CodeGenSwitches`
peterbecich Sep 30, 2023
0d5edfe
fix LSP server for RoundTrip test
peterbecich Oct 1, 2023
88f1e31
fix rendered `EncodeJson` and `DecodeJson` instances
peterbecich Oct 1, 2023
d1a613b
extend example to show failing case
peterbecich Oct 1, 2023
5933ef7
fix printing of import list
peterbecich Oct 1, 2023
a2acbbb
fix printing of imports with/without aliases
peterbecich Oct 1, 2023
c9fa2f0
RoundTrip test succeeds with json-helper library
peterbecich Oct 15, 2023
5480bff
RoundTrip tests for both json-helpers and argonaut-aeson-generic
peterbecich Oct 15, 2023
1bc3046
fix dependency notice for `json-helpers`
peterbecich Oct 16, 2023
eadfb27
clean up example
peterbecich Oct 16, 2023
93e6ab7
fix example using argonaut-aeson-generic
peterbecich Oct 16, 2023
47becfb
improve example to show random errors
peterbecich Oct 16, 2023
c7ebbac
fix Stack project
peterbecich Oct 22, 2023
0b5e11f
temporarily disable tests in Nix
peterbecich Oct 22, 2023
bce383f
improve example
peterbecich Oct 22, 2023
c60400c
make Aeson produce `tag` for `Either`
peterbecich Nov 25, 2023
55e265b
working example of encoding/decoding `Either`
peterbecich Nov 26, 2023
920c236
clean-up
peterbecich Nov 26, 2023
ada7742
readme
peterbecich Jan 3, 2024
fc87b4b
update purescript-bridge-json-helpers
peterbecich Jan 3, 2024
1e9c7d9
update github action
peterbecich Jan 3, 2024
2d6a6e2
get tests passing
peterbecich Jan 3, 2024
3be53bf
improve readme
peterbecich Jan 4, 2024
deed0f3
improve readme, clean-up
peterbecich Jan 4, 2024
95e6034
clean-up
peterbecich Jan 13, 2024
17830c1
`nix flake update`
peterbecich Jan 13, 2024
7069895
changelog
peterbecich Jan 13, 2024
7d7c1d8
stylish-haskell and lint
peterbecich Jan 13, 2024
de32d3f
demonstrate `json-helpers` in the `example`
peterbecich Jan 28, 2024
6f5008a
example, generate PureScript before server starts
peterbecich Jan 28, 2024
83a204d
move example to new Spago
flip111 Feb 25, 2024
d56a437
complete upgrade to new Spago@next
peterbecich Feb 25, 2024
5c86b32
Merge pull request #2 from peterbecich/spago-upgrade
peterbecich Feb 25, 2024
8536ddf
update example package set
peterbecich Feb 25, 2024
e1eee18
remove `Show` constraint; there are issues to be fixed
peterbecich Jan 28, 2024
8c389d1
Fix show instances for unused type variables
flip111 Feb 15, 2024
bfb9ebe
Revert eta reduction of show = genericShow
flip111 Feb 25, 2024
becf65e
Merge pull request #1 from flip111/fix-show2
peterbecich Feb 25, 2024
28053d1
extra-source-files
peterbecich Feb 25, 2024
4439ef6
github action tweak
peterbecich Feb 26, 2024
dd3fabf
`nix flake update`
peterbecich Mar 30, 2024
f2e973c
calendar datatype test
peterbecich Mar 31, 2024
72d87b7
use quasiquoter to clean up tests
peterbecich Mar 31, 2024
392e7b4
`Enum` and `Bounded` require `Eq` and `Ord`
peterbecich Apr 1, 2024
8a04045
`nix flake update`, update Spago
peterbecich Jul 5, 2024
1f1b74e
use Spago Workspaces
peterbecich Jul 6, 2024
d18a14d
provide esbuild
peterbecich Jul 6, 2024
c660f17
`nix flake update`
peterbecich Feb 1, 2025
243b0ab
example List type
peterbecich Feb 2, 2025
c9cbb15
fix bridge from Haskell List to PureScript Array for GHC 9.6
peterbecich Feb 9, 2025
7ea7d07
improve GitHub Action
peterbecich Feb 16, 2025
de916bd
`nix flake update`
peterbecich Feb 16, 2025
d35c633
Merge remote-tracking branch 'parent/master' into merge-iohk-3
peterbecich Feb 16, 2025
c545c0f
update Nix Flake
peterbecich May 3, 2025
2b43271
provide Eq and Ord in example
peterbecich May 3, 2025
a6b1d44
fix one test
peterbecich May 3, 2025
48570df
Support GHC.Tuple.Prim.Tuple2
lucasdicioccio May 19, 2024
d407646
add tuple example
peterbecich May 4, 2025
891a17b
fix duplicate instance printing; fix Unit printing
peterbecich May 4, 2025
1440c86
fix Round Trip integration tests
peterbecich May 4, 2025
9677c9d
fix compilation of example
peterbecich May 4, 2025
4262171
fix GitHub Actions
peterbecich May 4, 2025
47d9bc5
update Stack build, provide GitHub Action coverage for Stack
peterbecich May 4, 2025
abe1ce1
add tests to Nix Flake GitHub Action
peterbecich May 4, 2025
9d89358
update development.md
peterbecich May 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
watch_file flake.lock
watch_file flake.nix
use flake
76 changes: 76 additions & 0 deletions .github/workflows/haskell-and-purescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# modified from https://github.com/jgm/pandoc/blob/master/.github/workflows/ci.yml
name: Haskell library and example

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- '**'
paths-ignore: []
pull_request:
paths-ignore: []

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['9.6.7','9.8.4','9.10.1']
cabal: ['3.14.2.0']
os: [ubuntu-latest]
name: Haskell GHC ${{ matrix.ghc }} sample
steps:
- uses: actions/checkout@v4
- uses: haskell/[email protected]
with:
ghc: ${{ matrix.ghc }}
cabal: ${{ matrix.cabal }}
config: |
# don't cache metadata files based on last access time
meta-cache: 0
# see https://github.com/haskell/ghcup-hs/blob/master/data/config.yaml
# for full documentation
url-source:
- GHCupURL
- prereleases
- name: Cabal Update
run: |
cabal update

- name: Build Haskell
run: |
cabal build all --enable-tests

- uses: purescript-contrib/setup-purescript@main
with:
spago: "unstable"

- name: Cache PureScript dependencies
uses: actions/[email protected]
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }}
path: |
.spago
output
test/RoundTripArgonautAesonGeneric/app/output
test/RoundTripJsonHelpers/app/output

- name: Build PureScript
run: |
spago build
cd test/RoundTripArgonautAesonGeneric/app
spago build
cd ../../../
cd test/RoundTripJsonHelpers/app
spago build

- name: Haskell Tests
run: |
cabal test all --disable-optimization

- name: Spago Tests
run: |
spago test
70 changes: 0 additions & 70 deletions .github/workflows/haskell.yml

This file was deleted.

41 changes: 37 additions & 4 deletions .github/workflows/nix-flake.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
name: "Nix Flake"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- run: nix build
# - run: nix flake check
- uses: actions/checkout@v4

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true

- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1G
purge: true
purge-prefixes: nix-${{ runner.os }}-
purge-created: 0
purge-last-accessed: 0
purge-primary-key: never

- name: "Check `nix develop` shell"
run: nix develop --check
- name: "Check `nix develop` shell can run command"
run: nix develop --command echo
- run: nix build
- run: nix flake check
- name: "Run all Haskell tests in the `nix develop` shell"
run: |
nix develop --command cabal update
nix develop --command cabal test
- name: "Run all PureScript tests in the `nix develop` shell"
run: nix develop --command spago test
47 changes: 0 additions & 47 deletions .github/workflows/purescript.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Haskell Stack

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- '**'
paths-ignore: []
pull_request:
paths-ignore: []

jobs:
stack-build:
runs-on: ubuntu-latest
name: Haskell Stack
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-version: 'latest'

- uses: freckle/stack-cache-action@v2

- name: Build Haskell with Stack
run: |
stack build

- uses: purescript-contrib/setup-purescript@main
with:
spago: "unstable"

- name: Cache PureScript dependencies
uses: actions/[email protected]
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }}
path: |
.spago
output
test/RoundTripArgonautAesonGeneric/app/output
test/RoundTripJsonHelpers/app/output

- name: Build PureScript
run: |
spago build
cd test/RoundTripArgonautAesonGeneric/app
spago build
cd ../../../
cd test/RoundTripJsonHelpers/app
spago build

- name: Haskell Tests with Stack
run: |
stack test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ cabal.sandbox.config
dist
dist-*
shell.nix
stack.yaml
.dir-locals.el
.psc-ide-port

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog for purescript-bridge

## 0.16.0.0 (unreleased)
* merge https://github.com/input-output-hk/purescript-bridge
* support https://github.com/input-output-hk/purescript-bridge-json-helpers
* `CodeGenSwitches` no longer used
* `Proxy` no longer used
* `Printer` uses `Leijen.Text` instead of `Text`
* `genericShow` PureScript instance from IOHK
* I think the same as https://github.com/eskimor/purescript-bridge/pull/85
* PR 85 has been replaced with IOHK's implementation
* some unit tests replaced with IOHK's tests
* all printer imports are combined into one function `instanceToImportLines` instead of being divided between two modules
* excellent `RoundTrip` tests implemented by IOHK
* greatly improves test coverage for both Argonaut and `json-helpers` and exposes issues
Loading
Loading