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

Implement free variable–computing functions (for things besides DType) correctly #108

Open
RyanGlScott opened this issue Jan 14, 2019 · 0 comments

Comments

@RyanGlScott
Copy link
Collaborator

In #105 (comment), @goldfirere observed that many of the free variable–computing functions in L.H.T.D.FV (that I added in #95) were pretty slipshod. For instance, here is one case of fv_letdec:

go (DSigD _ t) = fvDType t -- A function's type can't mention its name

This completely falls over on this expression:

let foo :: a -> a; foo x = x in foo y

The only free variable in this expression is y, but due to the case above, fvDExp would claim that a is a free variable. Ack!

This was far from the only issue with these functions, so I will ultimately be ripping them out in #105 once that is approved. But I do have a reason for wanting them: they will be necessary to fix goldfirere/singletons#339. This issue serves as a reminder to revisit the implementation of these functions so that they can be done correctly next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant