HaskellFlexibleInstances 是该语言的稳定扩展吗?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。当 GHC 需要解析类型类时,FlexibleInstances 不会产生不明确或重叠的情况。请注意,实例重叠的可能性是可能的,这不是错误,但类型检查期间任何实际的混淆用法都将是错误。
我不知道,我不属于 Haskell Prime。有一个邮件列表,存档于 gmane。跟踪此问题的票证是编号 32。
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.
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.