... | ... | @@ -191,7 +191,7 @@ An overview Note should |
|
|
This overlaps with the previous bullet a bit; again we would typically point
|
|
|
to the specific code that deals with the non-obvious corner.
|
|
|
|
|
|
It is often helpful to give a name to each wrinkle, such as (W7); then you can say (elsewhere) `-- See wrinkle (W7) of Note [Wombat]`. Precision is so helpufl!
|
|
|
It is often helpful to give a name to each wrinkle, such as (W7); then you can say (elsewhere) `-- See wrinkle (W7) of Note [Wombat]`. Precision is so helpful!
|
|
|
|
|
|
A good example of an overview Note is `Note [Implementing unsafeCoerce]` in the library `base:Unsafe.Coerce`.
|
|
|
Another is `Note [Quasi-quote overview]` in `Language.Haskell.Syntax.Expr`.
|
... | ... | @@ -387,3 +387,14 @@ The following CPP symbols are used throughout the compiler: |
|
|
### Platform tests
|
|
|
|
|
|
Please refer to [Platforms and Conventions](commentary/platform-naming) wiki page for an overview of how to handle target specific code in GHC.
|
|
|
```
|
|
|
Note [Special classes]
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
GHC has built-in behaviour for certain type classes, particularly in two places:
|
|
|
* In GHC.Tc.Instance.Class.matchGlobalInst, we have built-in behaviour for solving these special classes.
|
|
|
* In GHC.Tc.Validity.check_special_inst_head, we check for user-written instances of these classes.
|
|
|
|
|
|
We enumerate these classes with the data type SpecialClass,
|
|
|
to help ensure we cover all cases if we later all another.
|
|
|
See #20441.
|
|
|
``` |
|
|
\ No newline at end of file |