typing error?

1999-07-18 Thread Jan Brosius
Hi, I have read the online postscript paper " Lazy Functional State Threads". I think the typing (page 4) f :: MutVar s a -> Mutvar s a is wrong, since the definition of f is : f v = runST ( newVar v 'thenST' \w -> readVar w) and since newVar is typed as: newVar :: a

Re: typing error?

1999-07-18 Thread Amr A Sabry
I don't have the paper in front of me but I am familiar with the idea ... Given the definition: f v = runST ( newVar v 'thenST' \w -> readVar w) Let's confirm that f :: (MutVar s a) -> (MutVar s a). Let v be of type (MutVar s a), then: newVar v :: ST s' (MutVar s' (MutVar s a)

instance overlapping

1999-07-18 Thread Nguyen Phan Dung
Hi, If I have the folowwing declaration: class Soup where ... instance Soup String where ... instance Soup t => Soup [t] where ... This will lead to an error: "instance overlapping". Is there anyway to solve this? (I could not make an instance for Char) Thank you very much ! Phan Dung.

Re: instance overlapping

1999-07-18 Thread Wolfram Kahl
Nguyen Phan Dung <[EMAIL PROTECTED]> writes: > > If I have the following declaration: > > class Soup where > ... > > instance Soup String where > ... > > instance Soup t => Soup [t] where > ... > > This will lead to an error: "instance overlapping". > > Is there anyway to solv

Re: instance overlapping

1999-07-18 Thread Daniel Russell
>Hi, >If I have the folowwing declaration: >class Soup where >... > >instance Soup String where >... > >instance Soup t => Soup [t] where >... > >This will lead to an error: "instance overlapping". > >Is there anyway to solve this? Yes -- if you are using Hugs98 then you need to use the comman