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
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)
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.
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
>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