-
Notifications
You must be signed in to change notification settings - Fork 9
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
Boxed combinators? #10
Comments
The fact that So I figured we could use Idiom brackets instead: the problem is just begging for us However I can't seem to declare Applicative (\ a => Box (Parser' a) n) where
pure = box
(<*>) = Induction.Nat.app Apparently an implementation cannot mention a universally quantified variable So I guess there is no other way than to define a |
Yeah, that's a known limitation in current Idris. You can do it for named implementations:
but that will require wrapping every usage of it in There is, however, a light at the end of the tunnel.. |
Wait. Does that mean that if we had a |
Ah. No. Nevermind. Plus it wouldn't fit in the |
I don't think so, I've just discovered though, that you can in fact inline the helper - writing |
What if you write |
Yeah, writing |
In the #36 PR I have added a bunch of combinators called some variants of Once I had this my life was a lot easier as I could propagate the |
Using combinators on
rec
appears to be fairly common, and it seems to always require defining helpers to make types align, e.g.:Should we maybe provide a separate module for these out of the box :), or there's a more elegant solution?
The text was updated successfully, but these errors were encountered: