Skip to content

Merge purescript-ast into purescript-cst#4094

Merged
JordanMartinez merged 11 commits intopurescript:masterfrom
JordanMartinez:mergeAstIntoCst
May 30, 2021
Merged

Merge purescript-ast into purescript-cst#4094
JordanMartinez merged 11 commits intopurescript:masterfrom
JordanMartinez:mergeAstIntoCst

Conversation

@JordanMartinez
Copy link
Copy Markdown
Contributor

Description of the change

Fixes #4067 to make releases a bit easier.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Added myself to CONTRIBUTORS.md (if this is my first contribution)
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

I think #4090 should be merged before this one. This one is easy to reimplement but 4090 isn't.

@hdgarrood hdgarrood mentioned this pull request May 25, 2021
5 tasks
@wclr
Copy link
Copy Markdown
Contributor

wclr commented May 26, 2021

Wouldn't it be a miscommunication to put AST and CST under the name purescript-cst?

@hdgarrood
Copy link
Copy Markdown
Contributor

I don't think it would be really that much worse than it is currently, since purescript-cst already depends on purescript-ast. We could rename it to purescript-syntax but that could be annoying for people who currently depend on purescript-cst, since if we don't change the name from purescript-cst then downstream code likely won't need to change.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

I've updated this PR to work on top of current master now that #4090 has been merged. CI passed.

# purescript-cst

Defines the surface syntax of the PureScript Programming Language.
Defines the surface and underlying syntax of the PureScript Programming Language.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that these packages are merged, I think talking about a distinction between a "surface" and "underlying" syntax is probably unnecessary, and I suspect it won't be clear to lots of readers, and they probably don't need to care about the difference in lots of cases anyway, at least not immediately. How about "The parser for the PureScript programming language"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "The parser for the PureScript programming language"?

Isn't this more than just the parser? Does one ever operate directly on the AST via some tool?

I'll make the change, but I'm just expressing my confusion as to why syntax is no longer mentioned when it seems like that's what this resulting library is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has type definitions for the syntax, sure, but you can’t really write a parser without having those in the first place. Maybe I’m overthinking it though. I guess “defines the syntax for …” would work too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think syntax and parser would probably work, but... 🙃 I already merged this.

We can fix it later if someone gets confused down the road.

## Compiler compatibility

We provide a table to make it a bit easier to map between versions of `purescript` and `purescript-cst`.
We provide a table to make it a bit easier to map between versions of `purescript`, `purescript-cst`, and `purescript-ast`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now is a good opportunity to put this table in reverse order, so that the latest versions (which people are more likely to care about) are at the top. Also, I think it would be nice to have a separate table following the merge of ast and cst, so that there isn't an extra column. Maybe something like this?


We provide a table to make it a bit easier to map between versions of purescript and purescript-cst.

purescript purescript-cst
0.14.2 0.2.0.0

Before v0.14.2, there was a third package, purescript-ast. In v0.14.2, purescript-ast was merged into purescript-cst.

purescript purescript-cst purescript-ast
0.14.1 0.1.1.0 0.1.1.0
0.14.0 0.1.0.0 0.1.0.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea!

version: 0.1.1.0
synopsis: PureScript Programming Language Concrete Syntax Tree
description: The surface syntax of the PureScript Programming Language.
description: The surface and underlying syntax of the PureScript Programming Language.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change the README according to my comment there, let's make the same change here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@JordanMartinez
Copy link
Copy Markdown
Contributor Author

Also, feel free to make any edits necessary to get this merged if I don't respond in time.

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

Successfully merging this pull request may close these issues.

Merge purescript-ast and purescript-cst

3 participants