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?
Asked
Active
Viewed 2,739 times
1 Answers
21
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.

Chris Kuklewicz
- 8,123
- 22
- 33
-
Thanks for the link to the haskell prime trac. Didn't know the development process was that open. Very useful! – scravy Dec 03 '11 at 13:32
-
It took a while for someone to find a counter-example: see [this example](https://www.reddit.com/r/haskell/comments/dcflzu/flexibleinstances_can_cause_silent_instance/f28ac76), but yeah, `FlexibleInstances` is not 100% safe, at least in its current form. – typesanitizer Oct 03 '19 at 03:19