RE: [Haskell] Re: Records

2005-11-28 Thread Ralf Lammel
Good questions. You can't have a polymorphic typecase like "`extQ` (show :: Show a => a -> String )" because that's not really a *type*case. It is too polymorphic. You can have a polymorphic typecase like "`extQ` ( lshow :: [ a ] -> String )" because that's covered by the SYB2 paper; you need ex

[Haskell] Re: Records

2005-11-28 Thread Johannes Waldmann
Ketil Malde wrote: >> Perhaps data Foo = Foo { foo :: Int, bar :: Int ; bar = 2 * foo self } >> with a reserved word "self" is better. - Are there semantic problems? > > Can't you solve this by writing a fiunction to construct Foo with the > desired properties? Sure but by the same argument I

[Haskell] Re: Records

2005-11-28 Thread Ketil Malde
Johannes Waldmann <[EMAIL PROTECTED]> writes: > Again, the concrete syntax problem is whether to hide the argument. > Perhaps data Foo = Foo { foo :: Int, bar :: Int ; bar = 2 * foo self } > with a reserved word "self" is better. - Are there semantic problems? Can't you solve this by writing a f