paulyoung / purescript-corefn

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

Distinguish between `Ident` and `GenIdent`? #26

Closed paulyoung closed 6 years ago

paulyoung commented 7 years ago

I imagine we need to check if an identifier name is a generated one, and parse those differently.

I seem to remember that the rules for generated identifiers were documented somewhere, perhaps in the source code of the main PureScript repo.

I may have discussed this with @paf31 already and determined that generated identifiers aren't present in the CoreFn JSON output.

anttih commented 7 years ago

The compiler uses runIdent to generate the Json for Ident. I don't see why we would want to distinguish those two as the consumer of the CoreFn.

If we have a use case for having them represented separately in the Json then I'd suggest we change it in the compiler. I guess one use case would be that the dollar sign that PS generates is not a valid character in your target language.

paulyoung commented 6 years ago

I think this is moot now that #42 has been merged.