summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/ConLike.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-11-08 19:11:58 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2021-11-08 19:14:13 -0500
commitd7865c4e9fa139d5ba7a40211c1de3e30db0c2f5 (patch)
tree266ffaf0c32c95c5c7f3f5294284defcba228bbe /compiler/GHC/Core/ConLike.hs
parentf8a98fd004769a0a0b700c34aee9df126797aa4b (diff)
downloadhaskell-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/Core/ConLike.hs')
-rw-r--r--compiler/GHC/Core/ConLike.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/GHC/Core/ConLike.hs b/compiler/GHC/Core/ConLike.hs
index b375b742f0..60f76fb302 100644
--- a/compiler/GHC/Core/ConLike.hs
+++ b/compiler/GHC/Core/ConLike.hs
@@ -146,6 +146,7 @@ conLikeName (PatSynCon pat_syn) = patSynName pat_syn
--
-- > data Eq a => T a = ...
-- It is empty for `PatSynCon` as they do not allow such contexts.
+-- See @Note [The stupid context]@ in "GHC.Core.DataCon".
conLikeStupidTheta :: ConLike -> ThetaType
conLikeStupidTheta (RealDataCon data_con) = dataConStupidTheta data_con
conLikeStupidTheta (PatSynCon {}) = []