Skip to content

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 <David.Feuer@gmail.com>
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 <David.Feuer@gmail.com>
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