Skip to content
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

Relax the conditions on generating types in applicative functors #6821

Closed
vicuna opened this issue Mar 24, 2015 · 2 comments
Closed

Relax the conditions on generating types in applicative functors #6821

vicuna opened this issue Mar 24, 2015 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Mar 24, 2015

Original bug ID: 6821
Reporter: @yallop
Status: acknowledged (set by @damiendoligez on 2015-03-30T15:17:38Z)
Resolution: open
Priority: normal
Severity: feature
Category: typing
Related to: #5905 #6662
Monitored by: @gasche @yakobowski

Bug description

Unless I'm mistaken, it should be safe to apply generative functors inside applicative functors if no generated types escape: the following doesn't appear to be unsound:

module F(X:T) =
struct
include (G() : sig end)
...
end

@vicuna
Copy link
Author

vicuna commented Mar 25, 2015

Comment author: @garrigue

While this would indeed be sound, it may be hard to be completely exhaustive.
(For this precise case, this would amount to forgetting funct_body appropriately for coercions)

Do you have some precise use case in mind ?

Note that there is already a workaround:

include ((G : functor () -> sig end) ())

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant