: Overlapping Instances + Existentials = Incoherent Instances
|
| Greetings,
|
| I've actually known about this for a while, but while discussing it, it
| occurred to me that perhaps it's something I should report to the proper
| authorities, as I've never seen a discussion of it. But, I thought I'd
Dan,
class C a where
foo :: a - String
instance C a where
foo _ = universal
instance C Int where
foo _ = Int
[...]
Now, IncoherentInstances is something most people would suggest you
don't use
(even people who are cool with OverlappingInstances). However, it
turns out
that
On Wednesday 03 February 2010 11:34:27 am Stefan Holdermans wrote:
I don't think it's the same thing. The whole point of the existential
is that at the creation site of any value of type Ex the type of the
value being packaged is hidden. At the use site, therefore, the only
suitable instance
Greetings,
I've actually known about this for a while, but while discussing it, it
occurred to me that perhaps it's something I should report to the proper
authorities, as I've never seen a discussion of it. But, I thought I'd start
here rather than file a bug, since I'm not sure it isn't