Re: Existential Type Declarations in Hugs
On Thu, 3 May 2001 [EMAIL PROTECTED] wrote: (snip) > BTW, what is this "Skolem constant" that's referred to in the error message > that I received? A combination of http://www.sdsc.edu/~tbailey/teaching/cse151/lectures/chap09a.html and http://cs.wwc.edu/~aabyan/Logic/normal.html may answer that for you. (-: (It was too long ago now for me to remember much, and I'm not sure where my notes are, so I daren't attempt an explanation myself!) -- Mark ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Existential Type Declarations in Hugs
In a message dated 5/3/2001 4:00:18 AM Central Daylight Time, [EMAIL PROTECTED] writes: Should be: setx (MakeExistentialShape a) newx = MakeExistentialShape (setx a newx) The result of setx must have the same type as its first argument. Thanks. That solves my problem. BTW, what is this "Skolem constant" that's referred to in the error message that I received? Chris Rathman
Re: Existential Type Declarations in Hugs
Thu, 3 May 2001 02:54:26 EDT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> pisze: >class Shape a where > getx :: a -> Int > setx :: a -> Int -> a > >data ExistentialShape = > forall a. Shape a => MakeExistentialShape a > >instance Shape ExistentialShape where > getx (MakeExistentialShape a) = getx a > setx (MakeExistentialShape a) newx = setx a newx Should be: setx (MakeExistentialShape a) newx = MakeExistentialShape (setx a newx) The result of setx must have the same type as its first argument. -- __("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell