As of Haskell for Mac version 1.0.3, Haskell compiler options can only be specified on a module by module basis. To specify a compiler option at the top of the module, we use a compiler pragma of the form
{-# OPTIONS_GHC <compiler-option> #-}
where <compiler-option>
can for example be -fwarn-incomplete-patterns
. The following is an example of using that option.
Any compiler options specified for a Haskell module do also apply in the playground associated with he module. The same syntax for specifying options can also be used in playgrounds to specify compiler options for a specific playground without using them for the Haskell module associated with the playground.
Multiple options, separated by a space character, may be specified in a single pragma. Have a look at the list of all warnings and similar compiler options.
0 Comments