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/th | |
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/th')
-rw-r--r-- | testsuite/tests/th/T10019.stdout | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/th/T10019.stdout b/testsuite/tests/th/T10019.stdout index 85510c1af1..413d875440 100644 --- a/testsuite/tests/th/T10019.stdout +++ b/testsuite/tests/th/T10019.stdout @@ -1 +1 @@ -"Constructor from Ghci1.Option: Ghci1.Some :: forall (a_0 :: *) .\n a_0 %1 -> Ghci1.Option a_0" +"Constructor from Ghci2.Option: Ghci2.Some :: forall (a_0 :: *) .\n a_0 %1 -> Ghci2.Option a_0" |