summaryrefslogtreecommitdiff
path: root/testsuite/tests/package
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-04-23 19:48:03 -0400
committerZubin Duggal <zubin.duggal@gmail.com>2021-06-08 01:07:10 +0530
commit7ea3b7eb37ac87917ab490c835e8405646891be3 (patch)
treeb2720484d7da45cb97ee3efe6a0bcfec412be0d0 /testsuite/tests/package
parent9e724f6e5bcb31abd270ea44fb01b1edb18f626f (diff)
downloadhaskell-7ea3b7eb37ac87917ab490c835e8405646891be3.tar.gz
Introduce `hsExprType :: HsExpr GhcTc -> Type` in the new modulewip/hsExprType
`GHC.Hs.Syn.Type` The existing `hsPatType`, `hsLPatType` and `hsLitType` functions have also been moved to this module This is a less ambitious take on the same problem that !2182 and !3866 attempt to solve. Rather than have the `hsExprType` function attempt to efficiently compute the `Type` of every subexpression in an `HsExpr`, this simply computes the overall `Type` of a single `HsExpr`. - Explicitly forbids the `SplicePat` `HsIPVar`, `HsBracket`, `HsRnBracketOut` and `HsTcBracketOut` constructors during the typechecking phase by using `Void` as the TTG extension field - Also introduces `dataConCantHappen` as a domain specific alternative to `absurd` to handle cases where the TTG extension points forbid a constructor. - Turns HIE file generation into a pure function that doesn't need access to the `DsM` monad to compute types, but uses `hsExprType` instead. - Computes a few more types during HIE file generation - Makes GHCi's `:set +c` command also use `hsExprType` instead of going through the desugarer to compute types. Updates haddock submodule Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Diffstat (limited to 'testsuite/tests/package')
-rw-r--r--testsuite/tests/package/package07e.stderr11
-rw-r--r--testsuite/tests/package/package08e.stderr11
2 files changed, 12 insertions, 10 deletions
diff --git a/testsuite/tests/package/package07e.stderr b/testsuite/tests/package/package07e.stderr
index 646ba5a4ed..e5efa7e910 100644
--- a/testsuite/tests/package/package07e.stderr
+++ b/testsuite/tests/package/package07e.stderr
@@ -2,27 +2,28 @@
package07e.hs:2:1: error:
Could not find module ‘GHC.Hs.MyTypes’
Perhaps you meant
- GHC.Hs.Type (needs flag -package-id ghc-8.11.0.20200401)
- GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
+ GHC.Hs.Type (needs flag -package-id ghc-9.3)
+ GHC.Hs.Syn.Type (needs flag -package-id ghc-9.3)
+ GHC.Tc.Types (needs flag -package-id ghc-9.3)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package07e.hs:3:1: error:
Could not load module ‘GHC.Hs.Type’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package07e.hs:4:1: error:
Could not load module ‘GHC.Hs.Utils’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package07e.hs:5:1: error:
Could not load module ‘GHC.Types.Unique.FM’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
diff --git a/testsuite/tests/package/package08e.stderr b/testsuite/tests/package/package08e.stderr
index 8493fe77a6..0f84655e60 100644
--- a/testsuite/tests/package/package08e.stderr
+++ b/testsuite/tests/package/package08e.stderr
@@ -2,27 +2,28 @@
package08e.hs:2:1: error:
Could not find module ‘GHC.Hs.MyTypes’
Perhaps you meant
- GHC.Hs.Type (needs flag -package-id ghc-8.11.0.20200401)
- GHC.Tc.Types (needs flag -package-id ghc-8.11.0.20200401)
+ GHC.Hs.Type (needs flag -package-id ghc-9.3)
+ GHC.Hs.Syn.Type (needs flag -package-id ghc-9.3)
+ GHC.Tc.Types (needs flag -package-id ghc-9.3)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package08e.hs:3:1: error:
Could not load module ‘GHC.Hs.Type’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package08e.hs:4:1: error:
Could not load module ‘GHC.Hs.Utils’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
package08e.hs:5:1: error:
Could not load module ‘GHC.Types.Unique.FM’
- It is a member of the hidden package ‘ghc-8.11.0.20200401’.
+ It is a member of the hidden package ‘ghc-9.3’.
You can run ‘:set -package ghc’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.