<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="gmail_quote">
<div dir="ltr">On Tue, Apr 18, 2017, 16:02 Joshua Grosso <<a
href="mailto:jgrosso1@asu.edu">jgrosso1@asu.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><i>If</i> I'm understanding correctly, GHCI's
complaining about the fact that `return 2` requires it to
create an instance of a `Monad`, but it doesn't know which
`Monad` instance it should use...
<div>Does `let (x, y) = (1, return 2) :: (Int, Maybe Int)`
work (where you can replace `Maybe` with any other monad)?</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<span>Hi Joshua,</span>
<div><br>
</div>
<div>Thanks for the input. You are correct that if I choose a
particular Monad instance GHCi accepts the code.</div>
<div><br>
</div>
<div>I believe it should be able to do the assignment without
choosing one though. It is, for example, okay with let y = return
2.</div>
<div><br>
</div>
<div>I'm thinking Sergiu is onto something about this having to do
with special GHCi handling.</div>
<div><br>
</div>
<div>Thanks! -Tyson</div>
<br>
</body>
</html>