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
 

Reply via email to