Reputation: 1
Is the following possible (in spirit) with the GHC?
-- Syntax error: parse error on input `a'
class Foo a b c | (a, b) -> c where
foo :: a -> b -> c
What alternatives do I have?
Upvotes: 3
Views: 198
Reputation: 40807
class Foo a b c | a b -> c
should work fine; it's the same syntax on the right-hand side, too.
as -> bs
simply means that as collectively determines every bs.
Upvotes: 5