Re: [Haskell] Incoherent instances can make ST monad unsound

2006-01-26 Thread Thomas Jäger
On Thu, 2006-01-26 at 20:29 -0800, [EMAIL PROTECTED] wrote: > circumstances, many things break, including the ST monad. One can > indeed break the essential guarantee of the ST monad -- for example, > create a top level STRef *and* fruitfully use in arbitrary ST > computations. The e

[Haskell] Incoherent instances can make ST monad unsound

2006-01-26 Thread oleg
In the recent message about regions I wrote: > Typeable constraint has reduced the problem of 'region nesting' to the > regular problem of the 'linearity' of computations -- which is already > solved in ST monad. We can add that pervasive 's' type parameter

[Haskell] Re: ST Monad and all that

2005-07-11 Thread Srinivas Nedunuri
OK, thanks for the references. I think I've got a better handle on what's what. The library documentation mentions the ability to convert the ST monad into an IO monad. What are the reasons/pluses/minuses of doing this? (I can see one reason being that you won't ha

Re: [Haskell] Re: ST Monad and all that

2005-07-08 Thread Wolfgang Jeltsch
Am Freitag, 8. Juli 2005 18:50 schrieb Peter Eriksen: > "Srinivas Nedunuri" <[EMAIL PROTECTED]> writes: > > Hello, in trying to understand how to use the ST Monad I've come across > > references to a bewildering variety of related types such as STRefs, &

[Haskell] Re: ST Monad and all that

2005-07-08 Thread Peter Eriksen
"Srinivas Nedunuri" <[EMAIL PROTECTED]> writes: > Hello, in trying to understand how to use the ST Monad I've come across > references to a bewildering variety of related types such as STRefs, > STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes

Re: [Haskell] ST Monad and all that

2005-07-08 Thread Wolfgang Jeltsch
Am Freitag, 8. Juli 2005 12:48 schrieb Srinivas Nedunuri: > Hello, in trying to understand how to use the ST Monad I've come across > references to a bewildering variety of related types such as STRefs, > STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. >

[Haskell] ST Monad and all that

2005-07-08 Thread Srinivas Nedunuri
Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place where I can get a comprehensive explanation of what&#

st monad

2002-01-29 Thread Andre W B Furtado
How do I find the implementation of the module ST? In the GHC documentation, I can only find the signatures of the functions.

Re: Type problem with ST monad

1999-04-23 Thread Olaf Chitil
Sigbjorn Finne wrote: > forwarding to the mailing list is restricted to off-hours only at the > moment, but thought I'd suggest a solution to you before then - use a > (universally quantified) pattern matching function rather than a > pattern binding, i.e., > > deTIM :: TIM s a -> ST s a > deTI

Type problem with ST monad

1999-04-23 Thread Olaf Chitil
Hi, I have a problem with defining a new monad based on the state monad ST. The new monad is a combination of ST and the Maybe monad. It is intended for computations that use many states and may fail. If a part of the computation fails the whole computation fails. (I want to use it for type inf