|Version 4 (modified by john@…, 8 years ago) (diff)|
Possible New Pragmas
While implementations are never under any obligation to follow pragmas, it is good to have standardized meanings for common pragmas so that when implementations do use them they can do so in a way that is compatable with others.
- LINE - hopefully with optional character position as well as line number so that intraline error reporting can work properly.
- SRCLOC_ANNOTATE - generalized Assertions? which can be used to annotate any function with its use site.
- DEPRECATED - mark modules, classes, types and functions that have been deprecated
- LANGUAGE - a pragma for specifying language options with a common compiler-independent namespace.
- ENCODING - see UnicodeInHaskellSource
- INCLUDE - see ForeignFunctionInterface
- REGION - hints to editors and code analysis tools to allow code folding
- COSTCENTER - places to attach profiling information
- UNUSED - declare that certain values may be unused so the compiler won't warn about them
- UNPACK - control the unboxing of strict values
GHC supports DEPRECATED, LANGUAGE and INCLUDE. Cabal uses LANGUAGE and INCLUDE.