The users' guide should document that INLINE pragmas can appear on methods and definitions in where-clauses
Summary
Location of documentation issue: the GHC user's guide
Currently the guide says that INLINE
pragmas (and INLINEABLE
etc.) can appear at the "top-level", but this isn't the whole truth. These pragmas can also appear on class methods, instance methods and definitions in where
-clauses and potentially other places that I'm not aware of.
Proposed improvements or changes
In particular, the guide should answer the following questions:
- On what kind of definitions can these pragmas be applied?
- Which instance methods do pragmas on class methods affect? (Presumably all of them: derived instances, manually defined instances etc.)
- Can pragmas on class methods be overridden by differing pragmas on instances?