summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-06 17:31:18 -0500
committerBen Gamari <ben@smart-cactus.org>2020-02-06 17:34:23 -0500
commitb68099f86950555dac4235d0ecdf39bec2a11e5d (patch)
treeff95e42494956339cc1056e79b1c7ae941778c2e
parente8004e5d1e993363a89b0107380604c5bc02be6b (diff)
downloadhaskell-wip/drop-old-comment.tar.gz
base: Drop out-of-date commentwip/drop-old-comment
The comment in GHC.Base claimed that ($) couldn't be used in that module as it was wired-in. However, this is no longer true; ($) is merely known key and is defined in Haskell (with a RuntimeRep-polymorphic type) in GHC.Base. The one piece of magic that ($) retains is that it a special typing rule to allow type inference with higher-rank types (e.g. `runST $ blah`; see Note [Typing rule for ($)] in TcExpr).
-rw-r--r--libraries/base/GHC/Base.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 9e9e3d080b..8fbd090ad6 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -1,17 +1,5 @@
{-
-NOTA BENE: Do NOT use ($) anywhere in this module! The type of ($) is
-slightly magical (it can return unlifted types), and it is wired in.
-But, it is also *defined* in this module, with a non-magical type.
-GHC gets terribly confused (and *hangs*) if you try to use ($) in this
-module, because it has different types in different scenarios.
-
-This is not a problem in general, because the type ($), being wired in, is not
-written out to the interface file, so importing files don't get confused.
-The problem is only if ($) is used here. So don't!
-
----------------------------------------------
-
The overall structure of the GHC Prelude is a bit tricky.
a) We want to avoid "orphan modules", i.e. ones with instance