diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-11-08 19:11:58 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-11-08 19:14:13 -0500 |
commit | d7865c4e9fa139d5ba7a40211c1de3e30db0c2f5 (patch) | |
tree | 266ffaf0c32c95c5c7f3f5294284defcba228bbe /compiler/GHC/Tc/Gen/Pat.hs | |
parent | f8a98fd004769a0a0b700c34aee9df126797aa4b (diff) | |
download | haskell-wip/T20501.tar.gz |
Flesh out Note [The stupid context] and reference itwip/T20501
`Note [The stupid context]` in `GHC.Core.DataCon` talks about stupid contexts
from `DatatypeContexts`, but prior to this commit, it was rather outdated.
This commit spruces it up and references it from places where it is relevant.
Diffstat (limited to 'compiler/GHC/Tc/Gen/Pat.hs')
-rw-r--r-- | compiler/GHC/Tc/Gen/Pat.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs index a09d77b6f7..a235c43236 100644 --- a/compiler/GHC/Tc/Gen/Pat.hs +++ b/compiler/GHC/Tc/Gen/Pat.hs @@ -1311,7 +1311,8 @@ tcConArg penv (arg_pat, Scaled arg_mult arg_ty) addDataConStupidTheta :: DataCon -> [TcType] -> TcM () -- Instantiate the "stupid theta" of the data con, and throw --- the constraints into the constraint set +-- the constraints into the constraint set. +-- See Note [The stupid context] in GHC.Core.DataCon. addDataConStupidTheta data_con inst_tys | null stupid_theta = return () | otherwise = instStupidTheta origin inst_theta |