Haskell mode add, Haskell syntex checker & One-stop Command line by F9
diff --git a/_darcs/format b/_darcs/format
new file mode 100644
index 0000000..58f777b
--- /dev/null
+++ b/_darcs/format
@@ -0,0 +1,2 @@
+hashed
+darcs-2
diff --git a/_darcs/hashed_inventory b/_darcs/hashed_inventory
new file mode 100644
index 0000000..6fcd3b6
--- /dev/null
+++ b/_darcs/hashed_inventory
@@ -0,0 +1,86 @@
+pristine:0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679
+[start using darcs haskellmode-20090430
+claus.reinke@talk21.com**20100616154750
+ Ignore-this: bfd799dc7229bdeb59a2630704b7bc5f
+] 
+hash: 0000100350-7b2cc547e289958f2a397d8aaee669cf84bd239c2542d6e6b5e4794cc3e4e544
+[minor path changes for ghc-6.12.*
+claus.reinke@talk21.com**20100617142206
+ Ignore-this: d392f2c84490e69737bf3983072e7cf2
+] 
+hash: 0000001035-7e3c58b51f3f2485c3d8aae26d5258dc0cffdd4422ee24b5b5e4516aa94d15fc
+[use full GHCi command names (#13)
+claus.reinke@talk21.com**20100617151606
+ Ignore-this: 815d082dbb9798ef74e331716bdd2fe3
+] 
+hash: 0000000376-b841521e0047dcf1936de4c6a1c0d044dd4f4062d7a18191d21823075deff0e9
+[sort OPTIONS_GHC and LANGUAGE pragma menues, use script-ocal variables (#16)
+claus.reinke@talk21.com**20100617151723
+ Ignore-this: 4e4fec8c3d7b81d8819f1796c91dec45
+] 
+hash: 0000001467-80edfa76ce53edb08d9e806dfc9919bf32338bcaa7b1b6b19a18078d8becf15f
+[don't query GHCi in GHC_TypeBallon() (#14)
+claus.reinke@talk21.com**20100618154419
+ Ignore-this: 8d233798ebf47cf6df0d103c4ec6dac
+] 
+hash: 0000001624-323c41c14de51220753089ad7648614e00e6252a96765ef9a53aba4cbdca781f
+[start caching GHC configuration info (#8); move GHC version code to autoload
+claus.reinke@talk21.com**20100622085654
+ Ignore-this: 2d9614d9435a067fb86ee5212d631395
+] 
+hash: 0000006138-8010cad0d600cfe6de4c205cc941cb628295656c5559c63bca348968dfe3c29b
+[allow for import {-# SOURCE #-} in haskellmode#GatherImports
+claus.reinke@talk21.com**20100622160107
+ Ignore-this: b68995160a3698fd07c0c7a635d24b63
+] 
+hash: 0000000322-81c82541355811ab8afbdbece128fbad2aa4309e258a8e803c6390abef6f4fba
+[comments, last-modified dates
+claus.reinke@talk21.com**20100622182506
+ Ignore-this: 5568a452ea1b3a0d052c393fbb948045
+] 
+hash: 0000000612-0f6cfc2e58fd2880a5b794d390e24a2decf4158190f26fa9629bc53d7f94772c
+[be more helpful if type is not known
+claus.reinke@talk21.com**20100910162020
+ Ignore-this: 82139355aec49f65c946f776c02c72b6
+] 
+hash: 0000000901-d4e81ffc04a84811c2078d3102c66bbba227151168979b8a252b9107efbda911
+[change note
+claus.reinke@talk21.com**20100910162234
+ Ignore-this: 34278995444aca17eba9dfda14a11a08
+] 
+hash: 0000000208-73e9dd1f3ff2145cbe3807c739f5af031869ed02b21e965c92fae88d38490f9d
+[autoload/haskellmode.vim: fix fileformat to unix
+claus.reinke@talk21.com**20101117173809
+ Ignore-this: 3ce18f7ef4b0d412a7c31a7c0d90f902
+] 
+hash: 0000013909-eb16ffbb5042cc69df87a8f1bb989d4a99fa68a6490cc95ece064e5afd189bc7
+[adapt to new Haddock HTML-index file format
+claus.reinke@talk21.com**20101117174205
+ Ignore-this: 7ac996b7cbf515aa302402fe58d78194
+] 
+hash: 0000002930-728285d1f321f19da418cefe516bf533bb4a1b04e2a98985ce8b212a5b4e7eb6
+[allow for package info in haddock index modules
+claus.reinke@talk21.com**20101211004835
+ Ignore-this: e91bf7b63d9a2b25a4ecc628765d2dff
+] 
+hash: 0000001315-35463d9601c6f7bfbe56f8dff02e03fab61302a0b300c612257da6b46c9dc2cc
+[improve location of generated import statements
+claus.reinke@talk21.com**20101211005337
+ Ignore-this: bf4e5790fcf0b70a3b245a3b81813eae
+] 
+hash: 0000002689-dcf645155ff85da42667ae07bc2d6b0331b195cb778cd6b3e1dac50d0edcf727
+[package info in haddock index is optional
+claus.reinke@talk21.com**20101211010916
+ Ignore-this: 965c09244930632240f4a2d252724821
+] 
+hash: 0000001319-f85a10fd0487048a9de67a1871d5dc9b2315cdf2143ec8cd7d86f9ba992335a7
+[FIX #24: limit QuickFixCmdPost to compiler ghc
+claus.reinke@talk21.com**20110122135757
+ Ignore-this: 9d9b66b836ec40fdb558906bef252bd9
+] 
+hash: 0000000397-02b2ddb5e31f2258d3368f8cf64588f4bbdfa4d2c2a2c9c245f39224c8ce39d9
+[update dates/changes for previous fix
+claus.reinke@talk21.com**20110122141730
+ Ignore-this: c89ec98d146efde874a45a35d3f8e6a7
+] 
+hash: 0000000319-8ee1912346b5df5b0f3fad96cdf46ff24995cf9dd50085c3c72e95893c5ff84f
diff --git a/_darcs/patches/0000000208-73e9dd1f3ff2145cbe3807c739f5af031869ed02b21e965c92fae88d38490f9d b/_darcs/patches/0000000208-73e9dd1f3ff2145cbe3807c739f5af031869ed02b21e965c92fae88d38490f9d
new file mode 100644
index 0000000..cd533ca
--- /dev/null
+++ b/_darcs/patches/0000000208-73e9dd1f3ff2145cbe3807c739f5af031869ed02b21e965c92fae88d38490f9d
Binary files differ
diff --git a/_darcs/patches/0000000319-8ee1912346b5df5b0f3fad96cdf46ff24995cf9dd50085c3c72e95893c5ff84f b/_darcs/patches/0000000319-8ee1912346b5df5b0f3fad96cdf46ff24995cf9dd50085c3c72e95893c5ff84f
new file mode 100644
index 0000000..942d15a
--- /dev/null
+++ b/_darcs/patches/0000000319-8ee1912346b5df5b0f3fad96cdf46ff24995cf9dd50085c3c72e95893c5ff84f
Binary files differ
diff --git a/_darcs/patches/0000000322-81c82541355811ab8afbdbece128fbad2aa4309e258a8e803c6390abef6f4fba b/_darcs/patches/0000000322-81c82541355811ab8afbdbece128fbad2aa4309e258a8e803c6390abef6f4fba
new file mode 100644
index 0000000..37645c7
--- /dev/null
+++ b/_darcs/patches/0000000322-81c82541355811ab8afbdbece128fbad2aa4309e258a8e803c6390abef6f4fba
Binary files differ
diff --git a/_darcs/patches/0000000376-b841521e0047dcf1936de4c6a1c0d044dd4f4062d7a18191d21823075deff0e9 b/_darcs/patches/0000000376-b841521e0047dcf1936de4c6a1c0d044dd4f4062d7a18191d21823075deff0e9
new file mode 100644
index 0000000..2b2c398
--- /dev/null
+++ b/_darcs/patches/0000000376-b841521e0047dcf1936de4c6a1c0d044dd4f4062d7a18191d21823075deff0e9
Binary files differ
diff --git a/_darcs/patches/0000000397-02b2ddb5e31f2258d3368f8cf64588f4bbdfa4d2c2a2c9c245f39224c8ce39d9 b/_darcs/patches/0000000397-02b2ddb5e31f2258d3368f8cf64588f4bbdfa4d2c2a2c9c245f39224c8ce39d9
new file mode 100644
index 0000000..dcbedbd
--- /dev/null
+++ b/_darcs/patches/0000000397-02b2ddb5e31f2258d3368f8cf64588f4bbdfa4d2c2a2c9c245f39224c8ce39d9
Binary files differ
diff --git a/_darcs/patches/0000000612-0f6cfc2e58fd2880a5b794d390e24a2decf4158190f26fa9629bc53d7f94772c b/_darcs/patches/0000000612-0f6cfc2e58fd2880a5b794d390e24a2decf4158190f26fa9629bc53d7f94772c
new file mode 100644
index 0000000..f799a0d
--- /dev/null
+++ b/_darcs/patches/0000000612-0f6cfc2e58fd2880a5b794d390e24a2decf4158190f26fa9629bc53d7f94772c
Binary files differ
diff --git a/_darcs/patches/0000000901-d4e81ffc04a84811c2078d3102c66bbba227151168979b8a252b9107efbda911 b/_darcs/patches/0000000901-d4e81ffc04a84811c2078d3102c66bbba227151168979b8a252b9107efbda911
new file mode 100644
index 0000000..b32fc78
--- /dev/null
+++ b/_darcs/patches/0000000901-d4e81ffc04a84811c2078d3102c66bbba227151168979b8a252b9107efbda911
Binary files differ
diff --git a/_darcs/patches/0000001035-7e3c58b51f3f2485c3d8aae26d5258dc0cffdd4422ee24b5b5e4516aa94d15fc b/_darcs/patches/0000001035-7e3c58b51f3f2485c3d8aae26d5258dc0cffdd4422ee24b5b5e4516aa94d15fc
new file mode 100644
index 0000000..6353489
--- /dev/null
+++ b/_darcs/patches/0000001035-7e3c58b51f3f2485c3d8aae26d5258dc0cffdd4422ee24b5b5e4516aa94d15fc
Binary files differ
diff --git a/_darcs/patches/0000001315-35463d9601c6f7bfbe56f8dff02e03fab61302a0b300c612257da6b46c9dc2cc b/_darcs/patches/0000001315-35463d9601c6f7bfbe56f8dff02e03fab61302a0b300c612257da6b46c9dc2cc
new file mode 100644
index 0000000..57b8498
--- /dev/null
+++ b/_darcs/patches/0000001315-35463d9601c6f7bfbe56f8dff02e03fab61302a0b300c612257da6b46c9dc2cc
Binary files differ
diff --git a/_darcs/patches/0000001319-f85a10fd0487048a9de67a1871d5dc9b2315cdf2143ec8cd7d86f9ba992335a7 b/_darcs/patches/0000001319-f85a10fd0487048a9de67a1871d5dc9b2315cdf2143ec8cd7d86f9ba992335a7
new file mode 100644
index 0000000..c645fb6
--- /dev/null
+++ b/_darcs/patches/0000001319-f85a10fd0487048a9de67a1871d5dc9b2315cdf2143ec8cd7d86f9ba992335a7
Binary files differ
diff --git a/_darcs/patches/0000001467-80edfa76ce53edb08d9e806dfc9919bf32338bcaa7b1b6b19a18078d8becf15f b/_darcs/patches/0000001467-80edfa76ce53edb08d9e806dfc9919bf32338bcaa7b1b6b19a18078d8becf15f
new file mode 100644
index 0000000..dd9caa5
--- /dev/null
+++ b/_darcs/patches/0000001467-80edfa76ce53edb08d9e806dfc9919bf32338bcaa7b1b6b19a18078d8becf15f
Binary files differ
diff --git a/_darcs/patches/0000001624-323c41c14de51220753089ad7648614e00e6252a96765ef9a53aba4cbdca781f b/_darcs/patches/0000001624-323c41c14de51220753089ad7648614e00e6252a96765ef9a53aba4cbdca781f
new file mode 100644
index 0000000..6348948
--- /dev/null
+++ b/_darcs/patches/0000001624-323c41c14de51220753089ad7648614e00e6252a96765ef9a53aba4cbdca781f
Binary files differ
diff --git a/_darcs/patches/0000002689-dcf645155ff85da42667ae07bc2d6b0331b195cb778cd6b3e1dac50d0edcf727 b/_darcs/patches/0000002689-dcf645155ff85da42667ae07bc2d6b0331b195cb778cd6b3e1dac50d0edcf727
new file mode 100644
index 0000000..402f510
--- /dev/null
+++ b/_darcs/patches/0000002689-dcf645155ff85da42667ae07bc2d6b0331b195cb778cd6b3e1dac50d0edcf727
Binary files differ
diff --git a/_darcs/patches/0000002930-728285d1f321f19da418cefe516bf533bb4a1b04e2a98985ce8b212a5b4e7eb6 b/_darcs/patches/0000002930-728285d1f321f19da418cefe516bf533bb4a1b04e2a98985ce8b212a5b4e7eb6
new file mode 100644
index 0000000..f27ffd1
--- /dev/null
+++ b/_darcs/patches/0000002930-728285d1f321f19da418cefe516bf533bb4a1b04e2a98985ce8b212a5b4e7eb6
Binary files differ
diff --git a/_darcs/patches/0000006138-8010cad0d600cfe6de4c205cc941cb628295656c5559c63bca348968dfe3c29b b/_darcs/patches/0000006138-8010cad0d600cfe6de4c205cc941cb628295656c5559c63bca348968dfe3c29b
new file mode 100644
index 0000000..a0a6521
--- /dev/null
+++ b/_darcs/patches/0000006138-8010cad0d600cfe6de4c205cc941cb628295656c5559c63bca348968dfe3c29b
Binary files differ
diff --git a/_darcs/patches/0000013909-eb16ffbb5042cc69df87a8f1bb989d4a99fa68a6490cc95ece064e5afd189bc7 b/_darcs/patches/0000013909-eb16ffbb5042cc69df87a8f1bb989d4a99fa68a6490cc95ece064e5afd189bc7
new file mode 100644
index 0000000..c1436bd
--- /dev/null
+++ b/_darcs/patches/0000013909-eb16ffbb5042cc69df87a8f1bb989d4a99fa68a6490cc95ece064e5afd189bc7
Binary files differ
diff --git a/_darcs/patches/0000100350-7b2cc547e289958f2a397d8aaee669cf84bd239c2542d6e6b5e4794cc3e4e544 b/_darcs/patches/0000100350-7b2cc547e289958f2a397d8aaee669cf84bd239c2542d6e6b5e4794cc3e4e544
new file mode 100644
index 0000000..42ba024
--- /dev/null
+++ b/_darcs/patches/0000100350-7b2cc547e289958f2a397d8aaee669cf84bd239c2542d6e6b5e4794cc3e4e544
Binary files differ
diff --git a/_darcs/patches/pending.tentative b/_darcs/patches/pending.tentative
new file mode 100644
index 0000000..2c63c08
--- /dev/null
+++ b/_darcs/patches/pending.tentative
@@ -0,0 +1,2 @@
+{
+}
diff --git a/_darcs/prefs/binaries b/_darcs/prefs/binaries
new file mode 100644
index 0000000..ac20648
--- /dev/null
+++ b/_darcs/prefs/binaries
@@ -0,0 +1,30 @@
+# This file contains a list of extended regular expressions, one per
+# line.  A file path matching any of these expressions is assumed to
+# contain binary data (not text).  The entries in ~/.darcs/binaries (if
+# it exists) supplement those in this file.
+# 
+# Blank lines, and lines beginning with an octothorpe (#) are ignored.
+# See regex(7) for a description of extended regular expressions.
+\.(a|A)$
+\.(bmp|BMP)$
+\.(bz2|BZ2)$
+\.(doc|DOC)$
+\.(elc|ELC)$
+\.(exe|EXE)$
+\.(gif|GIF)$
+\.(gz|GZ)$
+\.(iso|ISO)$
+\.(jar|JAR)$
+\.(jpe?g|JPE?G)$
+\.(mng|MNG)$
+\.(mpe?g|MPE?G)$
+\.(p[nbgp]m|P[NBGP]M)$
+\.(pdf|PDF)$
+\.(png|PNG)$
+\.(pyc|PYC)$
+\.(so|SO)$
+\.(tar|TAR)$
+\.(tgz|TGZ)$
+\.(tiff?|TIFF?)$
+\.(z|Z)$
+\.(zip|ZIP)$
diff --git a/_darcs/prefs/boring b/_darcs/prefs/boring
new file mode 100644
index 0000000..c8dfaf5
--- /dev/null
+++ b/_darcs/prefs/boring
@@ -0,0 +1,120 @@
+# This file contains a list of extended regular expressions, one per
+# line. A file path matching any of these expressions will be filtered
+# out during `darcs add', or when the `--look-for-adds' flag is passed
+# to `darcs whatsnew' and `record'.  The entries in ~/.darcs/boring (if
+# it exists) supplement those in this file.
+# 
+# Blank lines, and lines beginning with an octothorpe (#) are ignored.
+# See regex(7) for a description of extended regular expressions.
+
+### compiler and interpreter intermediate files
+# haskell (ghc) interfaces
+\.hi$
+\.hi-boot$
+\.o-boot$
+# object files
+\.o$
+\.o\.cmd$
+# profiling haskell
+\.p_hi$
+\.p_o$
+# haskell program coverage resp. profiling info
+\.tix$
+\.prof$
+# fortran module files
+\.mod$
+# linux kernel
+\.ko\.cmd$
+\.mod\.c$
+(^|/)\.tmp_versions($|/)
+# *.ko files aren't boring by default because they might
+# be Korean translations rather than kernel modules
+# \.ko$
+# python, emacs, java byte code
+\.py[co]$
+\.elc$
+\.class$
+# objects and libraries; lo and la are libtool things
+\.(obj|a|exe|so|lo|la)$
+# compiled zsh configuration files
+\.zwc$
+# Common LISP output files for CLISP and CMUCL
+\.(fas|fasl|sparcf|x86f)$
+
+### build and packaging systems
+# cabal intermediates
+\.installed-pkg-config
+\.setup-config
+# standard cabal build dir, might not be boring for everybody
+# ^dist(/|$)
+# autotools
+(^|/)autom4te\.cache($|/)
+(^|/)config\.(log|status)$
+# microsoft web expression, visual studio metadata directories
+\_vti_cnf$
+\_vti_pvt$
+# gentoo tools
+\.revdep-rebuild.*
+# generated dependencies
+^\.depend$
+
+### version control systems
+# cvs
+(^|/)CVS($|/)
+\.cvsignore$
+# cvs, emacs locks
+^\.#
+# rcs
+(^|/)RCS($|/)
+,v$
+# subversion
+(^|/)\.svn($|/)
+# mercurial
+(^|/)\.hg($|/)
+# git
+(^|/)\.git($|/)
+# bzr
+\.bzr$
+# sccs
+(^|/)SCCS($|/)
+# darcs
+(^|/)_darcs($|/)
+(^|/)\.darcsrepo($|/)
+^\.darcs-temp-mail$
+-darcs-backup[[:digit:]]+$
+# gnu arch
+(^|/)(\+|,)
+(^|/)vssver\.scc$
+\.swp$
+(^|/)MT($|/)
+(^|/)\{arch\}($|/)
+(^|/).arch-ids($|/)
+# bitkeeper
+(^|/)BitKeeper($|/)
+(^|/)ChangeSet($|/)
+
+### miscellaneous
+# backup files
+~$
+\.bak$
+\.BAK$
+# patch originals and rejects
+\.orig$
+\.rej$
+# X server
+\..serverauth.*
+# image spam
+\#
+(^|/)Thumbs\.db$
+# vi, emacs tags
+(^|/)(tags|TAGS)$
+#(^|/)\.[^/]
+# core dumps
+(^|/|\.)core$
+# partial broken files (KIO copy operations)
+\.part$
+# waf files, see http://code.google.com/p/waf/
+(^|/)\.waf-[[:digit:].]+-[[:digit:]]+($|/)
+(^|/)\.lock-wscript$
+# mac os finder
+(^|/)\.DS_Store$
diff --git a/_darcs/prefs/defaultrepo b/_darcs/prefs/defaultrepo
new file mode 100644
index 0000000..fe724f4
--- /dev/null
+++ b/_darcs/prefs/defaultrepo
@@ -0,0 +1 @@
+http://code.haskell.org/haskellmode-vim
diff --git a/_darcs/prefs/motd b/_darcs/prefs/motd
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/_darcs/prefs/motd
diff --git a/_darcs/prefs/repos b/_darcs/prefs/repos
new file mode 100644
index 0000000..e111673
--- /dev/null
+++ b/_darcs/prefs/repos
@@ -0,0 +1,2 @@
+http://code.haskell.org/haskellmode-vim/
+http://code.haskell.org/haskellmode-vim
diff --git a/_darcs/prefs/sources b/_darcs/prefs/sources
new file mode 100644
index 0000000..2bb3d6f
--- /dev/null
+++ b/_darcs/prefs/sources
@@ -0,0 +1 @@
+repo:http://code.haskell.org/haskellmode-vim
diff --git a/_darcs/pristine.hashed/0000000090-63b844cb9e454cc6326451e22b5ccbabf201f28a6724447bd96fd4f8b81314ad b/_darcs/pristine.hashed/0000000090-63b844cb9e454cc6326451e22b5ccbabf201f28a6724447bd96fd4f8b81314ad
new file mode 100644
index 0000000..6d1fcf1
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000090-63b844cb9e454cc6326451e22b5ccbabf201f28a6724447bd96fd4f8b81314ad
Binary files differ
diff --git a/_darcs/pristine.hashed/0000000098-9b9a183787008215ff5c16951db63859df9ea60b5188767b7e76a4ca13a83785 b/_darcs/pristine.hashed/0000000098-9b9a183787008215ff5c16951db63859df9ea60b5188767b7e76a4ca13a83785
new file mode 100644
index 0000000..3a85e48
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000098-9b9a183787008215ff5c16951db63859df9ea60b5188767b7e76a4ca13a83785
Binary files differ
diff --git a/_darcs/pristine.hashed/0000000098-ef7eb7572eda91471d366a21b951cb6eb667f771a24f4befc15589962b188830 b/_darcs/pristine.hashed/0000000098-ef7eb7572eda91471d366a21b951cb6eb667f771a24f4befc15589962b188830
new file mode 100644
index 0000000..bb10c30
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000098-ef7eb7572eda91471d366a21b951cb6eb667f771a24f4befc15589962b188830
Binary files differ
diff --git a/_darcs/pristine.hashed/0000000293-3d88b58b5d21bb1a73c50bdd423e02c0e359b44d7ffacd4d4c28abb4efeb9f13 b/_darcs/pristine.hashed/0000000293-3d88b58b5d21bb1a73c50bdd423e02c0e359b44d7ffacd4d4c28abb4efeb9f13
new file mode 100644
index 0000000..629ab77
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000293-3d88b58b5d21bb1a73c50bdd423e02c0e359b44d7ffacd4d4c28abb4efeb9f13
Binary files differ
diff --git a/_darcs/pristine.hashed/0000000460-0e169112f3a63bf2c7f39f623dca77bd726d9c352f587ac990afabfe034ba29e b/_darcs/pristine.hashed/0000000460-0e169112f3a63bf2c7f39f623dca77bd726d9c352f587ac990afabfe034ba29e
new file mode 100644
index 0000000..b5b36a2
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000460-0e169112f3a63bf2c7f39f623dca77bd726d9c352f587ac990afabfe034ba29e
Binary files differ
diff --git a/_darcs/pristine.hashed/0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679 b/_darcs/pristine.hashed/0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679
new file mode 100644
index 0000000..5723ad4
--- /dev/null
+++ b/_darcs/pristine.hashed/0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679
Binary files differ
diff --git a/_darcs/pristine.hashed/0000002756-c0e50ddccc30b6ef24e14e4a43e72dc8b4967887fdad8ead75802fcdccfe500d b/_darcs/pristine.hashed/0000002756-c0e50ddccc30b6ef24e14e4a43e72dc8b4967887fdad8ead75802fcdccfe500d
new file mode 100644
index 0000000..70b693f
--- /dev/null
+++ b/_darcs/pristine.hashed/0000002756-c0e50ddccc30b6ef24e14e4a43e72dc8b4967887fdad8ead75802fcdccfe500d
Binary files differ
diff --git a/_darcs/pristine.hashed/0000006582-e8dcd836cef4612747a56df5ff1eb13bfac087332ef331237b2660d6c67e39a7 b/_darcs/pristine.hashed/0000006582-e8dcd836cef4612747a56df5ff1eb13bfac087332ef331237b2660d6c67e39a7
new file mode 100644
index 0000000..8465ab8
--- /dev/null
+++ b/_darcs/pristine.hashed/0000006582-e8dcd836cef4612747a56df5ff1eb13bfac087332ef331237b2660d6c67e39a7
Binary files differ
diff --git a/_darcs/pristine.hashed/0000017267-4cb7413455d785cf655c0ba53f6ad9961d5aa21206634397528017624d1f05ec b/_darcs/pristine.hashed/0000017267-4cb7413455d785cf655c0ba53f6ad9961d5aa21206634397528017624d1f05ec
new file mode 100644
index 0000000..dd9ae36
--- /dev/null
+++ b/_darcs/pristine.hashed/0000017267-4cb7413455d785cf655c0ba53f6ad9961d5aa21206634397528017624d1f05ec
Binary files differ
diff --git a/_darcs/pristine.hashed/0000022217-a371d8c991975b8dffae85ba8a75f1e370d9920408cad17e30e6e040af4758dd b/_darcs/pristine.hashed/0000022217-a371d8c991975b8dffae85ba8a75f1e370d9920408cad17e30e6e040af4758dd
new file mode 100644
index 0000000..c03de07
--- /dev/null
+++ b/_darcs/pristine.hashed/0000022217-a371d8c991975b8dffae85ba8a75f1e370d9920408cad17e30e6e040af4758dd
Binary files differ
diff --git a/_darcs/pristine.hashed/0000023969-87a6632deaab76a135d202a8abac63b9dd1428c3b197e1203b5fe2f8dab340b1 b/_darcs/pristine.hashed/0000023969-87a6632deaab76a135d202a8abac63b9dd1428c3b197e1203b5fe2f8dab340b1
new file mode 100644
index 0000000..9d3e587
--- /dev/null
+++ b/_darcs/pristine.hashed/0000023969-87a6632deaab76a135d202a8abac63b9dd1428c3b197e1203b5fe2f8dab340b1
Binary files differ
diff --git a/_darcs/pristine.hashed/0000030486-c0c897668a4d8de48464828d0b4e2f2d93db94b525f6d1f22a24d5ddf965f22f b/_darcs/pristine.hashed/0000030486-c0c897668a4d8de48464828d0b4e2f2d93db94b525f6d1f22a24d5ddf965f22f
new file mode 100644
index 0000000..d86a214
--- /dev/null
+++ b/_darcs/pristine.hashed/0000030486-c0c897668a4d8de48464828d0b4e2f2d93db94b525f6d1f22a24d5ddf965f22f
Binary files differ
diff --git a/_darcs/pristine.hashed/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 b/_darcs/pristine.hashed/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
new file mode 100644
index 0000000..229151a
--- /dev/null
+++ b/_darcs/pristine.hashed/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Binary files differ
diff --git a/_darcs/tentative_hashed_inventory b/_darcs/tentative_hashed_inventory
new file mode 100644
index 0000000..6fcd3b6
--- /dev/null
+++ b/_darcs/tentative_hashed_inventory
@@ -0,0 +1,86 @@
+pristine:0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679
+[start using darcs haskellmode-20090430
+claus.reinke@talk21.com**20100616154750
+ Ignore-this: bfd799dc7229bdeb59a2630704b7bc5f
+] 
+hash: 0000100350-7b2cc547e289958f2a397d8aaee669cf84bd239c2542d6e6b5e4794cc3e4e544
+[minor path changes for ghc-6.12.*
+claus.reinke@talk21.com**20100617142206
+ Ignore-this: d392f2c84490e69737bf3983072e7cf2
+] 
+hash: 0000001035-7e3c58b51f3f2485c3d8aae26d5258dc0cffdd4422ee24b5b5e4516aa94d15fc
+[use full GHCi command names (#13)
+claus.reinke@talk21.com**20100617151606
+ Ignore-this: 815d082dbb9798ef74e331716bdd2fe3
+] 
+hash: 0000000376-b841521e0047dcf1936de4c6a1c0d044dd4f4062d7a18191d21823075deff0e9
+[sort OPTIONS_GHC and LANGUAGE pragma menues, use script-ocal variables (#16)
+claus.reinke@talk21.com**20100617151723
+ Ignore-this: 4e4fec8c3d7b81d8819f1796c91dec45
+] 
+hash: 0000001467-80edfa76ce53edb08d9e806dfc9919bf32338bcaa7b1b6b19a18078d8becf15f
+[don't query GHCi in GHC_TypeBallon() (#14)
+claus.reinke@talk21.com**20100618154419
+ Ignore-this: 8d233798ebf47cf6df0d103c4ec6dac
+] 
+hash: 0000001624-323c41c14de51220753089ad7648614e00e6252a96765ef9a53aba4cbdca781f
+[start caching GHC configuration info (#8); move GHC version code to autoload
+claus.reinke@talk21.com**20100622085654
+ Ignore-this: 2d9614d9435a067fb86ee5212d631395
+] 
+hash: 0000006138-8010cad0d600cfe6de4c205cc941cb628295656c5559c63bca348968dfe3c29b
+[allow for import {-# SOURCE #-} in haskellmode#GatherImports
+claus.reinke@talk21.com**20100622160107
+ Ignore-this: b68995160a3698fd07c0c7a635d24b63
+] 
+hash: 0000000322-81c82541355811ab8afbdbece128fbad2aa4309e258a8e803c6390abef6f4fba
+[comments, last-modified dates
+claus.reinke@talk21.com**20100622182506
+ Ignore-this: 5568a452ea1b3a0d052c393fbb948045
+] 
+hash: 0000000612-0f6cfc2e58fd2880a5b794d390e24a2decf4158190f26fa9629bc53d7f94772c
+[be more helpful if type is not known
+claus.reinke@talk21.com**20100910162020
+ Ignore-this: 82139355aec49f65c946f776c02c72b6
+] 
+hash: 0000000901-d4e81ffc04a84811c2078d3102c66bbba227151168979b8a252b9107efbda911
+[change note
+claus.reinke@talk21.com**20100910162234
+ Ignore-this: 34278995444aca17eba9dfda14a11a08
+] 
+hash: 0000000208-73e9dd1f3ff2145cbe3807c739f5af031869ed02b21e965c92fae88d38490f9d
+[autoload/haskellmode.vim: fix fileformat to unix
+claus.reinke@talk21.com**20101117173809
+ Ignore-this: 3ce18f7ef4b0d412a7c31a7c0d90f902
+] 
+hash: 0000013909-eb16ffbb5042cc69df87a8f1bb989d4a99fa68a6490cc95ece064e5afd189bc7
+[adapt to new Haddock HTML-index file format
+claus.reinke@talk21.com**20101117174205
+ Ignore-this: 7ac996b7cbf515aa302402fe58d78194
+] 
+hash: 0000002930-728285d1f321f19da418cefe516bf533bb4a1b04e2a98985ce8b212a5b4e7eb6
+[allow for package info in haddock index modules
+claus.reinke@talk21.com**20101211004835
+ Ignore-this: e91bf7b63d9a2b25a4ecc628765d2dff
+] 
+hash: 0000001315-35463d9601c6f7bfbe56f8dff02e03fab61302a0b300c612257da6b46c9dc2cc
+[improve location of generated import statements
+claus.reinke@talk21.com**20101211005337
+ Ignore-this: bf4e5790fcf0b70a3b245a3b81813eae
+] 
+hash: 0000002689-dcf645155ff85da42667ae07bc2d6b0331b195cb778cd6b3e1dac50d0edcf727
+[package info in haddock index is optional
+claus.reinke@talk21.com**20101211010916
+ Ignore-this: 965c09244930632240f4a2d252724821
+] 
+hash: 0000001319-f85a10fd0487048a9de67a1871d5dc9b2315cdf2143ec8cd7d86f9ba992335a7
+[FIX #24: limit QuickFixCmdPost to compiler ghc
+claus.reinke@talk21.com**20110122135757
+ Ignore-this: 9d9b66b836ec40fdb558906bef252bd9
+] 
+hash: 0000000397-02b2ddb5e31f2258d3368f8cf64588f4bbdfa4d2c2a2c9c245f39224c8ce39d9
+[update dates/changes for previous fix
+claus.reinke@talk21.com**20110122141730
+ Ignore-this: c89ec98d146efde874a45a35d3f8e6a7
+] 
+hash: 0000000319-8ee1912346b5df5b0f3fad96cdf46ff24995cf9dd50085c3c72e95893c5ff84f
diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine
new file mode 100644
index 0000000..7de3450
--- /dev/null
+++ b/_darcs/tentative_pristine
@@ -0,0 +1 @@
+pristine:0000000483-3d1e5441d6e1b3ce63babaa270fb1610da19bf4ee6d2e594fc75c922bf227679
\ No newline at end of file
diff --git a/haskellmode-files.txt b/haskellmode-files.txt
new file mode 100644
index 0000000..6b97650
--- /dev/null
+++ b/haskellmode-files.txt
@@ -0,0 +1,470 @@
+" part of haskell plugins: http://projects.haskell.org/haskellmode-vim
+" please send patches to <claus.reinke@talk21.com>
+
+---- file list
+
+compiler/ghc.vim
+ftplugin/haskell.vim
+ftplugin/haskell_doc.vim
+ftplugin/haskell_hpaste.vim
+autoload/haskellmode.vim
+doc/haskellmode.txt
+
+---- open issues/feature requests
+
+- ghc.vim: BufEnter or FileType event for compiler autocommand?
+           support <range>_t for typing expressions?
+           in _ie, don't assume single-line import statements, use Haskell_GatherImport?
+           augment _lang by context-sensitive completion within {-# LANGUAGE #-}
+           should we provide easier access to our .ghci :grep within vim
+              (suggested by Marc Weber)?
+           would be great for performance if we could reuse a single GHCi
+             session, in spite of :help design-not..
+
+- haskell_doc.vim: merge import lines per module?
+                   provide context-sensitive completion for import statements?
+                      (complete module names only first, ideally also only
+                      available imports later)
+
+- haskell.vim: do something about 'iskeyword', or at least about ctrl-];
+               Bram seems unwilling to accomodate languages that require 
+               more flexible iskeyword specifications, so we'd need to 
+               implement our own workarounds:-(
+
+- use the new  find-module/package search, -fobject-code, ghc-paths,
+  :show packages
+
+- expand CamelCase matching to other completions
+
+- skip menues of length one (Scott Dillard); that should probably be
+  optional, and needs factoring out of the menu code from various places
+
+- should we use :emenu .. <C-Z> instead of our home-brewn popup replacement
+  for console-mode vim in haskell_doc.vim as well?
+
+- haskell_hpaste.vim: support browsing of annotations, as well as older pastes
+                      restore posting for new hpaste.org setup
+
+- can we get back support for non-local docs? (issue: DocIndex reads from
+    various package locations, and bakes those in to avoid confusion on
+    index lookup; it can't easily read from non-local sources, but it could
+    bake in non-local references instead of the local ones - if it can easily
+    guess those references..)
+
+- longer term: start thinking about performance, eg, non-linear searches,
+    or relocating some code to haskell helpers (including the building of
+    the haddock index file, and the gathering of ghc-version info - the
+    former processes a lot of data, the latter doesn't need to be done
+    again and again, with a new shell process each time). some of these
+    helpers would run at install time, but might have to be rerun if
+    ghc/libraries change, others would run at edit time, replacing 
+    'ghc -e' with a dedicated ghc-api client (then we could get more
+    detailed type info as well, for local bindings, by traversing the
+    typechecked ast into a nested variant of the current b:ghc_types).
+
+---- change log
+
+22.01.2011
+  ghc.vim:        FIX #24: limit QuickFixCmdPost to compiler ghc
+
+11.12.2010
+  haskell_doc:    be slightly more forgiving in finding insert positions
+                    for Import (_i,_im,_iq,_iqm)
+                  package info in haddock index is optional (not present
+                    in old-style generated index)
+  autoload/haskellmode: reduce whitespace collected by GatherImports
+
+06.12.2010
+  haskell_doc:     our new haddock index generator adds package information to
+                    module names; adapt Haddock,Import,Qualify,IDoc,
+                    MkHaddockModuleIndex
+
+17.11.2010
+  haskell_doc:     with GHC-7.0.1, the format of Haddock HTML-index files has
+                    changed - adapt our scraping code (ProcessHaddockIndexes3);
+                    in future, try switching to the new Haddock API
+                    (http://trac.haskell.org/haddock/ticket/157), even if that
+                    means adding Haskell tools to haskellmode
+
+18.09.2010
+  autoload/haskellmode.vim: fix fileformat to unix
+
+10.09.2010
+  ghc.vim:         be more helpful in _t if type is unknown
+
+22.06.2010
+  ghc.vim:         start caching GHC configuration info (supported languages
+                   and options) instead of asking GHC for every editing session (#8)
+  haskellmode.vim: allow for import {-# SOURCE #-} in haskellmode#GatherImports
+                   (suggested by dmitri shkurko)
+
+18.06.2010
+  ghc.vim:         don't trigger GHC_BrowseAll() from within GHC_TypeBalloon,
+                   as that ties a potentially long-running task to mouse
+                   motion; instead, just point to :GHGReload if necessary (#14)
+
+17.06.2010
+  haskell_doc.vim: minor path changes for ghc-6.12.*
+  ghc.vim:         sort OPTIONS_GHC and LANGUAGE pragma menues (suggested by mkrauskopf)
+
+02/05/2009
+  haskellmode.txt: mention b:ghc_staticoptions, provide example for setting default 
+                    options (extra import path)
+
+30/04/2009
+  ghc.vim:         #9: leave completeopt at default values (though I recommend menu,menuone)
+  haskell_doc.vim: #9: leave completeopt at default values (though I recommend menu,menuone)
+                   replace not-yet documented g:haskell_avoid_singleton_menus with 
+                    checking for absence of menuone in completeopt, for consistency
+                    (only in _?, so far; TODO: shortcut other haskellmode menus if
+                     menuone is missing and there is only one menu entry)
+
+28/04/2009
+  haskell.vim: use setlocal instead of set
+               use suffixesadd instead of hardcoding a single suffix into includeexpr
+                (suggested by Simon Hengel)
+
+24/04/2009
+  haskell_doc.vim: make list of search engines configurable (g:haskell_search_engines)
+                   hayoo! doesn't like qualified names, need to split Data.List.length
+                    into 'length+module:Data.List'
+                   hoogle doesn't like qualified symbols, need to split 
+                    Control.Monad.>>= into 'enc(>>=)+enc(+)Control.Monad'
+                   translate qualifiers for import qualified as into multi-module searches
+                    for hoogle and hayoo!
+                   
+23/04/2009
+  haskellmode.vim: add haskellmode#UrlEncode
+  haskell_doc.vim: move 'file://' prefix from g:haddock_browser_callformat
+                    to DocBrowser - it wasn't users doing any good at that
+                    level, accidentally omitting the prefix causes some
+                    browsers to add an extra level or url-encoding (causing
+                    lookup failures), and we want to be able to support
+                    non-local browsing, too (where the extra prefix is in the way)
+                   add Hoogle and Hayoo! lookup (suggested by Magnus Therning)
+  haskellmode.txt: document _?1 (Hoogle) and _?2 (Hayoo!) lookup.
+
+22/04/2009
+  haskellmode.txt: we need 'filetype plugin on', not just 'filetype on'
+                    (spotted by Philip Craig)
+
+21/04/2009
+  haskellmode.vim: move common functionality into new autoload script
+  ghc.vim:         switch to using haskellmode# functions instead of Haskell_ 
+  haskell_doc.vim: switch to using haskellmode# functions instead of Haskell_ 
+  haskell.vim:     Haskell_ functions have been moved to haskellmode#
+  haskellmode.txt: explicitly mention 'filetype on', 'syntax on'
+                   move GHC_StaticOptions from Settings section (where it obscured
+                    more basic info) to GHC section (where it is easier to see)
+
+15/04/2009
+  haskell_doc.vim: for _., remove duplicates in non-gui version as well, and
+                    in gui version, add separator between imported and non-imported 
+
+15/04/2009
+  haskell_doc.vim: fix ticket #5 - it turns out that the 04/04/ fix of _? fixed 
+                    one use case while breaking another; the logic there was getting
+                    too complicated and fragile; now somewhat straightened out (no
+                    more indirection via IDoc, no more separate indices for keys with
+                    or without namespace tag, simplified conditions, comments clarify
+                    what should happen when, ..); tested with qualified/unqualified
+                    items, qualified/qualfied as/unqualified imports, imported and
+                    non-imported items; please test _? and report any issues with 
+                    the rewritten code
+                   while in the area, make a start on the popular request of
+                    allowing to skip singleton menues, in _? 
+                    (let g:haskell_avoid_singleton_menus=1)
+
+13/04/2009
+  haskellmode.txt: point to http://www.haskell.org/ghc/docs/ for documentation
+                    tarballs (not everyone is using latest)
+
+10/04/2009
+  haskellmode.txt: point to new screencasts, not old screenshots
+
+10/04/2009
+  haskell.vim: in Haskell_GatherImport, match for '^import\s' to avoid
+                false matches (importNot, import'Neither) (spotted by 
+                Matthijs Kooijman)
+  ghc.vim: use preview window for output of _si instead of just echo
+  haskellmode.txt: document _si change
+
+07/04/2009
+  ghc.vim/haskell_doc.vim: fix GHC_VersionGE (stop comparing when greater
+                            digit found) (spotted by Matthijs Kooijman)
+
+  haskell_doc.vim: in DocIndex, when calling 'ghc-pkg field * haddock-html',
+                     escape '*' when &shell=~'sh' (unix-style shell vs windows
+                     cmd.exe and the like) (spotted by Matthijs Kooijman)
+                   when looking for 'ghc-pkg field base haddock-html', ignore
+                     any but the first base we find (spotted by Matthijs Kooijman)
+
+07/04/2009
+  haskell_hpaste.vim: it seems that hpaste.org has changed its layout, invalidating
+                        the hpaste code here! since noone told me, I assume noone is
+                        using this feature anymore (I'm not on IRC myself)? I've fixed 
+                        up the read side, so one can get the index and read individual 
+                        pastes, but posting is disabled for now (just needs someone to 
+                        upgrade the code to hpaste's current fastcgi interface).
+
+04/04/2009
+  haskell_doc.vim: when narrowing choices by qualifier for _?, take
+                     lookup index from un-narrowed list (else we could
+                     end up in the docs for the wrong module)
+
+02/04/2009
+  ghc.vim: actually, we can try to make a reasonable guess at the parent
+            type for constructors in _ie, from their type signature
+
+01/04/2009
+  ghc.vim: try a bit harder to escape " and ' in :GHCi
+           eliminate duplicates in _ie and mark data constructor imports
+             as ???(Cons) - we can't reliably figure out the parent type
+             for the constructor:-(
+           handle Prelude as special case in _ie (can't just comment out
+             import, need to import [qualified] Prelude [as X]() )
+
+  haskell_doc.vim: fix keys (no namespace tags) and urls (modules) for :MDoc
+
+31/03/2009
+  all files: new home page at projects.haskell.org
+
+28/03/2009
+  haskell_doc.vim: in ProcessHaddockIndexes2, fix a case where making new entries
+                    could lose old ones (eg, zipWith's base package locations got
+                    lost when adding its vector package locations) 
+
+07/12/2008
+  haskell_doc.vim: since we're now reading from multiple haddock indices in
+                    DocIndex, we need to extend, not overwrite entries..
+
+03/12/2008
+  ghc.vim: do not reset b:ghc_static_options on every reload
+
+21/10/2008
+  haskell_doc.vim: more places were haddock namespace tags ([t]: type-level;
+                   [v]: value-level) need to be ignored: completion, haddock
+                   lookup for qualified names
+
+08/10/2008
+  haskell.vim: in Haskell_GatherImports, don't use undefined vars in implicit
+                  Prelude imports
+
+07/10/2008
+  haskell_doc.vim: since we now add haddock namespace tags to haddock_index keys
+                    ([t]: type-level;[v]: value-level), we need to remove them
+                    where they play no role (Import/Qualify)
+
+30/09/2008
+  haskell_doc.vim: in ProcessHaddockIndexes, concatenating lines is too slow (this
+                    isn't Haskell); process lines directly instead
+
+22/09/2008
+  haskell_doc.vim: in DocIndex, process doc-index.html as well, in case it holds 
+                    the full index inplace, rather than pointers to per-letter indices
+
+31/07/2008
+  haskell.vim: Haskell_GatherImports: more helpful import parse error, and be more
+                forgiving about trailing characters
+
+19/07/2008
+  haskell_doc.vim: haddock_browser_callformat: protect against spaces in url (windows)
+                   DocIndex: try to process addon libraries as well (had to change quite
+                      a few places and formats, please report any bugs arising!)
+
+18/07/2008
+  haskell_doc.vim: in Haddock(), bypass special treatment of qualified ids
+                    if there is no matching qualified import
+                   in Qualify(), suggest matching qualified imports first
+                   add _iq/_iqm, for qualified imports
+  haskell.vim: in Haskell_GatherImports(), fill out implicit Prelude entries
+
+06/07/2008
+  ghc.vim: errorformat - we cannot distinguish multiline errors/warnings 
+            by their first line!-( fix errorformat to assume errors, then
+            ignore warning-only entries in GHC_CountErrors; also get rid
+            of empty messages (all but the first, apparently..)
+
+05/07/2008
+  ghc.vim: do not throw away b:ghc_types unless we actually have something
+            new to replace it with (move from GHC_BrowseAll to GHC_Process*)
+
+04/07/2008
+  ghc.vim: errorformat - recognize both errors and warnings
+           :make/:GHCReload - don't let warnings stop us, if there are no errors
+           use :emenu instead of :popup if not has("gui_running"), giving 
+            commandline completion for _opt/_lang; makes things work again 
+            in non-gui vims (Tristan Allwood)
+           fill ]OPTIONS_GHC menu from GHCi :set (if ghc_version>=6.8.2),
+            that is partly why I added that output after all!-) (Tristan Allwood)
+
+12/06/2008
+  haskell_doc.vim: Import (_i/_im) - both LANGUAGE and OPTIONS need to be at the top
+
+16/06/2008
+  haskell_doc.vim: avoid follow-on errors if HaddockIndexLookup returns 0
+
+12/06/2008
+  haskell_doc.vim: improve search patterns for Import (_i/_im)
+
+10/06/2008
+  ghc.vim: don't try to repopulate b:ghc_types unless something has changed
+           add :GHCStaticOptions, so that we can add things like '-package ghc'..
+  haskellmode.txt: document :GHCStaticOptions
+
+02/06/2008
+  ghc.vim: use the new :browse! (if ghc_version>="6.8.1"); gets back type info
+            for class methods and data constructors, and provides qualifiers
+            according to qualified imports
+           do not delete existing b:ghc_types (Scott Dillard)
+  haskell.vim: fix modulePat in Haskell_GatherImports to permit Singletons (Scott Dillard)
+               expand Haskell_GatherImports to make it a little more accurate,
+                adding list helpers Haskell_ListElem, Haskell_ListIntersect,
+                Haskell_ListUnion, Haskell_ListWithout; in particular, account
+                for virtual modules composed of multiple 'qualified as Virtual'
+  haskell_doc.vim: in Haddock, use Haskell_GatherImports to offer haddocks for
+                    virtual modules (import qualified as Virtual, suggested by Scott Dillard)
+
+11/04/2008
+  haskell_doc.vim: fix pattern for qualified names in CompleteHaddock (fixes D.M.f)
+                   only try CamelCase if no prefix matches
+
+10/04/2008
+  haskell_doc.vim: add CamelCase matching for ctrl-x_ctrl-u (todo: fix D.M.f)
+                      (suggested by Marc Weber, but in addition to uppercase
+                      letters, we also use module qualifier separators '.' 
+                      for disambiguation, and anchor shortcuts at start of
+                      string and after '.')
+                      pSL -> putStrLn
+                      C.M.MP -> Control.Monad.MonadPlus
+
+09/04/2008
+  haskell_doc.vim: extract index lookup
+                   fix MDoc (have module index rather than index)
+
+04/12/2007
+  ghc.vim: use --numeric-version instead of --version
+           if ghc>=6.8, offer supported languages menu, _lang
+
+02/12/2007
+  haskell_doc.vim: try to use the same g:ghc everywhere..
+                   introduce g:ghc_pkg, derive from g:ghc, to get same version
+                   location of haddocks has moved on windows with 6.8..
+
+06/11/2007
+  haskell_doc.vim: add :FlagReference command, for direct access to
+                    sections in the user guide's flag reference
+  haskellmode.txt: document :FlagReference command
+
+05/11/2007
+  haskellmode.txt: mention LocalLeader in Settings section 2.2
+
+03/11/2007
+  ghc.vim: change :b to :browse, for 6.8.1 has stolen :b for breakpoints..
+
+19/10/2007
+  ghc.vim: in GHC_NameCurrent, drop trailing [ (] from module header pattern
+  ghc.vim, haskell_doc.vim: use maplocalleader behind the scenes, for those
+            who asked for it (but stick to _ default, if not defined, and 
+            keep _ in help, to avoid confusing others:-)
+
+08/09/2007
+  haskell_doc.vim: in _., escape \ in lhs and rhs
+
+21/08/2007
+  haskell.vim: add Haskell_GatherImports, separately recording qualified 
+                  and unqualified imports, as well as 'hiding', 'as', and
+                  explicitly listed ids
+               add Haskell_GatherImport, collecting import statements spread
+                  over multiple lines by counting parens
+  ghc.vim: switch from GHC_GatherImports to Haskell_GatherImports
+           when processing GHCi output for types, prepare to take qualified
+             imports into account, record conflicting types for unqualified ids
+             (arising from incomplete parsing of import statements..)
+           show conflicting types in _t/_T/balloon; if available, use multiline
+             baloon to show conflicting types
+           browse only current module for types, using *<module> gives types
+             for all imports, including qualified imports, but for class
+             methods and data constructors..
+
+20/08/2007
+  haskell.vim: in Haskell_GetNameSymbol, handle symbolic ids starting with .
+  ghc.vim: abort processing of GHCi output in case of errors (we should 
+              deprecate direct calls to :GHGReload in favour of :make)
+           add a simplistic :GHCi command, to run commands/expressions in current module
+  haskell_doc.vim: some symbolic ids need escaping, if embedded in commands
+                   in Qualify, escape '.' in search patterns, '|' in amenu command
+                   in Haddock, escape '|' in amenu command
+                   in Import, escape '|' in amenu command
+  haskellmode.txt: add quick reference
+
+19/08/2007
+  haskell.vim: extend Haskell_GetNameSymbol to handle qualified ids,
+                 pass lines instead of bufnr/lineno,
+                 adapt calls in haskell_doc.vim and ghc.vim
+  haskell_doc.vim: support _i/_im for qualified ids as well
+                   support _? for qualified ids (direct lookup, no menu needed)
+                   in _., suppress highlighting of internal search&replace 
+                   support completion of both qualified and unqualified ids 
+  ghc.vim: support _si for qualified ids as well
+           take qualifiers into account for _t/_T/GHC_TypeBalloon
+  haskell_hpaste.vim: avoid need for manual <cr> after ,p by adding a separate
+                        function/command HpasteEditEntry
+
+18/08/2007
+  haskell.vim: generalise Haskell_GetNameSymbol to Haskell_BufGetNameSymbol
+  ghc.vim: initialize b:ghc_types *before* haskell_functions cutoff
+           have GHC_TypeBalloon use Haskell_BufGetNameSymbol
+  haskell_doc.vim: in function Import, drop one level of escapes in no-gui version;
+                     use '' instead of "" to reduce number of \ in both versions
+
+17/08/2007
+  ghc.vim: add basic :GHCi command
+           add _ie, using :make errors to make import lists explicit
+  haskell_doc.vim: add parens when using _i on symbolic id
+                   refine defaults for g:haddock_browser_callformat, to use
+                     foreground browsing only when no gui is running
+
+14/08/2007
+  ghc.vim: add missing s in -fno-mono-pat-binds
+  haskellmode.txt: reorganize slightly and adapt to current version. 
+                   still needs more work (such as a quickreference)
+
+12/08/2007
+  haskellmode.txt: integrate initial help file provided by Alex Tarkovsky.
+                   reorganize slightly and adapt to current version. needs 
+                   more work (such as a quickreference)
+  haskell_doc.vim: have :ExportDocIndex call HaveIndex()
+
+09/08/2007
+  haskell_doc.vim: consider $HOME for g:haddock_indexfiledir before giving up
+                   terminate script if g:haddock_indexfiledir can't be found
+                   fix missing let when setting s:docdir
+  haskell_hpaste.vim: dos2unix was confused by an embedded ctrl-v ctrl-m, 
+                        splitting a line, which causes UseVimball to omit
+                        the final endfunction..
+                      converting vimballs to unix by hand for now, next
+                        version of vimball will do that automatically..
+
+07/08/2007
+  haskell_doc.vim: avoid quotes for :Doc parameters as well
+                   add g:haddock_moduleindex
+                   add :MDoc <qual>, for module documentation, with completion
+
+06/08/2007
+  haskell.vim: generalise Haskell_GetNameSymbol to take lnum/col parameters
+                 move error message to calls
+                 adapt calls in ghc.vim and haskell_doc.vim
+  ghc.vim: use Haskell_GetNameSymbol for GHC_TypeBalloon
+           restore (?) _t for symbols by adding parens
+           update b:ghc_types after successful :make
+
+05/08/2007
+  haskell_doc.vim: added g:haddock_indexfiledir
+                   added g:haddock_docdir
+                   fix field setting (extra '\n', missing '/')
+  ghc.vim: remove '\n' from g:ghc_version
+
+01/08/2007 
+  ghc.vim: added initial GHC_TypeBalloon
+
diff --git a/plugin/ghc.vim b/plugin/ghc.vim
new file mode 100644
index 0000000..3c9e33d
--- /dev/null
+++ b/plugin/ghc.vim
@@ -0,0 +1,550 @@
+
+" Vim Compiler File
+" Compiler:	GHC
+" Maintainer:	Claus Reinke <claus.reinke@talk21.com>
+" Last Change:	22/01/2011
+"
+" part of haskell plugins: http://projects.haskell.org/haskellmode-vim
+
+" ------------------------------ paths & quickfix settings first
+"
+
+if exists("current_compiler") && current_compiler == "ghc"
+  finish
+endif
+let current_compiler = "ghc"
+
+let s:scriptname = "ghc.vim"
+
+if !haskellmode#GHC() | finish | endif
+if (!exists("b:ghc_staticoptions"))
+  let b:ghc_staticoptions = ''
+endif
+
+" set makeprg (for quickfix mode) 
+execute 'setlocal makeprg=' . g:ghc . '\ ' . escape(b:ghc_staticoptions,' ') .'\ -e\ :q\ %'
+"execute 'setlocal makeprg=' . g:ghc .'\ -e\ :q\ %'
+"execute 'setlocal makeprg=' . g:ghc .'\ --make\ %'
+
+" quickfix mode: 
+" fetch file/line-info from error message
+" TODO: how to distinguish multiline errors from warnings?
+"       (both have the same header, and errors have no common id-tag)
+"       how to get rid of first empty message in result list?
+setlocal errorformat=
+                    \%-Z\ %#,
+                    \%W%f:%l:%c:\ Warning:\ %m,
+                    \%E%f:%l:%c:\ %m,
+                    \%E%>%f:%l:%c:,
+                    \%+C\ \ %#%m,
+                    \%W%>%f:%l:%c:,
+                    \%+C\ \ %#%tarning:\ %m,
+
+" oh, wouldn't you guess it - ghc reports (partially) to stderr..
+setlocal shellpipe=2>
+
+" ------------------------- but ghc can do a lot more for us..
+"
+
+" allow map leader override
+if !exists("maplocalleader")
+  let maplocalleader='_'
+endif
+
+" initialize map of identifiers to their types
+" associate type map updates to changedtick
+if !exists("b:ghc_types")
+  let b:ghc_types = {}
+  let b:my_changedtick = b:changedtick
+endif
+
+if exists("g:haskell_functions")
+  finish
+endif
+let g:haskell_functions = "ghc"
+
+" avoid hit-enter prompts
+set cmdheight=3
+
+" edit static GHC options
+" TODO: add completion for options/packages?
+command! GHCStaticOptions call GHC_StaticOptions()
+function! GHC_StaticOptions()
+  let b:ghc_staticoptions = input('GHC static options: ',b:ghc_staticoptions)
+  execute 'setlocal makeprg=' . g:ghc . '\ ' . escape(b:ghc_staticoptions,' ') .'\ -e\ :q\ %'
+  let b:my_changedtick -=1
+endfunction
+
+map <LocalLeader>T :call GHC_ShowType(1)<cr>
+map <LocalLeader>t :call GHC_ShowType(0)<cr>
+function! GHC_ShowType(addTypeDecl)
+  let namsym   = haskellmode#GetNameSymbol(getline('.'),col('.'),0)
+  if namsym==[]
+    redraw
+    echo 'no name/symbol under cursor!'
+    return 0
+  endif
+  let [_,symb,qual,unqual] = namsym
+  let name  = qual=='' ? unqual : qual.'.'.unqual
+  let pname = ( symb ? '('.name.')' : name ) 
+  let ok    = GHC_HaveTypes()
+  if !has_key(b:ghc_types,name)
+    redraw " this happens to hide messages from GHC_HaveTypes
+    if &modified 
+      let comment = " (buffer has unsaved changes)"
+    elseif !ok
+      let comment = " (try :make to see any GHCi errors)"
+    else 
+      let comment = ""
+    endif
+    echo pname "type not known".comment
+  else
+    redraw
+    for type in split(b:ghc_types[name],' -- ')
+      echo pname "::" type
+      if a:addTypeDecl
+        call append( line(".")-1, pname . " :: " . type )
+      endif
+    endfor
+  endif
+endfunction
+
+" show type of identifier under mouse pointer in balloon
+" TODO: it isn't a good idea to tie potentially time-consuming tasks
+"       (querying GHCi for the types) to cursor movements (#14). Currently,
+"       we ask the user to call :GHCReload explicitly. Should there be an
+"       option to reenable the old implicit querying?
+if has("balloon_eval")
+  set ballooneval
+  set balloondelay=600
+  set balloonexpr=GHC_TypeBalloon()
+  function! GHC_TypeBalloon()
+    if exists("b:current_compiler") && b:current_compiler=="ghc" 
+      let [line] = getbufline(v:beval_bufnr,v:beval_lnum)
+      let namsym = haskellmode#GetNameSymbol(line,v:beval_col,0)
+      if namsym==[]
+        return ''
+      endif
+      let [start,symb,qual,unqual] = namsym
+      let name  = qual=='' ? unqual : qual.'.'.unqual
+      let pname = name " ( symb ? '('.name.')' : name )
+      if b:ghc_types == {} 
+        redraw
+        echo "no type information (try :GHGReload)"
+      elseif (b:my_changedtick != b:changedtick)
+        redraw
+        echo "type information may be out of date (try :GHGReload)"
+      endif
+      " silent call GHC_HaveTypes()
+      if b:ghc_types!={}
+        if has("balloon_multiline")
+          return (has_key(b:ghc_types,pname) ? split(b:ghc_types[pname],' -- ') : '') 
+        else
+          return (has_key(b:ghc_types,pname) ? b:ghc_types[pname] : '') 
+        endif
+      else
+        return ''
+      endif
+    else
+      return ''
+    endif
+  endfunction
+endif
+
+map <LocalLeader>si :call GHC_ShowInfo()<cr>
+function! GHC_ShowInfo()
+  let namsym   = haskellmode#GetNameSymbol(getline('.'),col('.'),0)
+  if namsym==[]
+    redraw
+    echo 'no name/symbol under cursor!'
+    return 0
+  endif
+  let [_,symb,qual,unqual] = namsym
+  let name = qual=='' ? unqual : (qual.'.'.unqual)
+  let output = GHC_Info(name)
+  pclose | new 
+  setlocal previewwindow
+  setlocal buftype=nofile
+  setlocal noswapfile
+  put =output
+  wincmd w
+  "redraw
+  "echo output
+endfunction
+
+" fill the type map, unless nothing has changed since the last attempt
+function! GHC_HaveTypes()
+  if b:ghc_types == {} && (b:my_changedtick != b:changedtick)
+    let b:my_changedtick = b:changedtick
+    return GHC_BrowseAll()
+  else
+    return 1
+  endif
+endfunction
+
+" update b:ghc_types after successful make
+au QuickFixCmdPost make if exists("current_compiler") && current_compiler=="ghc" && (GHC_CountErrors()==0) | silent call GHC_BrowseAll() | endif
+
+" count only error entries in quickfix list, ignoring warnings
+function! GHC_CountErrors()
+  let c=0
+  for e in getqflist() | if e.type=='E' && e.text !~ "^[ \n]*Warning:" | let c+=1 | endif | endfor
+  return c
+endfunction
+
+command! GHCReload call GHC_BrowseAll()
+function! GHC_BrowseAll()
+  " let imports = haskellmode#GatherImports()
+  " let modules = keys(imports[0]) + keys(imports[1])
+  let b:my_changedtick = b:changedtick
+  let imports = {} " no need for them at the moment
+  let current = GHC_NameCurrent()
+  let module = current==[] ? 'Main' : current[0]
+  if haskellmode#GHC_VersionGE([6,8,1])
+    return GHC_BrowseBangStar(module)
+  else
+    return GHC_BrowseMultiple(imports,['*'.module])
+  endif
+endfunction
+
+function! GHC_NameCurrent()
+  let last = line("$")
+  let l = 1
+  while l<last
+    let ml = matchlist( getline(l), '^module\s*\([^ (]*\)')
+    if ml != []
+      let [_,module;x] = ml
+      return [module]
+    endif
+    let l += 1
+  endwhile
+  redraw
+  echo "cannot find module header for file " . expand("%")
+  return []
+endfunction
+
+function! GHC_BrowseBangStar(module)
+  redraw
+  echo "browsing module " a:module
+  " TODO: this doesn't work if a:module is loaded compiled - we
+  "       could try to give a more helpful error message, or use
+  "       -fforce-recomp directly
+  let command = ":browse! *" . a:module
+  let orig_shellredir = &shellredir
+  let &shellredir = ">" " ignore error/warning messages, only output or lack of it
+  let output = system(g:ghc . ' ' . b:ghc_staticoptions . ' -v0 --interactive ' . expand("%") , command )
+  let &shellredir = orig_shellredir
+  return GHC_ProcessBang(a:module,output)
+endfunction
+
+function! GHC_BrowseMultiple(imports,modules)
+  redraw
+  echo "browsing modules " a:modules
+  let command = ":browse " . join( a:modules, " \n :browse ") 
+  let command = substitute(command,'\(:browse \(\S*\)\)','putStrLn "-- \2" \n \1','g')
+  let output = system(g:ghc . ' ' . b:ghc_staticoptions . ' -v0 --interactive ' . expand("%") , command )
+  return GHC_Process(a:imports,output)
+endfunction
+
+function! GHC_Info(what)
+  " call GHC_HaveTypes()
+  let output = system(g:ghc . ' ' . b:ghc_staticoptions . ' -v0 --interactive ' . expand("%"), ":info ". a:what)
+  return output
+endfunction
+
+function! GHC_ProcessBang(module,output)
+  let module      = a:module
+  let b           = a:output
+  let linePat     = '^\(.\{-}\)\n\(.*\)'
+  let contPat     = '\s\+\(.\{-}\)\n\(.*\)'
+  let typePat     = '^\(\)\(\S*\)\s*::\(.*\)'
+  let commentPat  = '^-- \(\S*\)'
+  let definedPat  = '^-- defined locally'
+  let importedPat = '^-- imported via \(.*\)'
+  if !(b=~commentPat)
+    redraw
+    echo s:scriptname.": GHCi reports errors (try :make?)"
+    return 0
+  endif
+  let b:ghc_types = {}
+  let ml = matchlist( b , linePat )
+  while ml != []
+    let [_,l,rest;x] = ml
+    let mlDecl = matchlist( l, typePat )
+    if mlDecl != []
+      let [_,indent,id,type;x] = mlDecl
+      let ml2 = matchlist( rest , '^'.indent.contPat )
+      while ml2 != []
+        let [_,c,rest;x] = ml2
+        let type .= c
+        let ml2 = matchlist( rest , '^'.indent.contPat )
+      endwhile
+      let id   = substitute( id, '^(\(.*\))$', '\1', '')
+      let type = substitute( type, '\s\+', " ", "g" )
+      " using :browse! *<current>, we get both unqualified and qualified ids
+      let qualified = (id =~ '\.') && (id =~ '[A-Z]')
+      let b:ghc_types[id] = type
+      if !qualified
+        for qual in qualifiers
+          let b:ghc_types[qual.'.'.id] = type
+        endfor
+      endif
+    else
+      let mlImported = matchlist( l, importedPat )
+      let mlDefined  = matchlist( l, definedPat )
+      if mlImported != []
+        let [_,modules;x] = mlImported
+        let qualifiers = split( modules, ', ' )
+      elseif mlDefined != []
+        let qualifiers = [module]
+      endif
+    endif
+    let ml = matchlist( rest , linePat )
+  endwhile
+  return 1
+endfunction
+
+function! GHC_Process(imports,output)
+  let b       = a:output
+  let imports = a:imports
+  let linePat = '^\(.\{-}\)\n\(.*\)'
+  let contPat = '\s\+\(.\{-}\)\n\(.*\)'
+  let typePat = '^\(\s*\)\(\S*\)\s*::\(.*\)'
+  let modPat  = '^-- \(\S*\)'
+  " add '-- defined locally' and '-- imported via ..'
+  if !(b=~modPat)
+    redraw
+    echo s:scriptname.": GHCi reports errors (try :make?)"
+    return 0
+  endif
+  let b:ghc_types = {}
+  let ml = matchlist( b , linePat )
+  while ml != []
+    let [_,l,rest;x] = ml
+    let mlDecl = matchlist( l, typePat )
+    if mlDecl != []
+      let [_,indent,id,type;x] = mlDecl
+      let ml2 = matchlist( rest , '^'.indent.contPat )
+      while ml2 != []
+        let [_,c,rest;x] = ml2
+        let type .= c
+        let ml2 = matchlist( rest , '^'.indent.contPat )
+      endwhile
+      let id   = substitute(id, '^(\(.*\))$', '\1', '')
+      let type = substitute( type, '\s\+', " ", "g" )
+      " using :browse *<current>, we get both unqualified and qualified ids
+      if current_module " || has_key(imports[0],module) 
+        if has_key(b:ghc_types,id) && !(matchstr(b:ghc_types[id],escape(type,'[].'))==type)
+          let b:ghc_types[id] .= ' -- '.type
+        else
+          let b:ghc_types[id] = type
+        endif
+      endif
+      if 0 " has_key(imports[1],module) 
+        let qualid = module.'.'.id
+        let b:ghc_types[qualid] = type
+      endif
+    else
+      let mlMod = matchlist( l, modPat )
+      if mlMod != []
+        let [_,module;x] = mlMod
+        let current_module = module[0]=='*'
+        let module = current_module ? module[1:] : module
+      endif
+    endif
+    let ml = matchlist( rest , linePat )
+  endwhile
+  return 1
+endfunction
+
+let s:ghc_templates = ["module _ () where","class _ where","class _ => _ where","instance _ where","instance _ => _ where","type family _","type instance _ = ","data _ = ","newtype _ = ","type _ = "]
+
+" use ghci :browse index for insert mode omnicompletion (CTRL-X CTRL-O)
+function! GHC_CompleteImports(findstart, base)
+  if a:findstart 
+    let namsym   = haskellmode#GetNameSymbol(getline('.'),col('.'),-1) " insert-mode: we're 1 beyond the text
+    if namsym==[]
+      redraw
+      echo 'no name/symbol under cursor!'
+      return -1
+    endif
+    let [start,symb,qual,unqual] = namsym
+    return (start-1)
+  else " find keys matching with "a:base"
+    let res = []
+    let l   = len(a:base)-1
+    call GHC_HaveTypes()
+    for key in keys(b:ghc_types) 
+      if key[0 : l]==a:base
+        let res += [{"word":key,"menu":":: ".b:ghc_types[key],"dup":1}]
+      endif
+    endfor
+    return res
+  endif
+endfunction
+set omnifunc=GHC_CompleteImports
+"
+" Vim's default completeopt is menu,preview
+" you probably want at least menu, or you won't see alternatives listed
+" setlocal completeopt+=menu
+
+" menuone is useful, but other haskellmode menus will try to follow your choice here in future
+" setlocal completeopt+=menuone
+
+" longest sounds useful, but doesn't seem to do what it says, and interferes with CTRL-E
+" setlocal completeopt-=longest
+
+map <LocalLeader>ct :call GHC_CreateTagfile()<cr>
+function! GHC_CreateTagfile()
+  redraw
+  echo "creating tags file" 
+  let output = system(g:ghc . ' ' . b:ghc_staticoptions . ' -e ":ctags" ' . expand("%"))
+  " for ghcs older than 6.6, you would need to call another program 
+  " here, such as hasktags
+  echo output
+endfunction
+
+command! -nargs=1 GHCi redraw | echo system(g:ghc. ' ' . b:ghc_staticoptions .' '.expand("%").' -e "'.escape(<f-args>,'"').'"')
+
+" use :make 'not in scope' errors to explicitly list imported ids
+" cursor needs to be on import line, in correctly loadable module
+map <LocalLeader>ie :call GHC_MkImportsExplicit()<cr>
+function! GHC_MkImportsExplicit()
+  let save_cursor = getpos(".")
+  let line   = getline('.')
+  let lineno = line('.')
+  let ml     = matchlist(line,'^import\(\s*qualified\)\?\s*\([^( ]\+\)')
+  if ml!=[]
+    let [_,q,mod;x] = ml
+    silent make
+    if getqflist()==[]
+      if line=~"import[^(]*Prelude"
+        call setline(lineno,substitute(line,"(.*","","").'()')
+      else
+        call setline(lineno,'-- '.line)
+      endif
+      silent write
+      silent make
+      let qflist = getqflist()
+      call setline(lineno,line)
+      silent write
+      let ids = {}
+      for d in qflist
+        let ml = matchlist(d.text,'Not in scope: \([^`]*\)`\([^'']*\)''')
+        if ml!=[]
+          let [_,what,qid;x] = ml
+          let id  = ( qid =~ "^[A-Z]" ? substitute(qid,'.*\.\([^.]*\)$','\1','') : qid )
+          let pid = ( id =~ "[a-zA-Z0-9_']\\+" ? id : '('.id.')' )
+          if what =~ "data"
+            call GHC_HaveTypes()
+            if has_key(b:ghc_types,id)
+              let pid = substitute(b:ghc_types[id],'^.*->\s*\(\S*\).*$','\1','').'('.pid.')'
+            else
+              let pid = '???('.pid.')'
+            endif
+          endif
+          let ids[pid] = 1
+        endif
+      endfor
+      call setline(lineno,'import'.q.' '.mod.'('.join(keys(ids),',').')')
+    else
+      copen
+    endif
+  endif
+  call setpos('.', save_cursor)
+endfunction
+
+" no need to ask GHC about its supported languages and
+" options with every editing session. cache the info in
+" ~/.vim/haskellmode.config 
+" TODO: should we store more info (see haskell_doc.vim)?
+"       move to autoload?
+"       should we keep a history of GHC versions encountered?
+function! GHC_SaveConfig()
+  let vimdir = expand('~').'/'.'.vim'
+  let config = vimdir.'/haskellmode.config'
+  if !isdirectory(vimdir)
+    call mkdir(vimdir)
+  endif
+  let entries = ['-- '.g:ghc_version]
+  for l in s:ghc_supported_languages
+    let entries += [l]
+  endfor
+  let entries += ['--']
+  for l in s:opts
+    let entries += [l]
+  endfor
+  call writefile(entries,config)
+endfunction
+
+" reuse cached GHC configuration info, if using the same
+" GHC version.
+function! GHC_LoadConfig()
+  let vimdir = expand('~').'/'.'.vim'
+  let config = vimdir.'/haskellmode.config'
+  if filereadable(config)
+    let lines = readfile(config)
+    if lines[0]=='-- '.g:ghc_version
+      let i=1
+      let s:ghc_supported_languages = []
+      while i<len(lines) && lines[i]!='--'
+        let s:ghc_supported_languages += [lines[i]]
+        let i+=1
+      endwhile
+      let i+=1
+      let s:opts = []
+      while i<len(lines)
+        let s:opts += [lines[i]]
+        let i+=1
+      endwhile
+      return 1
+    else
+      return 0
+    endif
+  else
+    return 0
+  endif
+endfunction
+
+let s:GHC_CachedConfig = haskellmode#GHC_VersionGE([6,8]) && GHC_LoadConfig()
+
+if haskellmode#GHC_VersionGE([6,8,2])
+  if !s:GHC_CachedConfig
+    let s:opts = filter(split(substitute(system(g:ghc . ' -v0 --interactive', ':set'), '  ', '','g'), '\n'), 'v:val =~ "-f"')
+  endif
+else
+  let s:opts = ["-fglasgow-exts","-fallow-undecidable-instances","-fallow-overlapping-instances","-fno-monomorphism-restriction","-fno-mono-pat-binds","-fno-cse","-fbang-patterns","-funbox-strict-fields"]
+endif
+let s:opts = sort(s:opts)
+
+amenu ]OPTIONS_GHC.- :echo '-'<cr>
+aunmenu ]OPTIONS_GHC
+for o in s:opts
+  exe 'amenu ]OPTIONS_GHC.'.o.' :call append(0,"{-# OPTIONS_GHC '.o.' #-}")<cr>'
+endfor
+if has("gui_running")
+  map <LocalLeader>opt :popup ]OPTIONS_GHC<cr>
+else
+  map <LocalLeader>opt :emenu ]OPTIONS_GHC.
+endif
+
+amenu ]LANGUAGES_GHC.- :echo '-'<cr>
+aunmenu ]LANGUAGES_GHC
+if haskellmode#GHC_VersionGE([6,8])
+  if !s:GHC_CachedConfig
+    let s:ghc_supported_languages = sort(split(system(g:ghc . ' --supported-languages'),'\n'))
+  endif
+  for l in s:ghc_supported_languages
+    exe 'amenu ]LANGUAGES_GHC.'.l.' :call append(0,"{-# LANGUAGE '.l.' #-}")<cr>'
+  endfor
+  if has("gui_running")
+    map <LocalLeader>lang :popup ]LANGUAGES_GHC<cr>
+  else
+    map <LocalLeader>lang :emenu ]LANGUAGES_GHC.
+  endif
+endif
+
+if !s:GHC_CachedConfig
+  call GHC_SaveConfig()
+endif
+