-
Notifications
You must be signed in to change notification settings - Fork 89
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
Allow more/generalize let/where pattern bindings. #357
Comments
@bergmark what's the status of this? I guess I could work on this. I think in Haskell every pattern matching construct gets desugared into case expressions with one level of pattern matching. I think we can use similar thing and remove all pattern matching constructs except |
@osa1 that sounds great! No one is working on it so please go ahead :) |
@osa1 Did you start working on this? I think it would simplify my typeclass branch a lot, so please let me know if you are working on it or if I should tackle it myself. I would like every top level declaration to desugar into a single unguarded case:
|
Ahh, sorry @bergmark couldn't spare my time to work on this. The algorithm should not be very hard and IIRC it's should be explained in The Implementation of Functional Programming Languages chapter 5. |
Alright I'll take a look at that, thanks! |
As reported in #310 these are examples of unsupported patterns:
... and more. The code is in
Fay.Compiler.Decl.compilePatBind
, the general case is pretty hacky and can be improved. Note that most if not all patterns are implemented for case statements already.The text was updated successfully, but these errors were encountered: