Re: [Haskell-cafe] Question about instance

2005-01-14 Thread Ketil Malde
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 =

[Haskell-cafe] Question about instance

2005-01-13 Thread John Velman
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

Re: [Haskell-cafe] Question about instance

2005-01-13 Thread John Velman
[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