John Velman [EMAIL PROTECTED] writes:
data Relation a i b = Rel {name::RN, arity::Int, members::(Set [EN])}
Why do you parametrize the data type when you don't use the
parameters? Either do
data Relation = Rel {name::RN, arity::Int, members::Set [EN]}
or
data Relation a i b =
Instance with a context doesn't seem to work as I expect.
Here's the story:
I define an data type, Relation, and I want to make it an instance of
Show, partly so I can debug and tinker with things interactively and have
ghci print something.
Here is my first try:
import Data.Set
type EN
[EMAIL PROTECTED]
To: haskell-cafe@haskell.org
Sent: Friday, January 14, 2005 1:29 AM
Subject: [Haskell-cafe] Question about instance
Instance with a context doesn't seem to work as I expect.
Here's the story:
I define an data type, Relation, and I want to make it an instance