diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-02-06 17:31:18 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-08 10:28:03 -0500 |
commit | b3857b62cb74ef50cbe88ab898aae946ca933365 (patch) | |
tree | 106233f740bc29990f76cdad65ed9e2aaddcf1d1 /libraries | |
parent | b6dc319a2d83a8a8c426d0ad6f46d0b8fad41253 (diff) | |
download | haskell-b3857b62cb74ef50cbe88ab898aae946ca933365.tar.gz |
base: Drop out-of-date 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).
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/GHC/Base.hs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index fc0424a6a4..9e64cf50d1 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 |