<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/19/2013 04:59 PM, Brandon Allbery
wrote:<br>
</div>
<blockquote
cite="mid:CAKFCL4UaVYYQ3idJsQX_wa2jMMckCuv9bexehh41yJxOM7pRaA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">On Mon, Aug 19, 2013 at 1:36 AM,
Aurimas <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:aurimas.anskaitis@vgtu.lt" target="_blank">aurimas.anskaitis@vgtu.lt</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":3gq" style="overflow:hidden">Thanks, this is
clearly the most easy way to fix the problem. But the
question remains - why the line<br>
"do r1 <- uniformR (-1.0, 1.0 :: Double) gen"
cannot be annotated with ST s Double?</div>
</blockquote>
</div>
<br>
Maybe you need ScopedTypeVariables? But I'd be suspicious
that, given the forall in the definition of ST, that such a
type annotation *always* creates a new `s` and some other way
to "force" the type is needed.<br clear="all">
<div><br>
</div>
</div>
</div>
</blockquote>
ScopedTypeVariables does not solve the problem. As you noticed, new
s is created and runST is not happy about this. It is<br>
strange that this type can be "forced" replacing given line by a
function returning ST s a.<br>
</body>
</html>