tags:

views:

347

answers:

5

I wanted to use {-# LANGUAGE OverloadedStrings #-} but I forgot how it's called. This kind of thing isn't hoogle-able, and also it takes some time finding using google*.

Is there somewhere a list of GHC extensions named as they are in the LANGUAGE pragma?

* My googling search journey:

+9  A: 

The "Language options" section of the flag reference page has a list that's much more easily browseable than the language features page.

Once you're there a Ctrl-F search for "overloaded" takes you right to what you want.

Travis Brown
Yep, and the ghc man page is also good. Always makes me feel sorry for people on manless platforms.
TomMD
+8  A: 

ghci's tab-completion knows. Type :set -X at a ghci prompt, then hit Tab, and you'll get a full list. Or :set -XFoo then Tab will get you a list of all extensions beginning with Foo.

Ganesh Sittampalam
Your answer is extra-useful because it also introduced me to `:set -X`!
yairchu
+3  A: 

ghc-mod for Emacs found here: http://hackage.haskell.org/package/ghc-mod-0.4.1, includes completion for language extensions. If you are an Emacs user, I suggest you to try it.

Tener
+2  A: 
$ ghc --supported-languages

(from GHC docs)

yairchu
+2  A: 

When using Leksah IDE, selecting Package menu, then Edit Package menu item, then Extension tab also gives you a checkable list.

DonnyD