Request for input on #7253: Top-level bindings in GHCI

Andrew Gibiansky andrew.gibiansky at gmail.com
Sat Aug 22 23:13:51 UTC 2015


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.

-- Andrew

On Sat, Aug 22, 2015 at 8:50 AM, Alex Rozenshteyn <rpglover64 at gmail.com>
wrote:

> I'm thinking of working on this ticket (
> https://ghc.haskell.org/trac/ghc/ticket/7253), so, as per mpickering's
> suggestion (https://phabricator.haskell.org/chatlog/channel/3/?at=1353572),
> I'm emailing the list to solicit input.
>
> 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.
>
> Comments?
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150822/36fe3db9/attachment-0001.html>


More information about the ghc-devs mailing list