-
Notifications
You must be signed in to change notification settings - Fork 139
Add MonadFix instance #179
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
Conversation
This implementation doesn't make any attempt to be fusion-friendly. That would seem to require digging into some internals. Unfortunately, I tend to get rather lost in |
56df7de
to
915a5bb
Compare
I *believe* this is equivalent to the instance for `[]`. Writing QuickCheck properties for `mfix` seems pretty tricky, so I just added a small unit test. Fixes haskell#178
I don't think being fused is a realistic goal for this. I'll try to look it over soon. |
In case this helps: I just tested this implementation against the two list
monad examples in Levent Erkök's thesis, and it seems to check out.
…On Wed, Jul 5, 2017 at 9:31 PM, dolio ***@***.***> wrote:
I don't think being fused is a realistic goal for this.
I'll try to look it over soon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#179 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_TDwwE9EQDTfLsqov-jkN4JOCtJ8ks5sLDjpgaJpZM4OO3UN>
.
|
Do the properties of |
I believe so. The only trouble is that we end up with an extra call to the
passed function. I don't *think* we save much complexity over a slightly
simplified version. I'll post one or two options later if I have time.
Please poke me if I haven't done so by Monday.
On Jul 15, 2017 11:47 AM, "dolio" <[email protected]> wrote:
Do the properties of mfix here mean that boostrapping with f ⊥ is just as
good as fix (head . f) (because we just want to know the 'statically
determined' length)? And then the generate is less complicated?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#179 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_ebHMJBGrf8Heoh5-gjHLSVCd5uKks5sON8GgaJpZM4OO3UN>
.
|
Superseded by #312 |
It's #179 with merged into latest master and documentation tweaks Originally PR authored by David Feurer I *believe* this is equivalent to the instance for `[]`. Writing QuickCheck properties for `mfix` seems pretty tricky, so I just added a small unit test. Co-authored-by: David Feuer <[email protected]>
It's #179 with merged into latest master and documentation tweaks Originally PR authored by David Feurer I *believe* this is equivalent to the instance for `[]`. Writing QuickCheck properties for `mfix` seems pretty tricky, so I just added a small unit test. Co-authored-by: David Feuer <[email protected]>
I believe this is equivalent to the instance for
[]
. WritingQuickCheck properties for
mfix
seems pretty tricky, so I justadded a small unit test.
Fixes #178