Skip to content

Add MonadFix instance - #179

Closed
treeowl wants to merge 1 commit into
haskell:masterfrom
treeowl:monadfix
Closed

Add MonadFix instance#179
treeowl wants to merge 1 commit into
haskell:masterfrom
treeowl:monadfix

Conversation

@treeowl

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
treeowlforce-pushed the monadfix branch 3 times, most recently from 56df7de to 915a5bbCompareJuly 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.
Fixeshaskell#178
@dolio

dolio commented Jul 6, 2017

Copy link
Copy Markdown
Contributor

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

I'll try to look it over soon.

@treeowl

treeowl commented Jul 6, 2017 via email

Copy link
Copy Markdown
ContributorAuthor

@dolio

dolio commented Jul 15, 2017

Copy link
Copy Markdown
Contributor

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

treeowl commented Jul 15, 2017 via email

Copy link
Copy Markdown
ContributorAuthor

@Shimuuar

Copy link
Copy Markdown
Contributor

Superseded by #312

@ShimuuarShimuuar closed this Jun 6, 2020
@ShimuuarShimuuar reopened this Jun 6, 2020
@treeowltreeowl 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 freeto 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

@treeowl@dolio@Shimuuar