Hi,
First I give the following primitive
operations
newVar :: a
-> ST s (MutVar s a)
readVar :: MutVar
s a -> ST s a
writeVar :: MutVar
s a -> a -> ST s ()
Next consider the function
f :: MutVar s a
-> Mut Var s a
f v = runST
(newVar v `thenST` \w ->
readVar w)
1. What is the type given to newVar v by
the typechecker?
Friendly
Jan Brosius
|
- Re: a newbie's question about something related to runST Jan Brosius
- Re: a newbie's question about something related to r... Fergus Henderson
- Re: a newbie's question about something related ... Jan Brosius
- Re: a newbie's question about something rela... Fergus Henderson