
3 Mar
2007
3 Mar
'07
11:27 a.m.
On 03/03/07, Bryan Burgers
As far as I know, you should be defining the type of bar in the class declaration for Foo, not in an instance declaration.
I think I over-reduced my problem. Here's a more complex issue that can't be resolved by moving bar to be a method of the class: {-# OPTIONS_GHC -fglasgow-exts #-} class Foo a b | a -> b where foo :: Foo b c => a -> Maybe c instance Foo String () where foo _ = Nothing instance Foo Int String where foo 4 = Just (); foo _ = Nothing -- -David House, dmhouse@gmail.com
6656
Age (days ago)
6656
Last active (days ago)
0 comments
1 participants
participants (1)
-
David House