diff options
author | Morrow <themorrowm@gmail.com> | 2021-10-04 02:30:47 +0300 |
---|---|---|
committer | Zubin <zubin.duggal@gmail.com> | 2021-11-17 11:14:37 +0000 |
commit | 7850142c09090a2eef1e1b0281acd641e843356a (patch) | |
tree | 962450cf647b18af467fe890bb212cf2ce759d59 /testsuite/tests/ghci/scripts/T10663.stdout | |
parent | 16d86b97ee3056b54441e7dfd349477f32347a26 (diff) | |
download | haskell-7850142c09090a2eef1e1b0281acd641e843356a.tar.gz |
Improve handling of import statements in GHCi (#20473)
Currently in GHCi, when given a line of user input we:
1. Attempt to parse and handle it as a statement
2. Otherwise, attempt to parse and handle a single import
3. Otherwise, check if there are imports present (and if so display an error message)
4. Otherwise, attempt to parse a module and only handle the declarations
This patch simplifies the process to:
Attempt to parse and handle it as a statement
Otherwise, attempt to parse a module and handle the imports and declarations
This means that multiple imports in a multiline are now accepted, and a multiline containing both imports and declarations is now accepted (as well as when separated by semicolons).
Diffstat (limited to 'testsuite/tests/ghci/scripts/T10663.stdout')
-rw-r--r-- | testsuite/tests/ghci/scripts/T10663.stdout | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T10663.stdout b/testsuite/tests/ghci/scripts/T10663.stdout new file mode 100644 index 0000000000..3169929f69 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T10663.stdout @@ -0,0 +1 @@ +[1,2]
\ No newline at end of file |