| ... |
... |
@@ -373,7 +373,7 @@ To make `wombat` into a known-occ name, you do the following: |
|
373
|
373
|
* Ensure that the module `GHC.Essentials` exports `wombat`.
|
|
374
|
374
|
|
|
375
|
375
|
* In any module in `base` or `ghc-internal` (which are compiled with
|
|
376
|
|
- -frebindable-known-names), in which `wombat` is needed, you must ensure
|
|
|
376
|
+ -frebindable-known-names), in which `wombat` is needed, ensure
|
|
377
|
377
|
that `wombat` is in scope by saying `import M( wombat )`, or
|
|
378
|
378
|
import qualified M as Rebindable( wombat )
|
|
379
|
379
|
|
| ... |
... |
@@ -390,22 +390,22 @@ To make `wombat` into a known-key name, do the following. |
|
390
|
390
|
|
|
391
|
391
|
* Ensure that the module M that defines `wombat` is compiled with `-fdefines-known-names`.
|
|
392
|
392
|
|
|
393
|
|
-* If M.hs has an `M.hs-boot` file, ensure that it too must be compiled
|
|
|
393
|
+* If M.hs has an `M.hs-boot` file, ensure that it too is compiled
|
|
394
|
394
|
with `-fdefines-known-names`.
|
|
395
|
395
|
|
|
396
|
396
|
* Ensure that the module `GHC.Essentials` exports `wombat`.
|
|
397
|
397
|
|
|
398
|
|
-* In GHC.Builtin.KnownKeys you must define a static unique
|
|
|
398
|
+* In GHC.Builtin.KnownKeys define a static unique
|
|
399
|
399
|
wombatKey :: KnownKey
|
|
400
|
400
|
wombatKey = mkPreludeMiscIdUnique 892
|
|
401
|
401
|
with an unused unique, here 892.
|
|
402
|
402
|
|
|
403
|
|
-* The big list `GHC.Builtin.KnownKeys.knownKeyTable` must contain an
|
|
404
|
|
- entry for `wombat`
|
|
|
403
|
+* Add an entry
|
|
405
|
404
|
(mkVarOcc "wombat", wombatKey)
|
|
|
405
|
+ to the big list `GHC.Builtin.KnownKeys.knownKeyTable`
|
|
406
|
406
|
|
|
407
|
|
-* Just like known-occ names, above in any module in `base` or `ghc-internal` (which
|
|
408
|
|
- are compiled with -frebindable-known-names), you must ensure that `wombat` is
|
|
|
407
|
+* Just like for known-occ names above, in any module in `base` or `ghc-internal` (which
|
|
|
408
|
+ are compiled with -frebindable-known-names), ensure that `wombat` is
|
|
409
|
409
|
in scope by saying `import M( wombat )`.
|
|
410
|
410
|
-}
|
|
411
|
411
|
|