Commit b3857b62 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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).
parent b6dc319a
Pipeline #15566 passed with stages
in 551 minutes and 24 seconds
{-
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment