Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Add MonadFix instance #179

wants to merge 1 commit into from

Conversation

treeowl
Copy link
Contributor

@treeowl treeowl commented Jul 5, 2017

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 #178

@treeowl
Copy link
Contributor Author

treeowl commented Jul 5, 2017

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 Bundle.

@treeowl treeowl force-pushed the monadfix branch 3 times, most recently from 56df7de to 915a5bb Compare July 5, 2017 21:21
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
@dolio
Copy link
Contributor

dolio commented Jul 6, 2017

I don't think being fused is a realistic goal for this.

I'll try to look it over soon.

@treeowl
Copy link
Contributor Author

treeowl commented Jul 6, 2017 via email

@dolio
Copy link
Contributor

dolio commented Jul 15, 2017

Do the properties of mfix here mean that boostrapping with f ⊥ is just as good as fix (f . head) (because we just want to know the 'statically determined' length)? And then the generate is less complicated, and we don't need ST?

@treeowl
Copy link
Contributor Author

treeowl commented Jul 15, 2017 via email

@Shimuuar
Copy link
Contributor

Shimuuar commented Jun 6, 2020

Superseded by #312

@Shimuuar Shimuuar closed this Jun 6, 2020
@Shimuuar Shimuuar reopened this Jun 6, 2020
@treeowl treeowl closed this Jun 6, 2020
Shimuuar added a commit that referenced this pull request Jun 14, 2020
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]>
lehins pushed a commit that referenced this pull request Jan 16, 2021
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MonadFix instance for Vector
3 participants