<div dir="ltr">I would suggest treating "a = 1" as a declaration. This is what IHaskell does, and it seems more intuitive than hacky parsing it into a "let a = 1". The implementation should be easy using runDecls from InteractiveEval and parseDeclaration from Parser.y to do the actual parsing. <div><br></div><div>-- Andrew</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 22, 2015 at 8:50 AM, Alex Rozenshteyn <span dir="ltr"><<a href="mailto:rpglover64@gmail.com" target="_blank">rpglover64@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I'm thinking of working on this ticket (<a href="https://ghc.haskell.org/trac/ghc/ticket/7253" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/7253</a>), so, as per mpickering's suggestion (<a href="https://phabricator.haskell.org/chatlog/channel/3/?at=1353572" target="_blank">https://phabricator.haskell.org/chatlog/channel/3/?at=1353572</a>), I'm emailing the list to solicit input.<br><br></div>My first instinct was to treat declarations like "a = 1" in GHCI as equivalent to "let a = 1"; this would be a straightforward matter of parsing. On the other hand, as thoughtpolice comments, let-bound variables are treated subtly differently than top-level bindings, so the proper solution may be more involved.<br><br></div>Comments?<br></div>
<br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>