Commit 7a46b8b3 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Comments only

parent bdb71d45
......@@ -16,11 +16,23 @@ data FooD a = FooD
instance Foo t => Sat (FooD t)
instance Data FooD a => Foo a
instance Foo a => Foo [a]
-- Have: Foo a, Data FooD a, Foo [a]
--
-- Want superclasses: (Data FooD [a])
-- and hence: Sat (FooD [a]), Data FooD a
-- and hence: Foo [a]
{-
Given: Foo a,
and its superclasses: Data FooD a
Want superclass: Data FooD [a]
by instance Data FooD [a]
want: Sat (FooD [a])
Data FooD a -- We have this
by instance Sat (FooD t)
want: Foo [a]
BUT THIS INSTANCE OVERLAPS
-}
instance Foo [Char]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment