paulyoung / purescript-corefn

A library for working with the PureScript functional core.
Apache License 2.0
23 stars 7 forks source link

Monomorphic Expr #37

Closed anttih closed 6 years ago

anttih commented 7 years ago

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 commented 7 years ago

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

anttih commented 7 years ago

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

paulyoung commented 7 years ago

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 commented 6 years ago

@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.