Are Haskell FlexibleInstances a stable extension t

2019-01-27 12:01发布

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?

标签: haskell ghc
1条回答
在下西门庆
2楼-- · 2019-01-27 12:49

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.

查看更多
登录 后发表回答