[commit: ghc] master: Add parseExpr and compileParsedExpr and use them in GHC API and GHCi (d20031d)
git at git.haskell.org
git at git.haskell.org
Fri Jun 12 12:15:06 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d20031d4c88b256cdae264cb05d9d850e973d956/ghc
>---------------------------------------------------------------
commit d20031d4c88b256cdae264cb05d9d850e973d956
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Jun 12 13:15:18 2015 +0100
Add parseExpr and compileParsedExpr and use them in GHC API and GHCi
Summary:
This commit brings following changes and fixes:
* Implement parseExpr and compileParsedExpr;
* Fix compileExpr and dynCompilerExpr, which returned `()` for empty expr;
* Fix :def and :cmd, which didn't work if `IO` or `String` is not in scope;
* Use GHCiMonad instead IO in :def and :cmd;
* Clean PrelInfo: delete dead comment and duplicate entries, add assertion.
See new tests for more details.
Test Plan: ./validate
Reviewers: austin, dterei, simonmar
Reviewed By: simonmar
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D974
GHC Trac Issues: #10508
>---------------------------------------------------------------
d20031d4c88b256cdae264cb05d9d850e973d956
compiler/main/GHC.hs | 9 +++-
compiler/main/HscMain.hs | 71 +++++++++++++++++------------
compiler/main/InteractiveEval.hs | 73 ++++++++++++++++--------------
compiler/prelude/PrelInfo.hs | 19 ++++++--
compiler/prelude/PrelNames.hs | 23 ++++------
ghc/InteractiveUI.hs | 46 +++++++++++++------
testsuite/.gitignore | 1 +
testsuite/tests/ghc-api/T10508_api.hs | 32 +++++++++++++
testsuite/tests/ghc-api/T10508_api.stderr | 4 ++
testsuite/tests/ghc-api/T10508_api.stdout | 3 ++
testsuite/tests/ghc-api/all.T | 7 ++-
testsuite/tests/ghci/scripts/T10508.script | 21 +++++++++
testsuite/tests/ghci/scripts/T10508.stderr | 8 ++++
testsuite/tests/ghci/scripts/T10508.stdout | 6 +++
testsuite/tests/ghci/scripts/all.T | 1 +
15 files changed, 226 insertions(+), 98 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d20031d4c88b256cdae264cb05d9d850e973d956
More information about the ghc-commits
mailing list