class Foo a where (+) :: a -> a -> a instance Foo Double where infix 3 (+) x + y = x -- 5:5-5:16: Invalid declaration under instance definition.