Skip to content

Monomorphic Expr #37

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

Closed
wants to merge 5 commits into from
Closed

Monomorphic Expr #37

wants to merge 5 commits into from

Conversation

anttih
Copy link
Contributor

@anttih anttih commented Jan 29, 2017

This is nowhere near ready but thought I'd put it out there for comments. While adding support for Binders I noticed that it would make things simpler to make Expr monomorphic. We don't yet need the type param for type annotations and it makes it much easier to write IsForeign instances. In particular I was now able to write a IsForeign instance for Literal which is parameterised over either Expr or Binder.

Comments?

@anttih
Copy link
Contributor Author

anttih commented Jan 29, 2017

Also, I will make a separate PR for the Expr refactor before this is ready.

* Write an `IsForeign` instance for `Qualified`
* Make `Ident` monomorphic
@anttih anttih changed the title [WIP] Binders Monomorphic Expr Mar 15, 2017
@anttih
Copy link
Contributor Author

anttih commented Mar 16, 2017

@paulyoung Ok, this is ready for review now. Here's a summary of the changes:

  • Expr is now monomorphic
  • Uses IsForeign instances to read most of the datatypes
  • Uses Generic instances to show datatypes
  • Ident no longer has the GenIdent constructor since CoreFn does not distinguish between the generated and non-generated ones
  • Update version for purescript-foreign-generic

@anttih anttih mentioned this pull request Mar 16, 2017
@paulyoung
Copy link
Owner

Hey @anttih. Sorry for the delayed response on this.

I know this branch is probably out of date now anyway, but I think I'd like to keep Expr polymorphic.

There was some talk of adding things to the corefn representation that I think it would be useful for.

@paulyoung
Copy link
Owner

@anttih thanks for the effort on this. I'm closing in favor of #42, which aims to stay close to the Haskell version for the time being.

@paulyoung paulyoung closed this Feb 26, 2018
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.

2 participants