Closed anttih closed 6 years ago
Also, I will make a separate PR for the Expr
refactor before this is ready.
@paulyoung Ok, this is ready for review now. Here's a summary of the changes:
Expr
is now monomorphicIsForeign
instances to read most of the datatypesGeneric
instances to show
datatypesIdent
no longer has the GenIdent
constructor since CoreFn does not distinguish between the generated and non-generated onespurescript-foreign-generic
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.
@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.
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 writeIsForeign
instances. In particular I was now able to write aIsForeign
instance forLiteral
which is parameterised over eitherExpr
orBinder
.Comments?