Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking changes on compiler side #18

Open
klntsky opened this issue Aug 9, 2019 · 2 comments
Open

Tracking changes on compiler side #18

klntsky opened this issue Aug 9, 2019 · 2 comments

Comments

@klntsky
Copy link
Collaborator

klntsky commented Aug 9, 2019

This issue is to track changes in the PureScript compiler that affect docs.json format and may break things for us.

  1. show else prefix for instance chain items in docs purescript#3715
@klntsky
Copy link
Collaborator Author

klntsky commented Aug 20, 2019

I think in the future we can parametrize our DocsJson type by a row of types corresponding to docs.json parts that differ for various versions of purs.

And then we'll have DecodeJson instances for each of the versions - it will not require duplicating much code, we'll just use DecodeJson instances for these tiny differing parts.

@klntsky
Copy link
Collaborator Author

klntsky commented Aug 20, 2019

The idea above was inspired by the awesome "Trees That Grow" paper.

It shows how to define many variants of large ADTs that differ only in some of the constructors, with the use of type families.

We don't have type families in PS, but I believe rows can be a replacement for them when applying this technique.

UPD: Wrong, looks like I had a misconception about what can be done with row types.

Anyways, multiple type parameters will do the trick just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant