Some compiler implementations support compiler pragmas, which are used to give additional instructions or hints to the compiler, but which do not form part of the Haskell language proper and do not change a program's semantics. This chapter summarizes this existing practice. An implementation is not required to respect any pragma, but the pragma should be ignored if an implementation is not prepared to handle it. Lexically, pragmas appear as comments, except that the enclosing syntax is {-# #-}.
decl | -> | {-# INLINE qvars #-} |
decl | -> | {-# NOINLINE qvars #-} |
The INLINE pragma instructs the compiler to inline the specified variables at their use sites. Compilers will often automatically inline simple expressions. This may be prevented by the NOINLINE pragma.
decl | -> | {-# SPECIALIZE spec1 , ... , speck #-} | (k>=1) |
spec | -> | vars :: type |