Skip to content

Conversation

MatthewDaggitt
Copy link
Contributor

Fixes #1466

@MatthewDaggitt MatthewDaggitt linked an issue Jun 3, 2021 that may be closed by this pull request
@gallais
Copy link
Member

gallais commented Jun 3, 2021

I am perversely tempted to suggested adding a sized version of the
least fixpoint and a guarded version of the greatest one. This way
users can pick their poison (lack of safety but more compositional
termination checking vs. safety but annoying checks).

I can prepare the commits doing that & push it to this PR if you
approve the idea.

@andreasabel
Copy link
Member

adding a sized version of the
least fixpoint and a guarded version of the greatest one.

It seems that atm there are different choices of greatest fp for indexed vs. non-indexed:

  • indexed: musical M
  • non-indexed: sized M

I think it would make sense to have all four variants in each case, as @gallais suggests:

  • W sized and non-sized
  • M sized and musical

andreasabel added a commit to andreasabel/universal-algebra that referenced this pull request Jun 3, 2021
@MatthewDaggitt
Copy link
Contributor Author

Yup, happy to have all the variants included if you want to update the PR @gallais

@gallais gallais self-assigned this Jun 3, 2021
@JacquesCarette
Copy link
Contributor

Multiplicity of choice, in this case, seems like a good idea to me as well.

@MatthewDaggitt
Copy link
Contributor Author

@gallais are you going to have time to look at this today? Otherwise let me know and I'll have a crack at it, as I think we'd probably better make a 2nd release candidate sooner rather than later.

@gallais
Copy link
Member

gallais commented Jun 7, 2021

Yep, doing it today during AIM.

@gallais
Copy link
Member

gallais commented Jun 7, 2021

This is ready I think. But please merge #1517 first.

Copy link
Contributor Author

@MatthewDaggitt MatthewDaggitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to summarise the comments, I think the most consistent structure would be:
Data.Container(.Indexed).Fixpoint.(Sized/Guarded)?

where the Guarded modules re-export the least fixpoints that live in Data.Container(.Indexed)?

@MatthewDaggitt MatthewDaggitt merged commit e926c7d into master Jun 8, 2021
@MatthewDaggitt MatthewDaggitt deleted the sized-types-freeMonad branch June 8, 2021 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split out modules needing guardedness Why does Data.Container.FreeMonad use --sized-types?

4 participants