问题描述
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?
推荐答案
是的。当GHC需要解析类型类时,FlexibleInstances不会产生模糊或重叠的情况。请注意,实例重叠的可能性并不是错误,但在类型检查过程中任何实际混淆的用法都是错误的。
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.
这篇关于Haskell FlexibleInstances是该语言的稳定扩展吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!