-
Notifications
You must be signed in to change notification settings - Fork 43
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
Redefining hd and pattern matching #24
Comments
These are well-known issues: - links-lang#23 - links-lang#24 - links-lang#25
You are correct. |
These are well-known issues: - links-lang#23 - links-lang#24 - links-lang#25
Now that we have a module system, perhaps we should desugar to List.hd and List.tl, where List is a built-in module that provides the standard definitions of these operators. |
Actually, this turns out to be trivial to fix, just by looking up the various functions in the initial environment rather than the current one passed in to the pattern compiler. (Another clunkier fix that also worked was to have special versions of hd and tl that had names that are impossible to write in Links source code.) See #843 |
) (#843) * hygienic references to library functions in pattern compilation * removed commented out dead code
) (#843) * hygienic references to library functions in pattern compilation * removed commented out dead code
…inks-lang#24) (links-lang#843) * hygienic references to library functions in pattern compilation * removed commented out dead code
This test fails:
My best guess: pattern matching desugars to calls to
hd
andtl
, but is not hygienic.The text was updated successfully, but these errors were encountered: