Function definition in GHCi
authorRoman Shatsov <roshats@gmail.com>
Sat, 21 Nov 2015 14:58:34 +0000 (15:58 +0100)
committerBen Gamari <ben@smart-cactus.org>
Sat, 21 Nov 2015 16:15:09 +0000 (11:15 -0500)
commitb98ff3ccb14e36145404f075349c8689762a2913
tree06eb4336d7637d5ecaa0bc68ae047eb524a3b03d
parent2325bd4e0fad0e5872556c5a78d1a6a1873e7201
Function definition in GHCi

This patch allows define and re-define functions in ghci. `let` is not
required anymore (but can be used).

Idea: If ghci input string can be parsed as statement then run it as
statement else run it as declaration.

Reviewers: mpickering, bgamari, austin

Reviewed By: mpickering, bgamari, austin

Subscribers: hvr, mpickering, dterei, thomie

Differential Revision: https://phabricator.haskell.org/D1299

GHC Trac Issues: #7253
docs/users_guide/7.12.1-notes.rst
docs/users_guide/ghci.rst
ghc/GhciMonad.hs
ghc/InteractiveUI.hs
testsuite/tests/ghci/should_run/T7253.script [new file with mode: 0644]
testsuite/tests/ghci/should_run/T7253.stderr [new file with mode: 0644]
testsuite/tests/ghci/should_run/T7253.stdout [new file with mode: 0644]
testsuite/tests/ghci/should_run/T9915.stderr [deleted file]
testsuite/tests/ghci/should_run/all.T
testsuite/tests/safeHaskell/ghci/p14.stderr