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

The big question: Parsing #6

Open
i-am-the-slime opened this issue Jul 10, 2020 · 2 comments
Open

The big question: Parsing #6

i-am-the-slime opened this issue Jul 10, 2020 · 2 comments

Comments

@i-am-the-slime
Copy link

How do you see parsing in relation to this library? Would you say it should live in a different library?

@flip111
Copy link
Member

flip111 commented Jul 13, 2020

Well there is of course this https://github.com/purescript/purescript-in-purescript which is outdated. I don't think it's a good idea to develop in parallel a parser to the official purescript parser which is in the purescript compiler. Instead i would prefer import / export of the syntax tree.

For codegen the purescript code tree would be constructed directly, so we don't need a parser.

Would be interesting though (for testing as well) to do:

  1. create arbitrary code structures (AST / CST) with Arbitrary instance from haskell quickcheck
  2. export to intermediate format (not clear which format is suitable)
  3. import into this library
  4. pretty print with purescript code
  5. read printed source file with official purescript parser in purescript compiler
  6. compare structures for equility

By the way .. i vaguely remember that there were some parts to split of some parts of the official purescript compiler into their own library ... this might become interesting in the future.

@srghma
Copy link
Collaborator

srghma commented Feb 21, 2021

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

3 participants