[Haskell-cafe] "runST $ return ()" /= "runST (return ())" ??

Marc A. Ziegert coeus at gmx.de
Sat Mar 24 20:28:53 EDT 2007


hi!

i've just discovered this strange behaviour of existential quantifiers with runST:

---
Prelude Control.Monad.ST> :t runST (return ())
runST (return ()) :: ()

Prelude Control.Monad.ST> :t runST $ (return ())
<interactive>:1:9:
    Couldn't match expected type `forall s. ST s a'
           against inferred type `m ()'
    In the second argument of `($)', namely `(return ())'

Prelude Control.Monad.ST>
---


the same with "id runST undefined".
is this a bug or an unsolved problem?
i'm not sure wheather it is a part of the wanted feature of runST's type definition.

i did not find any discussions about this.
can anyone enlighten me, please?

- marc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070325/f337a8ad/attachment.bin


More information about the Haskell-Cafe mailing list