HaskellFlexibleInstances 是该语言的稳定扩展吗?

发布于 2024-12-19 14:07:18 字数 167 浏览 2 评论 0原文

Haskell 中的FlexibleInstances 有什么问题?为什么它们没有包含在 Haskell 2010 中?是FlexibleInstances 的实现不够稳定,无法纳入标准,还是与FlexibleInstances 相关的更深层次的问题?使用它们安全吗?它们可能会包含在 Haskell Prime 中吗?

What is the problem with FlexibleInstances in Haskell? Why are they not included in Haskell 2010? Were implementations of FlexibleInstances simply not stable enough for inclusion into a standard or are deeper concerns connected to FlexibleInstances? Is it safe to use them? Will they likely be included in Haskell Prime?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春庭雪 2024-12-26 14:07:18

使用它们安全吗?

是的。当 GHC 需要解析类型类时,FlexibleInstances 不会产生不明确或重叠的情况。请注意,实例重叠的可能性是可能的,这不是错误,但类型检查期间任何实际的混淆用法都将是错误。

它们可能会包含在 Haskell Prime 中吗?

我不知道,我不属于 Haskell Prime。有一个邮件列表,存档于 gmane。跟踪此问题的票证是编号 32

Is it safe to use them?

Yes. FlexibleInstances will not create an ambiguous or overlapping situation when GHC needs to resolve type classes. Note that the potential for overlap of the instances is possible and not an error, but any actual confusing usage during type checking will be an error.

Will they likely be included in Haskell Prime?

I have no idea, I am not part of Haskell Prime. There is a mailing list, archived at gmane. The ticket tracking this is number 32.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文