On Fri, Sep 9, 2011 at 23:41, Vasili I. Galchin <[email protected]> wrote:
>    Is there a list of compiler pragmas? Specifically I am looking at how to
> specify more than one type variable in a class definition. Also I have
> forgotten the "meta syntax" for specifying a pragma ... some kind of Haskell
> comment?

If you're using GHC, there is a list of language extensions in the
user's guide chapter 7 [1]. Specifically, 7.13 specifies the language
pragma's. To turn on a language extension, you use the LANGUAGE pragma
with the specific extension(s) you want. In this case, you want
MultiParamTypeClasses, section 7.6.1.1. So the exact syntax will be:

{-# LANGUAGE MultiParamTypeClasses #-}

Put this at the top of your source file.

Note that the link is to the documentation for the latest version of
GHC (7.2.1 as of this writing). There are also links to specific
version, that might be more appropriate depending on the version of
GHC you have.

Erik

[1] 
http://haskell.org/ghc/docs/latest/html/users_guide/ghc-language-features.html

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to