[package-plan] 01/01: Remove patches of removed packages

Joachim Breitner nomeata at moszumanska.debian.org
Mon Jul 27 18:02:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository package-plan.

commit 097766fee113c1dcb556b9b5c49d430155df74e7
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Jul 27 20:02:27 2015 +0200

    Remove patches of removed packages
---
 patches/AMI/0.1/hide-network-socket-close.diff     |   13 -
 patches/AMI/0.1/series                             |    1 -
 patches/HFuse/0.1.0/new-exceptions.diff            |   22 -
 patches/HFuse/0.1.0/series                         |    1 -
 patches/HFuse/0.2.4.1/ghc-7.6.patch                |   80 -
 patches/HFuse/0.2.4.1/series                       |    1 -
 patches/HGL/3.2.0.2/00-cabal-rules.patch           |   16 -
 patches/HGL/3.2.0.2/01-new-exceptions.patch        |   33 -
 patches/HGL/3.2.0.2/02-exceptions.patch            |   65 -
 patches/HGL/3.2.0.2/03-channel.patch               |   46 -
 patches/HGL/3.2.0.2/series                         |    4 -
 patches/OSM/0.6.4/no-comonad-transformers.patch    |   18 -
 patches/OSM/0.6.4/series                           |    1 -
 patches/data-lens/2.10.5/new-semigroupoids         |   13 -
 patches/data-lens/2.10.5/series                    |    1 -
 patches/download-curl/0.1.4/newer-tagsoup.patch    |   15 -
 patches/download-curl/0.1.4/series                 |    1 -
 patches/io-streams/1.3.0.0/no-bytestring-builder   |   24 -
 patches/io-streams/1.3.0.0/series                  |    1 -
 .../0.12.1.2/ghc-7.6-compatibility.patch           | 1846 --------------------
 patches/leksah-server/0.12.1.2/series              |    1 -
 .../leksah-server/0.14.0.1/no-attoparsec-conduit   |   31 -
 patches/leksah-server/0.14.0.1/series              |    1 -
 .../leksah/0.12.1.3/ghc-7.6-compatibility.patch    |  200 ---
 .../leksah/0.12.1.3/quickcheck-2.7-compat.patch    |   31 -
 patches/leksah/0.12.1.3/regex-tdfa-1.2.patch       |   22 -
 patches/leksah/0.12.1.3/series                     |    3 -
 patches/leksah/0.14.1.1/no-hamlet                  |   13 -
 patches/leksah/0.14.1.1/series                     |    1 -
 patches/ltk/0.12.1.0/ghc-7.6-compatibility.patch   |   67 -
 patches/ltk/0.12.1.0/series                        |    1 -
 .../reform-hamlet/0.0.4/newer-blaze-markup.diff    |   11 -
 patches/reform-hamlet/0.0.4/series                 |    1 -
 patches/simpleirc/0.2.1/new-exceptions.diff        |   12 -
 patches/simpleirc/0.2.1/series                     |    1 -
 patches/snap-loader-dynamic/0.10.0.2/new-mtl       |   13 -
 patches/snap-loader-dynamic/0.10.0.2/series        |    1 -
 37 files changed, 2612 deletions(-)

diff --git a/patches/AMI/0.1/hide-network-socket-close.diff b/patches/AMI/0.1/hide-network-socket-close.diff
deleted file mode 100644
index 077e9ed..0000000
--- a/patches/AMI/0.1/hide-network-socket-close.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: haskell-ami-0.1/Network/AMI.hs
-===================================================================
---- haskell-ami-0.1.orig/Network/AMI.hs	2012-01-16 05:58:28.000000000 +0000
-+++ haskell-ami-0.1/Network/AMI.hs	2012-10-20 19:43:18.499382941 +0000
-@@ -32,7 +32,7 @@
- import Data.Digest.Pure.MD5
- import System.IO.Unsafe (unsafePerformIO)
- import Network
--import Network.Socket
-+import Network.Socket hiding (close)
- import System.IO
- 
- {- $usage
diff --git a/patches/AMI/0.1/series b/patches/AMI/0.1/series
deleted file mode 100644
index 94c6d4f..0000000
--- a/patches/AMI/0.1/series
+++ /dev/null
@@ -1 +0,0 @@
-hide-network-socket-close.diff
diff --git a/patches/HFuse/0.1.0/new-exceptions.diff b/patches/HFuse/0.1.0/new-exceptions.diff
deleted file mode 100644
index aa6a515..0000000
--- a/patches/HFuse/0.1.0/new-exceptions.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: haskell-tinyurl-0.1.0/Network/TinyURL.hs
-===================================================================
---- haskell-tinyurl-0.1.0.orig/Network/TinyURL.hs	2009-02-16 19:19:31.000000000 +0000
-+++ haskell-tinyurl-0.1.0/Network/TinyURL.hs	2012-11-10 17:09:05.063668586 +0000
-@@ -1,5 +1,8 @@
-+{-# LANGUAGE ScopedTypeVariables #-}
-+
- module Network.TinyURL (tinyURL) where
- 
-+import Control.Exception.Base (catch, IOException)
- import Network.HTTP
- import Network.URI
- 
-@@ -7,7 +10,7 @@
- -- the original URL.
- tinyURL :: String -> IO String
- tinyURL url = do
--  result <- simpleHTTP request `catch` (const . return $ Left undefined)
-+  result <- simpleHTTP request `catch` (\(_ :: IOException) -> return $ Left undefined)
-   case result of
-     Left _ -> return url
-     Right response -> return $ rspBody response
diff --git a/patches/HFuse/0.1.0/series b/patches/HFuse/0.1.0/series
deleted file mode 100644
index e60c9c0..0000000
--- a/patches/HFuse/0.1.0/series
+++ /dev/null
@@ -1 +0,0 @@
-new-exceptions.diff
diff --git a/patches/HFuse/0.2.4.1/ghc-7.6.patch b/patches/HFuse/0.2.4.1/ghc-7.6.patch
deleted file mode 100644
index bcbb7e4..0000000
--- a/patches/HFuse/0.2.4.1/ghc-7.6.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 45650d8e743762004ce3949f11475b4eadbe384c Mon Sep 17 00:00:00 2001
-From: Amit Aryeh Levy <amit at amitlevy.com>
-Date: Mon, 19 Nov 2012 13:14:06 -0800
-Subject: [PATCH] Fixed compilation bugs for GHC 7.6
-
----
- System/Fuse.hsc | 29 +++++++++++++++--------------
- 1 file changed, 15 insertions(+), 14 deletions(-)
-
-diff --git a/System/Fuse.hsc b/System/Fuse.hsc
-index f7347fd..1169e05 100644
---- a/System/Fuse.hsc
-+++ b/System/Fuse.hsc
-@@ -20,7 +20,7 @@
- -- option).
- --
- -----------------------------------------------------------------------------
--{-# LANGUAGE FlexibleContexts #-}
-+{-# LANGUAGE FlexibleContexts, RankNTypes #-}
- module System.Fuse
-     ( -- * Using FUSE
- 
-@@ -52,7 +52,7 @@ module System.Fuse
- import Prelude hiding ( Read )
- 
- import Control.Monad
--import Control.Exception as E(Exception, handle, finally, SomeException)
-+import Control.Exception as E(catch, Exception, IOException, handle, finally, SomeException)
- import qualified Data.ByteString.Char8    as B
- import qualified Data.ByteString.Internal as B
- import qualified Data.ByteString.Unsafe   as B
-@@ -70,7 +70,7 @@ import System.Posix.IO ( OpenMode(..), OpenFileFlags(..) )
- import qualified System.Posix.Signals as Signals
- import GHC.IO.Handle(hDuplicateTo)
- import System.Exit
--import qualified System.IO.Error as IO(catch,ioeGetErrorString)
-+import qualified System.IO.Error as IO(ioeGetErrorString)
- 
- -- TODO: FileMode -> Permissions
- -- TODO: Arguments !
-@@ -757,16 +757,17 @@ fuseParseCommandLine pArgs =
- -- Mimic's daemon()s use of _exit() instead of exit(); we depend on this in fuseMainReal,
- -- because otherwise we'll unmount the filesystem when the foreground process exits.
- daemon f = forkProcess d >> exitImmediately ExitSuccess
--  where d = IO.catch (do createSession
--                         changeWorkingDirectory "/"
--                         -- need to open /dev/null twice because hDuplicateTo can't dup a ReadWriteMode to a ReadMode handle
--                         withFile "/dev/null" WriteMode (\devNullOut ->
--                           do hDuplicateTo devNullOut stdout
--                              hDuplicateTo devNullOut stderr)
--                         withFile "/dev/null" ReadMode (\devNullIn -> hDuplicateTo devNullIn stdin)
--                         f
--                         exitWith ExitSuccess)
--                     (const exitFailure)
-+  where d = E.catch (do 
-+                        createSession
-+                        changeWorkingDirectory "/"
-+                        -- need to open /dev/null twice because hDuplicateTo can't dup a ReadWriteMode to a ReadMode handle
-+                        withFile "/dev/null" WriteMode (\devNullOut ->
-+                          do hDuplicateTo devNullOut stdout
-+                             hDuplicateTo devNullOut stderr)
-+                        withFile "/dev/null" ReadMode (\devNullIn -> hDuplicateTo devNullIn stdin)
-+                        f
-+                        exitWith ExitSuccess)
-+                     (\(_ :: IOException) -> exitFailure)
- 
- -- Installs signal handlers for the duration of the main loop.
- withSignalHandlers exitHandler f =
-@@ -843,7 +844,7 @@ fuseMain ops handler = do
- 
- fuseRun :: String -> [String] -> Exception e => FuseOperations fh -> (e -> IO Errno) -> IO ()
- fuseRun prog args ops handler =
--    IO.catch
-+    E.catch
-        (withFuseArgs prog args (\pArgs ->
-          do cmd <- fuseParseCommandLine pArgs
-             case cmd of
--- 
-1.8.1.5
-
diff --git a/patches/HFuse/0.2.4.1/series b/patches/HFuse/0.2.4.1/series
deleted file mode 100644
index a7a7cb4..0000000
--- a/patches/HFuse/0.2.4.1/series
+++ /dev/null
@@ -1 +0,0 @@
-ghc-7.6.patch
diff --git a/patches/HGL/3.2.0.2/00-cabal-rules.patch b/patches/HGL/3.2.0.2/00-cabal-rules.patch
deleted file mode 100644
index c05876c..0000000
--- a/patches/HGL/3.2.0.2/00-cabal-rules.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Change cabal file to include proper dependencies for
- building with GHC 7.4.
-Forwarded: yes
-Author: Ernesto Hernández-Novich (USB) <emhn at usb.ve>
-
---- a/HGL.cabal
-+++ b/HGL.cabal
-@@ -22,7 +22,7 @@
- 
- library
-   if flag(split-base)
--    build-depends: base >= 3 && < 4, array
-+    build-depends: base >= 3, array, stm
-   else
-     build-depends: base < 2
-   exposed-modules:
diff --git a/patches/HGL/3.2.0.2/01-new-exceptions.patch b/patches/HGL/3.2.0.2/01-new-exceptions.patch
deleted file mode 100644
index 667de2d..0000000
--- a/patches/HGL/3.2.0.2/01-new-exceptions.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Description: Convert old-style try/catch to new-style Control.Exception
- style. This gets rids of several compilation warnings. I left this
- patch separate because I removed an #ifdef and am not sure if this is
- the best way to solve the issue.
-Forwarded: yes
-Author: Ernesto Hernández-Novich <emhn at usb.ve>
-
---- a/Graphics/HGL/Internals/Utilities.hs
-+++ b/Graphics/HGL/Internals/Utilities.hs
-@@ -20,7 +20,7 @@
-         modMVar, modMVar_
- 	) where
- 
--import qualified Control.Exception as E (bracket, try, IOException, tryJust, ioErrors)
-+import qualified Control.Exception as E (bracket, try, IOException, tryJust)
- import Control.Concurrent( MVar, takeMVar, putMVar )
- 
- bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
-@@ -32,14 +32,7 @@
- 
- type Exception = E.IOException
- safeTry :: IO a -> IO (Either Exception a)
--
--#if __GLASGOW_HASKELL >= 610 
---- ghc-6.10
- safeTry = E.try
--#else
---- ghc 6.8 (and below?)
--safeTry = E.tryJust E.ioErrors
--#endif
- 
- 
- ----------------------------------------------------------------
diff --git a/patches/HGL/3.2.0.2/02-exceptions.patch b/patches/HGL/3.2.0.2/02-exceptions.patch
deleted file mode 100644
index 8d527e0..0000000
--- a/patches/HGL/3.2.0.2/02-exceptions.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Description: Convert old-style try/catch to new-style Control.Exception
- style. This gets rids of several compilation warnings.
-Forwarded: yes
-Author: Ernesto Hernández-Novich <emhn at usb.ve>
-
---- a/Graphics/HGL/X11/Display.hs
-+++ b/Graphics/HGL/X11/Display.hs
-@@ -1,3 +1,5 @@
-+{-# LANGUAGE ScopedTypeVariables #-}
-+
- -- #hide
- module Graphics.HGL.X11.Display
- 	( getDisplayName
-@@ -14,12 +16,13 @@
- import Control.Monad (when)
- import Data.Maybe (isJust)
- import System.Environment (getEnv)
--import System.IO.Error (try)
- import System.IO.Unsafe (unsafePerformIO)
- 
-+import qualified Control.Exception as CE
-+
- getDisplayName :: IO String
- getDisplayName = do
--  disp <- try (getEnv "DISPLAY")
-+  disp <- CE.try (getEnv "DISPLAY") :: IO (Either CE.IOException String)
-   return (either (const ":0.0") id disp)
- 
- displayRef :: MVar (Maybe X.Display)
-@@ -32,8 +35,9 @@
-   openDisplay'
-  where
-   openDisplay' = do      
--    display <- X.openDisplay host `catch` \ err -> 
--                 ioError (userError ("Unable to open X display " ++ host))
-+    display <- X.openDisplay host
-+               `CE.catch`
-+               (\(e :: CE.SomeException) -> ioError $ userError $ "Unable to open X display " ++ host)
-     modMVar displayRef (const $ Just display)
-     return display
- 
---- a/Graphics/HGL/X11/Types.hs
-+++ b/Graphics/HGL/X11/Types.hs
-@@ -1,3 +1,4 @@
-+{-# LANGUAGE ScopedTypeVariables #-}
- -----------------------------------------------------------------------------
- -- |
- -- Module      :  Graphics.HGL.X11.Types
-@@ -26,6 +27,7 @@
- import Graphics.HGL.Internals.Types
- 
- import qualified Graphics.X11.Xlib as X
-+import qualified Control.Exception as CE
- 
- import Control.Concurrent.MVar (MVar)
- import Data.Bits
-@@ -84,7 +86,7 @@
-   (X.Color p _ _ _ _) <-
-       X.allocColor display color_map (X.Color 0 r g b xcolor_flags)
-   return p)
--     `catch` \ err -> 
-+     `CE.catch` \(err :: CE.SomeException) ->
-                print err >> return 0
- --	       ioError (userError ("Error: " ++ show err
- --			      ++ "\nUnable to allocate colo[u]r " ++ show (r,g,b) 
diff --git a/patches/HGL/3.2.0.2/03-channel.patch b/patches/HGL/3.2.0.2/03-channel.patch
deleted file mode 100644
index 1022a08..0000000
--- a/patches/HGL/3.2.0.2/03-channel.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: Stop using Control.Concurrent.Chan and migrate to the
- more modern Control.Concurrent.STM.TChan. Migration was triggered
- by the fact that the library needs isEmptyChan and GHC 7.4 suggest
- using STM's version instead.
-Forwarded: yes
-Author: Ernesto Hernández-Novich (USB) <emhn at usb.ve>
-
---- a/Graphics/HGL/Internals/Events.hs
-+++ b/Graphics/HGL/Internals/Events.hs
-@@ -20,7 +20,8 @@
- 
- import Graphics.HGL.Internals.Event
- import Graphics.HGL.Internals.Flag
--import Control.Concurrent.Chan(Chan, newChan, readChan, writeChan, isEmptyChan)
-+import Control.Concurrent.STM (atomically)
-+import Control.Concurrent.STM.TChan (TChan, newTChan, readTChan, writeTChan, isEmptyTChan)
- 
- ----------------------------------------------------------------
- -- Interface
-@@ -37,7 +38,7 @@
- -- of the Graphics library).  Exposure events in X11 behave in a
- -- similar way except that they do not overtake other events.)
- 
--data Events = Events { events :: Chan Event
-+data Events = Events { events :: TChan Event
-                      , tick   :: Flag ()
-                      }
- 
-@@ -53,13 +54,13 @@
- ----------------------------------------------------------------
- 
- newEvents = do
--  events <- newChan 
-+  events <- atomically $ newTChan
-   tick   <- newFlag
-   return (Events { events=events, tick=tick })
- 
--getEvent  evs = readChan    (events evs)
--isNoEvent evs = isEmptyChan (events evs)
--sendEvent evs = writeChan   (events evs)
-+getEvent  evs = atomically $ readTChan    (events evs)
-+isNoEvent evs = atomically $ isEmptyTChan (events evs)
-+sendEvent evs = atomically . writeTChan   (events evs)
- sendTick  evs = setFlag     (tick evs) ()
- getTick   evs = resetFlag   (tick evs)
- 
diff --git a/patches/HGL/3.2.0.2/series b/patches/HGL/3.2.0.2/series
deleted file mode 100644
index 15f9378..0000000
--- a/patches/HGL/3.2.0.2/series
+++ /dev/null
@@ -1,4 +0,0 @@
-00-cabal-rules.patch
-01-new-exceptions.patch
-02-exceptions.patch
-03-channel.patch
diff --git a/patches/OSM/0.6.4/no-comonad-transformers.patch b/patches/OSM/0.6.4/no-comonad-transformers.patch
deleted file mode 100644
index 8ac6832..0000000
--- a/patches/OSM/0.6.4/no-comonad-transformers.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Do not use comonad-transformers (now part of comonad)
-Author: Colin Watson <cjwatson at debian.org>
-Forwarded: no
-Last-Update: 2013-11-25
-
-Index: b/OSM.cabal
-===================================================================
---- a/OSM.cabal
-+++ b/OSM.cabal
-@@ -24,7 +24,7 @@
-                       , hxt >= 9
-                       , containers
-                       , data-lens
--                      , comonad-transformers
-+                      , comonad >= 4
-                       , newtype
- 
-   GHC-Options:        -Wall
diff --git a/patches/OSM/0.6.4/series b/patches/OSM/0.6.4/series
deleted file mode 100644
index e6c329a..0000000
--- a/patches/OSM/0.6.4/series
+++ /dev/null
@@ -1 +0,0 @@
-no-comonad-transformers.patch
diff --git a/patches/data-lens/2.10.5/new-semigroupoids b/patches/data-lens/2.10.5/new-semigroupoids
deleted file mode 100644
index a69cfdc..0000000
--- a/patches/data-lens/2.10.5/new-semigroupoids
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: data-lens-2.10.5/data-lens.cabal
-===================================================================
---- data-lens-2.10.5.orig/data-lens.cabal	2014-09-07 12:04:37.019951746 +0200
-+++ data-lens-2.10.5/data-lens.cabal	2014-09-07 12:04:54.783951128 +0200
-@@ -27,7 +27,7 @@
-     base                 >= 4       && < 5,
-     comonad              >= 4.0     && < 4.3,
-     containers           >= 0.3     && < 0.6,
--    semigroupoids        >= 4.0     && < 4.1,
-+    semigroupoids        >= 4.0     && < 4.3,
-     transformers         >= 0.2.0   && < 0.5
- 
-   if flag(DeriveDataTypeable)
diff --git a/patches/data-lens/2.10.5/series b/patches/data-lens/2.10.5/series
deleted file mode 100644
index b46d1c4..0000000
--- a/patches/data-lens/2.10.5/series
+++ /dev/null
@@ -1 +0,0 @@
-new-semigroupoids
diff --git a/patches/download-curl/0.1.4/newer-tagsoup.patch b/patches/download-curl/0.1.4/newer-tagsoup.patch
deleted file mode 100644
index e20dac2..0000000
--- a/patches/download-curl/0.1.4/newer-tagsoup.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Allow tagsoup 0.13
-Author: Colin Watson <cjwatson at debian.org>
-Forwarded: https://lists.debian.org/debian-haskell/2014/01/msg00002.html
-Last-Update: 2014-01-01
-
-Index: b/download-curl.cabal
-===================================================================
---- a/download-curl.cabal
-+++ b/download-curl.cabal
-@@ -56,4 +56,4 @@
-         build-depends:   base >= 3 && < 6, bytestring
-     else
-         build-depends:   base > 3 && < 4
--    build-depends: curl, tagsoup >= 0.8 && < 0.13, feed, xml
-+    build-depends: curl, tagsoup >= 0.8 && < 0.14, feed, xml
diff --git a/patches/download-curl/0.1.4/series b/patches/download-curl/0.1.4/series
deleted file mode 100644
index bcd1eb9..0000000
--- a/patches/download-curl/0.1.4/series
+++ /dev/null
@@ -1 +0,0 @@
-newer-tagsoup.patch
diff --git a/patches/io-streams/1.3.0.0/no-bytestring-builder b/patches/io-streams/1.3.0.0/no-bytestring-builder
deleted file mode 100644
index 852644c..0000000
--- a/patches/io-streams/1.3.0.0/no-bytestring-builder
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: io-streams-1.3.0.0/io-streams.cabal
-===================================================================
---- io-streams-1.3.0.0.orig/io-streams.cabal	2015-05-08 11:09:57.556715058 +0200
-+++ io-streams-1.3.0.0/io-streams.cabal	2015-05-08 11:10:31.226159507 +0200
-@@ -119,8 +119,7 @@
- 
-   Build-depends:     base               >= 4     && <5,
-                      attoparsec         >= 0.10  && <0.13,
--                     bytestring         >= 0.9   && <0.11,
--                     bytestring-builder >= 0.10  && <0.11,
-+                     bytestring         >= 0.10.4 && <0.11,
-                      network            >= 2.3   && <2.7,
-                      primitive          >= 0.2   && <0.7,
-                      process            >= 1.1   && <1.3,
-@@ -200,8 +199,7 @@
- 
-   Build-depends:     base               >= 4     && <5,
-                      attoparsec         >= 0.10  && <0.13,
--                     bytestring         >= 0.9   && <0.11,
--                     bytestring-builder >= 0.10  && <0.11,
-+                     bytestring         >= 0.10.4   && <0.11,
-                      deepseq            >= 1.2   && <1.5,
-                      directory          >= 1.1   && <2,
-                      filepath           >= 1.2   && <2,
diff --git a/patches/io-streams/1.3.0.0/series b/patches/io-streams/1.3.0.0/series
deleted file mode 100644
index d61cbb2..0000000
--- a/patches/io-streams/1.3.0.0/series
+++ /dev/null
@@ -1 +0,0 @@
-no-bytestring-builder
diff --git a/patches/leksah-server/0.12.1.2/ghc-7.6-compatibility.patch b/patches/leksah-server/0.12.1.2/ghc-7.6-compatibility.patch
deleted file mode 100644
index 9452efd..0000000
--- a/patches/leksah-server/0.12.1.2/ghc-7.6-compatibility.patch
+++ /dev/null
@@ -1,1846 +0,0 @@
-From dc892c956ce07b3386778fc1fe7597adb9f8505b Mon Sep 17 00:00:00 2001
-From: Hamish Mackenzie <Hamish.K.Mackenzie at googlemail.com>
-Date: Wed, 10 Oct 2012 17:24:49 +1300
-Subject: [PATCH] GHC 7.6 fixes (Iain Lane: slightly modified for Debian)
-
----
- leksah-server.cabal                    |  44 +++---
- src/IDE/Core/CTypes.hs                 |   2 +
- src/IDE/HeaderParser.hs                |  50 +++---
- src/IDE/Metainfo/InterfaceCollector.hs | 122 +++++++++------
- src/IDE/Metainfo/PackageCollector.hs   |  13 +-
- src/IDE/Metainfo/SourceCollectorH.hs   | 271 ++++++++++++++++++++-------------
- src/IDE/Metainfo/WorkspaceCollector.hs | 228 +++++++++++++++++----------
- src/IDE/Utils/FileUtils.hs             |  41 ++---
- src/IDE/Utils/GHCUtils.hs              |  38 ++++-
- src/IDE/Utils/Server.hs                |   9 +-
- src/IDE/Utils/VersionUtils.hs          |   9 +-
- 11 files changed, 519 insertions(+), 308 deletions(-)
-
-Index: b/leksah-server.cabal
-===================================================================
---- a/leksah-server.cabal
-+++ b/leksah-server.cabal
-@@ -32,22 +32,25 @@
- 
- library
-     default-language: Haskell98
--    build-depends: Cabal >=1.6.0.1 && <1.15, base >= 4.0.0.0 && <4.6, binary >=0.5.0.0 && <0.6,
--               binary-shared >=0.8 && <0.9, bytestring >=0.9.0.1 && <0.10,
--               containers >=0.2.0.0 && <0.5,
--               directory >=1.0.0.2 && <1.2, filepath >=1.1.0.1 && <1.4, ghc >=6.10.1 && <7.5,
-+    build-depends: Cabal >=1.6.0.1 && <1.17, base >= 4.0.0.0 && <4.7, binary >=0.5.0.0 && <0.6,
-+               binary-shared >=0.8 && <0.9, bytestring >=0.9.0.1 && <0.11,
-+               containers >=0.2.0.0 && <0.6,
-+               directory >=1.0.0.2 && <1.3, filepath >=1.1.0.1 && <1.4, ghc >=6.10.1 && <7.7,
-                ltk >=0.12.1.0 && <0.13, parsec >=2.1.0.1 && <3.2,
-                pretty >=1.0.1.0 && <1.2, time >=1.1 && <1.5, deepseq >=1.1 && <1.4,
--               hslogger >= 1.0.7 && <1.2, network >=2.2 && <3.0, enumerator >=0.4.14 && < 0.5,
-+               hslogger >= 1.0.7 && <1.3, network >=2.2 && <3.0, enumerator >=0.4.14 && < 0.5,
-                attoparsec-enumerator >=0.3 && <0.4, attoparsec >=0.10.0.3 && <0.11,
-                transformers >=0.2.2.0 && <0.4, strict >=0.3.2 && <0.4
- 
-     if (impl(ghc >= 7.2))
-         binary-shared >=0.8.2
- 
--    if (impl(ghc >= 7.4))
--       build-depends: haddock >= 2.7.2 && <2.11
-+    if (impl(ghc >= 7.6))
-+       build-depends: haddock >= 2.7.2 && <2.14
-     else
-+     if (impl(ghc >= 7.4))
-+        build-depends: haddock >= 2.7.2 && <2.11
-+     else
-        if (impl(ghc >= 7.2))
-           build-depends: haddock >= 2.7.2 && <2.10
-        else
-@@ -68,7 +71,7 @@
-         build-depends: Win32 >=2.2.0.0 && <2.3
-         extra-libraries: kernel32  pango-1.0 glib-2.0
-     else
--        build-depends: unix >=2.3.1.0 && <2.6
-+        build-depends: unix >=2.3.1.0 && <2.7
- 
-     if flag(curl) || os(osx)
-         cpp-options: -DUSE_CURL
-@@ -96,18 +99,21 @@
- 
- executable leksah-server
-     default-language: Haskell98
--    build-depends: Cabal >=1.6.0.1 && <1.15, base >= 4.0.0.0 && <4.6, binary >=0.5.0.0 && <0.6,
--               binary-shared >=0.8 && <0.9, bytestring >=0.9.0.1 && <0.10,
--               containers >=0.2.0.0 && <0.5,
--               directory >=1.0.0.2 && <1.2, filepath >=1.1.0.1 && <1.6, ghc >=6.10.1 && <7.5,
-+    build-depends: Cabal >=1.6.0.1 && <1.17, base >= 4.0.0.0 && <4.7, binary >=0.5.0.0 && <0.6,
-+               binary-shared >=0.8 && <0.9, bytestring >=0.9.0.1 && <0.11,
-+               containers >=0.2.0.0 && <0.6,
-+               directory >=1.0.0.2 && <1.3, filepath >=1.1.0.1 && <1.6, ghc >=6.10.1 && <7.7,
-                ltk >=0.12.1.0 && <0.13, parsec >=2.1.0.1 && <3.2,
-                pretty >=1.0.1.0 && <1.2, time >=1.1 && <1.5, deepseq >=1.1 && <1.4,
--               hslogger >= 1.0.7 && <1.2, network >=2.2 && <3.0, enumerator >= 0.4.14 && <0.5,
-+               hslogger >= 1.0.7 && <1.3, network >=2.2 && <3.0, enumerator >= 0.4.14 && <0.5,
-                attoparsec-enumerator >=0.3 && <0.4, attoparsec >=0.10.0.3 && <0.11,
-                transformers >=0.2.2.0 && <0.4, strict >=0.3.2 && <0.4
--    if (impl(ghc >= 7.4))
--       build-depends: haddock >= 2.7.2 && <2.11
-+    if (impl(ghc >= 7.6))
-+       build-depends: haddock >= 2.7.2 && <2.14
-     else
-+     if (impl(ghc >= 7.4))
-+        build-depends: haddock >= 2.7.2 && <2.11
-+     else
-        if (impl(ghc >= 7.2))
-           build-depends: haddock >= 2.7.2 && <2.10
-        else
-@@ -128,7 +134,7 @@
-         build-depends: Win32 >=2.2.0.0 && <2.3
-         extra-libraries: kernel32 pango-1.0 glib-2.0
-     else
--        build-depends: unix >=2.3.1.0 && <2.6
-+        build-depends: unix >=2.3.1.0 && <2.7
- 
-     if flag(curl) || os(osx)
-         cpp-options: -DUSE_CURL
-@@ -167,8 +173,8 @@
-     hs-source-dirs: src
-     ghc-prof-options: -auto-all -prof
- --    ghc-shared-options: -auto-all -prof
--    build-depends:  base >= 4.0.0.0 && <4.6, hslogger >= 1.0.7 && <1.2, deepseq >=1.1 && <1.4,
--               bytestring >=0.9.0.1 && <0.10, enumerator >= 0.4.14 && <0.5,
-+    build-depends:  base >= 4.0.0.0 && <4.7, hslogger >= 1.0.7 && <1.3, deepseq >=1.1 && <1.4,
-+               bytestring >=0.9.0.1 && <0.11, enumerator >= 0.4.14 && <0.5,
-                attoparsec-enumerator >=0.3 && <0.4, attoparsec >=0.10.0.3 && <0.11,
-                transformers >=0.2.2.0 && <0.4
- 
-@@ -190,7 +196,7 @@
-     type:       exitcode-stdio-1.0
-     hs-source-dirs: tests
-     main-is:    TestTool.hs
--    build-depends: base >= 4.0.0.0 && <4.6,  hslogger >= 1.0.7 && <1.3,
-+    build-depends: base >= 4.0.0.0 && <4.7,  hslogger >= 1.0.7 && <1.3,
-                leksah-server,
-                HUnit >=1.2 && <1.3, transformers >=0.2.2.0 && <0.4, enumerator >=0.4.14 && <0.5
- 
-Index: b/src/IDE/Core/CTypes.hs
-===================================================================
---- a/src/IDE/Core/CTypes.hs
-+++ b/src/IDE/Core/CTypes.hs
-@@ -542,7 +542,9 @@
- 
- instance NFData DescrType where  rnf a = seq a ()
- 
-+#if !MIN_VERSION_bytestring(0,10,0)
- instance NFData BS.ByteString where  rnf b = seq b ()
-+#endif
- 
- #if !MIN_VERSION_deepseq(1,3,0)
- instance NFData Version where  rnf v = seq v ()
-Index: b/src/IDE/HeaderParser.hs
-===================================================================
---- a/src/IDE/HeaderParser.hs
-+++ b/src/IDE/HeaderParser.hs
-@@ -21,17 +21,31 @@
- import IDE.Core.CTypes hiding(SrcSpan(..))
- import GHC hiding (ImportDecl)
- import FastString(unpackFS)
--import RdrName(showRdrName)
- import IDE.Utils.GHCUtils
- import Data.Maybe (mapMaybe)
- #if MIN_VERSION_ghc(7,4,1)
--import Outputable(pprPrefixOcc,showSDoc)
-+import Outputable(pprPrefixOcc, ppr)
- #else
--import Outputable(pprHsVar,showSDoc)
-+import Outputable(pprHsVar, ppr)
-+#endif
-+#if MIN_VERSION_ghc(7,6,0)
-+import Outputable(showSDoc)
-+#else
-+import qualified Outputable as O
- #endif
- import IDE.Utils.FileUtils (figureOutHaddockOpts)
- import Control.Monad.IO.Class (MonadIO(..))
- 
-+#if !MIN_VERSION_ghc(7,6,0)
-+showSDoc :: DynFlags -> O.SDoc -> String
-+showSDoc _ = O.showSDoc
-+showSDocUnqual :: DynFlags -> O.SDoc -> String
-+showSDocUnqual _ = O.showSDocUnqual
-+#endif
-+
-+showRdrName :: DynFlags -> RdrName -> String
-+showRdrName dflags r = showSDoc dflags (ppr r)
-+
- parseTheHeader :: FilePath -> IO ServerAnswer
- parseTheHeader filePath = do
-     text        <- readFile filePath
-@@ -39,7 +53,7 @@
-     parseResult <- liftIO $ myParseHeader filePath text opts
-     case parseResult of
-         Left str                                      -> return (ServerFailed str)
--        Right (pr at HsModule{ hsmodImports = []})       -> do
-+        Right (_, pr at HsModule{ hsmodImports = []})       -> do
-             let i = case hsmodDecls pr of
-                         decls@(_hd:_tl) -> (foldl (\ a b -> min a (srcSpanStartLine' (getLoc b))) 0 decls) - 1
-                         [] -> case hsmodExports pr of
-@@ -48,13 +62,13 @@
-                                         Nothing -> 0
-                                         Just mn -> srcSpanEndLine' (getLoc mn) + 2
-             return (ServerHeader (Right i))
--        Right (_pr at HsModule{ hsmodImports = imports }) -> return (ServerHeader (Left (transformImports imports)))
-+        Right (dflags, _pr at HsModule{ hsmodImports = imports }) -> return (ServerHeader (Left (transformImports dflags imports)))
- 
--transformImports :: [LImportDecl RdrName] -> [ImportDecl]
--transformImports = map transformImport
-+transformImports :: DynFlags -> [LImportDecl RdrName] -> [ImportDecl]
-+transformImports dflags = map (transformImport dflags)
- 
--transformImport ::  LImportDecl RdrName -> ImportDecl
--transformImport (L srcSpan importDecl) =
-+transformImport :: DynFlags -> LImportDecl RdrName -> ImportDecl
-+transformImport dflags (L srcSpan importDecl) =
-     ImportDecl {
-         importLoc = srcSpanToLocation srcSpan,
-         importModule = modName,
-@@ -73,19 +87,19 @@
-                         Just mn -> Just (moduleNameString mn)
-         specs =    case ideclHiding importDecl of
-                         Nothing -> Nothing
--                        Just (hide, list) -> Just (ImportSpecList hide (mapMaybe transformEntity list))
-+                        Just (hide, list) -> Just (ImportSpecList hide (mapMaybe (transformEntity dflags) list))
- 
--transformEntity :: LIE RdrName -> Maybe ImportSpec
-+transformEntity :: DynFlags -> LIE RdrName -> Maybe ImportSpec
- #if MIN_VERSION_ghc(7,2,0)
--transformEntity (L _ (IEVar name))              = Just (IVar (showSDoc (pprPrefixOcc name)))
-+transformEntity dflags (L _ (IEVar name))              = Just (IVar (showSDoc dflags (pprPrefixOcc name)))
- #else
--transformEntity (L _ (IEVar name))              = Just (IVar (showSDoc (pprHsVar name)))
-+transformEntity dflags (L _ (IEVar name))              = Just (IVar (showSDoc dflags (pprHsVar name)))
- #endif
--transformEntity (L _ (IEThingAbs name))         = Just (IAbs (showRdrName name))
--transformEntity (L _ (IEThingAll name))         = Just (IThingAll (showRdrName name))	
--transformEntity (L _ (IEThingWith name list))   = Just (IThingWith (showRdrName name)
--                                                        (map showRdrName list))	
--transformEntity  _                              = Nothing
-+transformEntity dflags (L _ (IEThingAbs name))         = Just (IAbs (showRdrName dflags name))
-+transformEntity dflags (L _ (IEThingAll name))         = Just (IThingAll (showRdrName dflags name))	
-+transformEntity dflags (L _ (IEThingWith name list))   = Just (IThingWith (showRdrName dflags name)
-+                                                        (map (showRdrName dflags) list))	
-+transformEntity _ _                              = Nothing
- 
- #if MIN_VERSION_ghc(7,2,0)
- srcSpanToLocation :: SrcSpan -> Location
-Index: b/src/IDE/Metainfo/InterfaceCollector.hs
-===================================================================
---- a/src/IDE/Metainfo/InterfaceCollector.hs
-+++ b/src/IDE/Metainfo/InterfaceCollector.hs
-@@ -23,6 +23,7 @@
- import Module hiding (PackageId,ModuleName)
- import qualified Module as Module (ModuleName)
- import qualified Maybes as M
-+import DynFlags (DynFlags)
- #if MIN_VERSION_ghc(7,2,0)
- import HscTypes
- import GhcMonad hiding (liftIO)
-@@ -36,7 +37,12 @@
- import TysWiredIn ( eqTyConName )
- #endif
- import LoadIface
-+#if MIN_VERSION_ghc(7,6,0)
- import Outputable hiding(trace)
-+#else
-+import Outputable hiding(trace, showSDoc, showSDocUnqual)
-+import qualified Outputable as O
-+#endif
- import IfaceSyn
- import FastString
- import Name
-@@ -65,15 +71,21 @@
- import IDE.Utils.GHCUtils
- import Control.DeepSeq(deepseq)
- 
-+#if !MIN_VERSION_ghc(7,6,0)
-+showSDoc :: DynFlags -> SDoc -> String
-+showSDoc _ = O.showSDoc
-+showSDocUnqual :: DynFlags -> SDoc -> String
-+showSDocUnqual _ = O.showSDocUnqual
-+#endif
- 
- collectPackageFromHI :: PackageConfig -> IO PackageDescr
--collectPackageFromHI  packageConfig = inGhcIO [] [] $ \ _ -> do
-+collectPackageFromHI  packageConfig = inGhcIO [] [] $ \ dflags -> do
-     session             <-  getSession
-     exportedIfaceInfos  <-  getIFaceInfos (getThisPackage packageConfig)
-                                             (IPI.exposedModules packageConfig) session
-     hiddenIfaceInfos    <-  getIFaceInfos (getThisPackage packageConfig)
-                                             (IPI.hiddenModules packageConfig) session
--    let pd = extractInfo exportedIfaceInfos hiddenIfaceInfos (getThisPackage packageConfig)
-+    let pd = extractInfo dflags exportedIfaceInfos hiddenIfaceInfos (getThisPackage packageConfig)
- #if MIN_VERSION_Cabal(1,8,0)
-                                             [] -- TODO 6.12 (IPI.depends $ packageConfigToInstalledPackageInfo packageConfig))
- #else
-@@ -101,20 +113,20 @@
- 
- -------------------------------------------------------------------------
- 
--extractInfo :: [(ModIface, FilePath)] -> [(ModIface, FilePath)] -> PackageIdentifier ->
-+extractInfo :: DynFlags -> [(ModIface, FilePath)] -> [(ModIface, FilePath)] -> PackageIdentifier ->
-                     [PackageIdentifier] -> PackageDescr
--extractInfo  ifacesExp ifacesHid pid buildDepends =
--    let allDescrs           =   concatMap (extractExportedDescrH pid)
-+extractInfo dflags ifacesExp ifacesHid pid buildDepends =
-+    let allDescrs           =   concatMap (extractExportedDescrH dflags pid)
-                                     (map fst (ifacesHid ++ ifacesExp))
--        mods                =   map (extractExportedDescrR pid allDescrs) (map fst ifacesExp)
-+        mods                =   map (extractExportedDescrR dflags pid allDescrs) (map fst ifacesExp)
-     in PackageDescr {
-         pdPackage           =   pid
-     ,   pdModules           =   mods
-     ,   pdBuildDepends      =   buildDepends
-     ,   pdMbSourcePath      =   Nothing}
- 
--extractExportedDescrH :: PackageIdentifier -> ModIface -> [Descr]
--extractExportedDescrH pid iface =
-+extractExportedDescrH :: DynFlags -> PackageIdentifier -> ModIface -> [Descr]
-+extractExportedDescrH dflags pid iface =
-     let mid                 =   (fromJust . simpleParse . moduleNameString . moduleName) (mi_module iface)
-         exportedNames       =   Set.fromList
- #if MIN_VERSION_Cabal(1,11,0)
-@@ -129,14 +141,15 @@
-         exportedDecls       =   filter (\ ifdecl -> (occNameString $ ifName ifdecl)
-                                                     `Set.member` exportedNames)
-                                                             (map snd (mi_decls iface))
--    in  concatMap (extractIdentifierDescr pid [mid]) exportedDecls
-+    in  concatMap (extractIdentifierDescr dflags pid [mid]) exportedDecls
- 
- 
--extractExportedDescrR :: PackageIdentifier
-+extractExportedDescrR :: DynFlags
-+    -> PackageIdentifier
-     -> [Descr]
-     -> ModIface
-     -> ModuleDescr
--extractExportedDescrR pid hidden iface =
-+extractExportedDescrR dflags pid hidden iface =
-     let mid             =   (fromJust . simpleParse . moduleNameString . moduleName) (mi_module iface)
-         exportedNames   =   Set.fromList
- #if MIN_VERSION_Cabal(1,11,0)
-@@ -151,12 +164,12 @@
-         exportedDecls   =   filter (\ ifdecl -> (occNameString $ifName ifdecl)
-                                                     `Set.member` exportedNames)
-                                                             (map snd (mi_decls iface))
--        ownDecls        =   concatMap (extractIdentifierDescr pid [mid]) exportedDecls
-+        ownDecls        =   concatMap (extractIdentifierDescr dflags pid [mid]) exportedDecls
-         otherDecls      =   exportedNames `Set.difference` (Set.fromList (map dscName ownDecls))
-         reexported      =   map (\d -> Reexported (ReexportedDescr (Just (PM pid mid)) d))
-                                  $ filter (\k -> (dscName k) `Set.member` otherDecls) hidden
--        inst            =   concatMap (extractInstances (PM pid mid)) (mi_insts iface)
--        uses            =   Map.fromList . catMaybes $ map extractUsages (mi_usages iface)
-+        inst            =   concatMap (extractInstances dflags (PM pid mid)) (mi_insts iface)
-+        uses            =   Map.fromList . catMaybes $ map (extractUsages dflags) (mi_usages iface)
-         declsWithExp    =   map withExp ownDecls
-         withExp (Real d) =  Real $ d{dscExported' = Set.member (dscName' d) exportedNames}
-         withExp _        =  error "Unexpected Reexported"
-@@ -166,14 +179,14 @@
-                 ,   mdReferences        =   uses
-                 ,   mdIdDescriptions    =   declsWithExp ++ inst ++ reexported}
- 
--extractIdentifierDescr :: PackageIdentifier -> [ModuleName] -> IfaceDecl -> [Descr]
--extractIdentifierDescr package modules decl
-+extractIdentifierDescr :: DynFlags -> PackageIdentifier -> [ModuleName] -> IfaceDecl -> [Descr]
-+extractIdentifierDescr dflags package modules decl
-    = if null modules
-       then []
-       else
-         let descr = RealDescr{
-                     dscName'           =   unpackFS $occNameFS (ifName decl)
--                ,   dscMbTypeStr'      =   Just (BS.pack $ unlines $ nonEmptyLines $ filterExtras $ showSDocUnqual $ppr decl)
-+                ,   dscMbTypeStr'      =   Just (BS.pack $ unlines $ nonEmptyLines $ filterExtras $ showSDocUnqual dflags $ppr decl)
-                 ,   dscMbModu'         =   Just (PM package (last modules))
-                 ,   dscMbLocation'     =   Nothing
-                 ,   dscMbComment'      =   Nothing
-@@ -188,20 +201,20 @@
- #endif
-                 -> map Real [descr]
- #if MIN_VERSION_Cabal(1,11,0)
--            (IfaceData name _ _ ifCons' _ _ _)
-+            (IfaceData {ifName=name, ifCons=ifCons'})
- #else
-             (IfaceData name _ _ ifCons' _ _ _ _)
- #endif
-                 -> let d = case ifCons' of
-                             IfDataTyCon _decls
-                                 ->  let
--                                        fieldNames          =   concatMap extractFields (visibleIfConDecls ifCons')
--                                        constructors'       =   extractConstructors name (visibleIfConDecls ifCons')
-+                                        fieldNames          =   concatMap (extractFields dflags) (visibleIfConDecls ifCons')
-+                                        constructors'       =   extractConstructors dflags name (visibleIfConDecls ifCons')
-                                     in DataDescr constructors' fieldNames
-                             IfNewTyCon _
-                                 ->  let
--                                        fieldNames          =   concatMap extractFields (visibleIfConDecls ifCons')
--                                        constructors'       =   extractConstructors name (visibleIfConDecls ifCons')
-+                                        fieldNames          =   concatMap (extractFields dflags) (visibleIfConDecls ifCons')
-+                                        constructors'       =   extractConstructors dflags name (visibleIfConDecls ifCons')
-                                         mbField             =   case fieldNames of
-                                                                     [] -> Nothing
-                                                                     [fn] -> Just fn
-@@ -217,21 +230,29 @@
- #else
-                             IfAbstractTyCon ->  DataDescr [] []
- #endif
-+#if MIN_VERSION_ghc(7,6,0)
-+                            IfDataFamTyCon ->  DataDescr [] []
-+#else
-                             IfOpenDataTyCon ->  DataDescr [] []
-+#endif
-                     in [Real (descr{dscTypeHint' = d})]
-             (IfaceClass context _ _ _ _ ifSigs' _ )
-                         ->  let
--                                classOpsID          =   map extractClassOp ifSigs'
-+                                classOpsID          =   map (extractClassOp dflags) ifSigs'
-                                 superclasses        =   extractSuperClassNames context
-                             in [Real $ descr{dscTypeHint' = ClassDescr superclasses classOpsID}]
--            (IfaceSyn _ _ _ _ _ )
-+            (IfaceSyn {})
-                         ->  [Real $ descr{dscTypeHint' = TypeDescr}]
--            (IfaceForeign _ _)
-+#if MIN_VERSION_ghc(7,6,0)
-+            (IfaceAxiom {})
-+                        ->  [Real $ descr]
-+#endif
-+            (IfaceForeign {})
-                         ->  [Real $ descr]
- 
--extractConstructors ::   OccName -> [IfaceConDecl] -> [SimpleDescr]
--extractConstructors name decls    =   map (\decl -> SimpleDescr (unpackFS $occNameFS (ifConOcc decl))
--                                                 (Just (BS.pack $ filterExtras $ showSDocUnqual $
-+extractConstructors :: DynFlags -> OccName -> [IfaceConDecl] -> [SimpleDescr]
-+extractConstructors dflags name decls = map (\decl -> SimpleDescr (unpackFS $occNameFS (ifConOcc decl))
-+                                                 (Just (BS.pack $ filterExtras $ showSDocUnqual dflags $
-                                                     pprIfaceForAllPart (ifConUnivTvs decl ++ ifConExTvs decl)
-                                                         (eq_ctxt decl ++ ifConCtxt decl) (pp_tau decl)))
-                                                  Nothing Nothing True) decls
-@@ -248,20 +269,20 @@
- #endif
- 	                        | (tv,ty) <- ifConEqSpec decl]
- 
--extractFields ::  IfaceConDecl -> [SimpleDescr]
--extractFields  decl    =   map (\ (n, t) -> SimpleDescr n t Nothing Nothing True)
-+extractFields :: DynFlags -> IfaceConDecl -> [SimpleDescr]
-+extractFields dflags decl = map (\ (n, t) -> SimpleDescr n t Nothing Nothing True)
-                                 $ zip (map extractFieldNames (ifConFields decl))
--                                        (map extractType (ifConArgTys decl))
-+                                        (map (extractType dflags) (ifConArgTys decl))
- 
--extractType :: IfaceType -> Maybe ByteString
--extractType it = Just ((BS.pack . filterExtras . showSDocUnqual . ppr) it)
-+extractType :: DynFlags -> IfaceType -> Maybe ByteString
-+extractType dflags it = Just ((BS.pack . filterExtras . showSDocUnqual dflags . ppr) it)
- 
- extractFieldNames :: OccName -> String
- extractFieldNames occName = unpackFS $occNameFS occName
- 
--extractClassOp :: IfaceClassOp -> SimpleDescr
--extractClassOp (IfaceClassOp occName _dm ty) = SimpleDescr (unpackFS $occNameFS occName)
--                                                (Just (BS.pack $ showSDocUnqual (ppr ty)))
-+extractClassOp :: DynFlags -> IfaceClassOp -> SimpleDescr
-+extractClassOp dflags (IfaceClassOp occName _dm ty) = SimpleDescr (unpackFS $occNameFS occName)
-+                                                (Just (BS.pack $ showSDocUnqual dflags (ppr ty)))
-                                                 Nothing Nothing True
- 
- extractSuperClassNames :: [IfacePredType] -> [String]
-@@ -273,10 +294,17 @@
- #endif
-             extractSuperClassName _                     =   Nothing
- 
--extractInstances :: PackModule -> IfaceInst -> [Descr]
--extractInstances pm ifaceInst  =
--    let className   =   showSDocUnqual $ ppr $ ifInstCls ifaceInst
--        dataNames   =   map (\iftc -> showSDocUnqual $ ppr iftc)
-+extractInstances :: DynFlags
-+    -> PackModule
-+#if MIN_VERSION_ghc(7,6,0)
-+    -> IfaceClsInst
-+#else
-+    -> IfaceInst
-+#endif
-+    -> [Descr]
-+extractInstances dflags pm ifaceInst  =
-+    let className   =   showSDocUnqual dflags $ ppr $ ifInstCls ifaceInst
-+        dataNames   =   map (\iftc -> showSDocUnqual dflags $ ppr iftc)
-                             $ map fromJust
-                                 $ filter isJust
-                                     $ ifInstTys ifaceInst
-@@ -290,24 +318,24 @@
-                     ,   dscExported'     =   False})]
- 
- 
--extractUsages :: Usage -> Maybe (ModuleName, Set String)
-+extractUsages :: DynFlags -> Usage -> Maybe (ModuleName, Set String)
- #if MIN_VERSION_Cabal(1,11,0)
--extractUsages (UsagePackageModule usg_mod' _ _) =
-+extractUsages _ (UsagePackageModule usg_mod' _ _) =
- #else
--extractUsages (UsagePackageModule usg_mod' _ ) =
-+extractUsages _ (UsagePackageModule usg_mod' _ ) =
- #endif
-     let name    =   (fromJust . simpleParse . moduleNameString) (moduleName usg_mod')
-     in Just (name, Set.fromList [])
- #if MIN_VERSION_Cabal(1,11,0)
--extractUsages (UsageHomeModule usg_mod_name' _ usg_entities' _ _) =
-+extractUsages dflags (UsageHomeModule usg_mod_name' _ usg_entities' _ _) =
- #else
--extractUsages (UsageHomeModule usg_mod_name' _ usg_entities' _) =
-+extractUsages _ (UsageHomeModule usg_mod_name' _ usg_entities' _) =
- #endif
-     let name    =   (fromJust . simpleParse . moduleNameString) usg_mod_name'
--        ids     =   map (showSDocUnqual . ppr . fst) usg_entities'
-+        ids     =   map (showSDocUnqual dflags . ppr . fst) usg_entities'
-     in Just (name, Set.fromList ids)
- #if MIN_VERSION_ghc(7,4,0)
--extractUsages (UsageFile _ _) = Nothing
-+extractUsages _ (UsageFile _ _) = Nothing
- #endif
- 
- filterExtras, filterExtras' :: String -> String
-Index: b/src/IDE/Metainfo/PackageCollector.hs
-===================================================================
---- a/src/IDE/Metainfo/PackageCollector.hs
-+++ b/src/IDE/Metainfo/PackageCollector.hs
-@@ -55,9 +55,8 @@
- import System.Process (system)
- #endif
- #endif
--import Prelude hiding(catch)
- import Control.Monad.IO.Class (MonadIO, MonadIO(..))
--import qualified Control.Exception as NewException (SomeException, catch)
-+import qualified Control.Exception as E (SomeException, catch)
- import IDE.Utils.Tool (runTool')
- 
- collectPackage :: Bool -> Prefs -> Int -> (PackageConfig,Int) -> IO PackageCollectStats
-@@ -132,15 +131,15 @@
-                 filePath = collectorPath </> packString <.> leksahMetadataSystemFileExtension
-             debugM "leksah-server" $ "collectPackage: before retreiving = " ++ fullUrl
- #if defined(USE_LIBCURL)
--            catch (do
-+            E.catch (do
-                 (code, string) <- curlGetString_ fullUrl []
-                 when (code == CurlOK) $
-                     withBinaryFile filePath WriteMode $ \ file -> do
-                         hPutStr file string)
- #elif defined(USE_CURL)
--            catch ((system $ "curl -OL --fail " ++ fullUrl) >> return ())
-+            E.catch ((system $ "curl -OL --fail " ++ fullUrl) >> return ())
- #else
--            catch ((system $ "wget " ++ fullUrl) >> return ())
-+            E.catch ((system $ "wget " ++ fullUrl) >> return ())
- #endif
-                 (\(e :: SomeException) ->
-                     debugM "leksah-server" $ "collectPackage: Error when calling wget " ++ show e)
-@@ -154,8 +153,8 @@
-         runCabalConfigure fpSource = do
-             let dirPath      = dropFileName fpSource
-             setCurrentDirectory dirPath
--            NewException.catch (runTool' "cabal" (["configure","--user"]) Nothing >> return ())
--                                    (\ (_e :: NewException.SomeException) -> do
-+            E.catch (runTool' "cabal" (["configure","--user"]) Nothing >> return ())
-+                                    (\ (_e :: E.SomeException) -> do
-                                         debugM "leksah-server" "Can't configure"
-                                         return ())
- 
-Index: b/src/IDE/Metainfo/SourceCollectorH.hs
-===================================================================
---- a/src/IDE/Metainfo/SourceCollectorH.hs
-+++ b/src/IDE/Metainfo/SourceCollectorH.hs
-@@ -35,7 +35,11 @@
- import Documentation.Haddock
- #endif
- import Distribution.Text (simpleParse)
-+#if MIN_VERSION_ghc(7,6,0)
-+import InstEnv (ClsInst(..))
-+#else
- import InstEnv (Instance(..))
-+#endif
- import MyMissing
- import Data.Map (Map)
- import qualified Data.Map as Map (empty)
-@@ -70,8 +74,14 @@
- import System.Log.Logger (warningM, debugM)
- import Control.DeepSeq (deepseq)
- import Data.ByteString.Char8 (ByteString)
--import Outputable hiding (trace)
-+#if MIN_VERSION_ghc(7,6,0)
-+import Outputable hiding(trace)
-+#else
-+import Outputable hiding(trace, showSDoc, showSDocUnqual)
-+import qualified Outputable as O
-+#endif
- import GHC.Show(showSpace)
-+import Name
- 
- #ifdef MIN_VERSION_haddock_leksah
- #else
-@@ -84,15 +94,22 @@
- isEmptyDoc DocEmpty  = True
- isEmptyDoc _         = False
- 
--show' :: Outputable alpha => alpha  -> String
- #if MIN_VERSION_ghc(6,12,1)
- type MyLDocDecl = LDocDecl
--show' = showSDoc . ppr
- #else
- type MyLDocDecl = LDocDecl Name
--show' =  showSDoc . ppr
- #endif
- 
-+#if !MIN_VERSION_ghc(7,6,0)
-+showSDoc :: DynFlags -> SDoc -> String
-+showSDoc _ = O.showSDoc
-+showSDocUnqual :: DynFlags -> SDoc -> String
-+showSDocUnqual _ = O.showSDocUnqual
-+#endif
-+
-+show' :: Outputable alpha => DynFlags -> alpha  -> String
-+show' dflags = showSDoc dflags . ppr
-+
- data PackageCollectStats = PackageCollectStats {
-     packageString       :: String,
-     modulesTotal        :: Maybe Int,
-@@ -136,14 +153,14 @@
-             warningM "leksah-server" ("Ghc failed to process: " ++ show e)
-             return (Nothing, PackageCollectStats packageName Nothing False False
-                                             (Just ("Ghc failed to process: " ++ show e)))
--        inner ghcFlags = inGhcIO ghcFlags [Opt_Haddock] $ \ _flags -> do
-+        inner ghcFlags = inGhcIO ghcFlags [Opt_Haddock] $ \ dflags -> do
- #if MIN_VERSION_haddock(2,8,0)
-             (interfaces,_) <- processModules verbose (exportedMods ++ hiddenMods) [] []
- #else
-             (interfaces,_) <- createInterfaces verbose (exportedMods ++ hiddenMods) [] []
- #endif
-             liftIO $ print (length interfaces)
--            let mods = map (interfaceToModuleDescr dirPath (getThisPackage packageConfig)) interfaces
-+            let mods = map (interfaceToModuleDescr dflags dirPath (getThisPackage packageConfig)) interfaces
-             sp <- liftIO $ myCanonicalizePath dirPath
-             let pd = PackageDescr {
-                     pdPackage           =   getThisPackage packageConfig
-@@ -159,8 +176,8 @@
- 
- -- Heaven
- 
--interfaceToModuleDescr :: FilePath -> PackageIdentifier -> Interface -> ModuleDescr
--interfaceToModuleDescr _dirPath pid interface =
-+interfaceToModuleDescr :: DynFlags -> FilePath -> PackageIdentifier -> Interface -> ModuleDescr
-+interfaceToModuleDescr dflags _dirPath pid interface =
-     ModuleDescr {
-         mdModuleId          =   PM pid modName
-     ,   mdMbSourcePath      =   Just filepath
-@@ -170,30 +187,42 @@
-         filepath   = ifaceOrigFilename interface
-         modName    = forceJust ((simpleParse . moduleNameString . moduleName . ifaceMod) interface)
-                         "Can't parse module name"
--        descrs     = extractDescrs (PM pid modName)
-+        descrs     = extractDescrs dflags (PM pid modName)
-                         (ifaceDeclMap interface) (ifaceExportItems interface)
-                         (ifaceInstances interface) [] --(ifaceLocals interface)
-         imports    = Map.empty --TODO
- 
-+#if MIN_VERSION_ghc(7,6,0)
-+getDoc :: Documentation Name -> Maybe NDoc
-+getDoc = documentationDoc
-+#else
-+getDoc :: Maybe NDoc -> Maybe NDoc
-+getDoc = id
-+#endif
-+
- #if MIN_VERSION_ghc(7,4,1)
- type DeclInfo = [LHsDecl Name]
- #endif
- #if MIN_VERSION_ghc(6,12,1)
--extractDescrs :: PackModule -> Map Name DeclInfo -> [ExportItem Name] -> [Instance] -> [Name] -> [Descr]
--extractDescrs pm _ifaceDeclMap ifaceExportItems' ifaceInstances' _ifaceLocals =
--	transformToDescrs pm exportedDeclInfo ++ map (toDescrInst pm) ifaceInstances'
-+#if MIN_VERSION_ghc(7,6,0)
-+extractDescrs :: DynFlags -> PackModule -> Map Name DeclInfo -> [ExportItem Name] -> [ClsInst] -> [Name] -> [Descr]
-+#else
-+extractDescrs :: DynFlags -> PackModule -> Map Name DeclInfo -> [ExportItem Name] -> [Instance] -> [Name] -> [Descr]
-+#endif
-+extractDescrs dflags pm _ifaceDeclMap ifaceExportItems' ifaceInstances' _ifaceLocals =
-+        transformToDescrs dflags pm exportedDeclInfo ++ map (toDescrInst dflags pm) ifaceInstances'
-     where
-         exportedDeclInfo                               =  mapMaybe toDeclInfo  ifaceExportItems'
-         toDeclInfo (ExportDecl decl mbDoc subDocs _)   =
--                                        Just(decl,fst mbDoc,map (\ (a,b) -> (a,fst b)) subDocs)
-+                                        Just(decl,getDoc $ fst mbDoc,map (\ (a,b) -> (a,getDoc $ fst b)) subDocs)
-         toDeclInfo (ExportNoDecl _ _)                  = Nothing
-         toDeclInfo (ExportGroup _ _ _)                 = Nothing
-         toDeclInfo (ExportDoc _)                       = Nothing
-         toDeclInfo (ExportModule _)                    = Nothing
- #else
--extractDescrs :: PackModule -> Map Name DeclInfo -> [ExportItem Name] -> [Instance] -> [Name] -> [Descr]
--extractDescrs pm _ifaceDeclMap ifaceExportItems' ifaceInstances' _ifaceLocals =
--	transformToDescrs pm exportedDeclInfo ++ map (toDescrInst pm) ifaceInstances'
-+extractDescrs :: DynFlags -> PackModule -> Map Name DeclInfo -> [ExportItem Name] -> [Instance] -> [Name] -> [Descr]
-+extractDescrs dflags pm _ifaceDeclMap ifaceExportItems' ifaceInstances' _ifaceLocals =
-+        transformToDescrs dflags pm exportedDeclInfo ++ map (toDescrInst dflags pm) ifaceInstances'
-     where
-         exportedDeclInfo                               =  mapMaybe toDeclInfo  ifaceExportItems'
-         toDeclInfo (ExportDecl decl mbDoc subDocs _)   = Just(decl,mbDoc,subDocs)
-@@ -203,8 +232,8 @@
-         toDeclInfo (ExportModule _)                    = Nothing
- #endif
- 
--transformToDescrs :: PackModule -> [(LHsDecl Name, Maybe NDoc, [(Name, Maybe NDoc)])] -> [Descr]
--transformToDescrs pm = concatMap transformToDescr
-+transformToDescrs :: DynFlags -> PackModule -> [(LHsDecl Name, Maybe NDoc, [(Name, Maybe NDoc)])] -> [Descr]
-+transformToDescrs dflags pm = concatMap transformToDescr
-     where
- #if MIN_VERSION_ghc(7,2,0)
-     transformToDescr ((L loc (SigD (TypeSig [name] typ))), mbComment,_subCommentList) =
-@@ -213,136 +242,174 @@
- #endif
-         [Real $ RealDescr {
-         dscName'        =   getOccString (unLoc name)
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr typ))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
--    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-     ,   dscTypeHint'    =   VariableDescr
-     ,   dscExported'    =   True}]
- 
-     transformToDescr ((L _loc (SigD _)), _mbComment, _subCommentList) = []
-+
-+#if MIN_VERSION_ghc(7,6,0)
-+    transformToDescr ((L loc (TyClD typ@(ForeignType {tcdLName = lid}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   getOccString (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-+    ,   dscTypeHint'    =   TypeDescr
-+    ,   dscExported'    =   True}]
-+
-+    transformToDescr ((L loc (TyClD typ@(TyFamily {tcdLName = lid}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   getOccString (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-+    ,   dscTypeHint'    =   TypeDescr
-+    ,   dscExported'    =   True}]
-+#endif
-+
-+#if MIN_VERSION_ghc(7,6,0)
-+    transformToDescr ((L loc (TyClD typ@(TyDecl {tcdLName = lid, tcdTyDefn = TySynonym {}}))), mbComment,_sigList) =
-+#else
-     transformToDescr ((L loc (TyClD typ@(TySynonym lid _ _ _ ))), mbComment, _subCommentList) =
-+#endif
-         [Real $ RealDescr {
-         dscName'        =   getOccString (unLoc lid)
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr typ))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
--    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-     ,   dscTypeHint'    =   TypeDescr
-     ,   dscExported'    =   True}]
- 
--    transformToDescr ((L loc (TyClD typ@(TyData DataType _ tcdLName' _ _ _ lConDecl tcdDerivs'))), mbComment,_subCommentList) =
-+#if MIN_VERSION_ghc(7,6,0)
-+    transformToDescr ((L loc (TyClD typ@(TyDecl {tcdLName = lid, tcdTyDefn = TyData {td_cons=lConDecl, td_derivs=tcdDerivs'}}))), mbComment,_sigList) =
-+#else
-+    transformToDescr ((L loc (TyClD typ@(TyData DataType _ lid _ _ _ lConDecl tcdDerivs'))), mbComment,_subCommentList) =
-+#endif
-         [Real $ RealDescr {
-         dscName'        =   name
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr (uncommentData typ)))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr (uncommentData typ)))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
--    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-     ,   dscTypeHint'    =   DataDescr constructors fields
-     ,   dscExported'    =   True}]
-             ++ derivings tcdDerivs'
-         where
--        constructors    =   map extractConstructor lConDecl
--        fields          =   nub $ concatMap extractRecordFields lConDecl
--        name            =   getOccString (unLoc tcdLName')
-+        constructors    =   map (extractConstructor dflags) lConDecl
-+        fields          =   nub $ concatMap (extractRecordFields dflags) lConDecl
-+        name            =   getOccString (unLoc lid)
-         derivings Nothing = []
-         derivings (Just _l) = []
- 
-+#if !MIN_VERSION_ghc(7,6,0)
-     transformToDescr ((L loc (TyClD typ@(TyData NewType _ tcdLName' _ _ _ lConDecl tcdDerivs'))), mbComment,_subCommentList) =
-         [Real $ RealDescr {
-         dscName'        =   name
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr (uncommentData typ)))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr (uncommentData typ)))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
--    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-     ,   dscTypeHint'    =   NewtypeDescr constructor mbField
-     ,   dscExported'    =   True}]
-         ++ derivings tcdDerivs'
-         where
--        constructor     =   forceHead (map extractConstructor lConDecl)
-+        constructor     =   forceHead (map (extractConstructor dflags) lConDecl)
-                                 "WorkspaceCollector>>transformToDescr: no constructor for newtype"
--        mbField         =   case concatMap extractRecordFields lConDecl of
-+        mbField         =   case concatMap (extractRecordFields dflags) lConDecl of
-                                 [] -> Nothing
-                                 a:_ -> Just a
-         name            =   getOccString (unLoc tcdLName')
-         derivings Nothing = []
-         derivings (Just _l) = []
-+#endif
- 
-     transformToDescr ((L loc (TyClD cl@(ClassDecl{tcdLName=tcdLName', tcdSigs=tcdSigs', tcdDocs=docs}))), mbComment,_subCommentList) =
-         [Real $ RealDescr {
-         dscName'        =   getOccString (unLoc tcdLName')
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr cl{tcdMeths = emptyLHsBinds}))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr cl{tcdMeths = emptyLHsBinds}))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
--    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscMbComment'   =   toComment dflags mbComment []
-     ,   dscTypeHint'    =   ClassDescr super methods
-     ,   dscExported'    =   True    }]
-         where
--        methods         =   extractMethods tcdSigs' docs
-+        methods         =   extractMethods dflags tcdSigs' docs
-         super           =   []
- 
-     transformToDescr (_, _mbComment, _sigList) = []
- 
--toDescrInst :: PackModule -> Instance -> Descr
--toDescrInst pm inst@(Instance is_cls' _is_tcs _is_tvs is_tys' _is_dfun _is_flag) =
-+#if MIN_VERSION_ghc(7,6,0)
-+toDescrInst :: DynFlags -> PackModule -> ClsInst -> Descr
-+toDescrInst dflags pm inst@(ClsInst {is_cls = is_cls', is_tys = is_tys'}) =
-+#else
-+toDescrInst :: DynFlags -> PackModule -> Instance -> Descr
-+toDescrInst dflags pm inst@(Instance is_cls' _is_tcs _is_tvs is_tys' _is_dfun _is_flag) =
-+#endif
-         Real $ RealDescr {
-         dscName'        =   getOccString is_cls'
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr inst))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr inst))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation (getSrcSpan inst)
-     ,   dscMbComment'   =   Nothing
--    ,   dscTypeHint'    =   InstanceDescr (map (showSDocUnqual . ppr) is_tys')
-+    ,   dscTypeHint'    =   InstanceDescr (map (showSDocUnqual dflags . ppr) is_tys')
-     ,   dscExported'    =   True}
- 
--extractMethods :: [LSig Name] -> [MyLDocDecl] -> [SimpleDescr]
--extractMethods sigs docs =
--    let pairs = attachComments' sigs docs
--    in mapMaybe extractMethod pairs
-+extractMethods :: DynFlags -> [LSig Name] -> [MyLDocDecl] -> [SimpleDescr]
-+extractMethods dflags sigs docs =
-+    let pairs = attachComments' dflags sigs docs
-+    in mapMaybe (extractMethod dflags) pairs
- 
--extractMethod :: (LHsDecl Name, Maybe NDoc) -> Maybe SimpleDescr
-+extractMethod :: DynFlags -> (LHsDecl Name, Maybe NDoc) -> Maybe SimpleDescr
- #if MIN_VERSION_ghc(7,2,0)
--extractMethod ((L loc (SigD ts@(TypeSig [name] _typ))), mbDoc) =
-+extractMethod dflags ((L loc (SigD ts@(TypeSig [name] _typ))), mbDoc) =
- #else
--extractMethod ((L loc (SigD ts@(TypeSig name _typ))), mbDoc) =
-+extractMethod dflags ((L loc (SigD ts@(TypeSig name _typ))), mbDoc) =
- #endif
-     Just $ SimpleDescr
-         (getOccString (unLoc name))
--        (Just (BS.pack (showSDocUnqual $ ppr ts)))
-+        (Just (BS.pack (showSDocUnqual dflags $ ppr ts)))
-         (srcSpanToLocation loc)
--        (toComment mbDoc [])
-+        (toComment dflags mbDoc [])
-         True
--extractMethod (_, _mbDoc) = Nothing
-+extractMethod _dflags (_, _mbDoc) = Nothing
- 
--extractConstructor :: LConDecl Name -> SimpleDescr
--extractConstructor decl@(L loc (ConDecl {con_name = name, con_doc = doc})) =
-+extractConstructor :: DynFlags -> LConDecl Name -> SimpleDescr
-+extractConstructor dflags decl@(L loc (ConDecl {con_name = name, con_doc = doc})) =
-     SimpleDescr
-         (getOccString (unLoc name))
--        (Just (BS.pack (showSDocUnqual $ppr (uncommentDecl decl))))
-+        (Just (BS.pack (showSDocUnqual dflags $ppr (uncommentDecl decl))))
-         (srcSpanToLocation loc)
-         (case doc of
-             Nothing -> Nothing
--            Just (L _ d) -> Just (BS.pack (printHsDoc'' d)))
-+            Just (L _ d) -> Just (BS.pack (printHsDoc d)))
-         True
- 
--extractRecordFields :: LConDecl Name -> [SimpleDescr]
--extractRecordFields (L _ _decl@(ConDecl {con_details=(RecCon flds)})) =
-+extractRecordFields :: DynFlags -> LConDecl Name -> [SimpleDescr]
-+extractRecordFields dflags (L _ _decl@(ConDecl {con_details=(RecCon flds)})) =
-     map extractRecordFields' flds
-     where
-     extractRecordFields' _field@(ConDeclField (L loc name) typ doc) =
-         SimpleDescr
-             (getOccString name)
--            (Just (BS.pack (showSDocUnqual $ ppr typ)))
-+            (Just (BS.pack (showSDocUnqual dflags $ ppr typ)))
-             (srcSpanToLocation loc)
-             (case doc of
-                 Nothing -> Nothing
--                Just (L _ d) -> Just (BS.pack (printHsDoc'' d)))
-+                Just (L _ d) -> Just (BS.pack (printHsDoc d)))
-             True
--extractRecordFields _ = []
-+extractRecordFields _ _ = []
- 
--toComment :: Maybe NDoc -> [NDoc] -> Maybe ByteString
--toComment (Just c) _    =  Just (BS.pack (printHsDoc' c))
--toComment Nothing (c:_) =  Just (BS.pack (printHsDoc' c))
--toComment Nothing []    =  Nothing
-+toComment :: DynFlags -> Maybe NDoc -> [NDoc] -> Maybe ByteString
-+toComment dflags (Just c) _    =  Just (BS.pack (printHsDoc' dflags c))
-+toComment dflags Nothing (c:_) =  Just (BS.pack (printHsDoc' dflags c))
-+toComment _ Nothing []         =  Nothing
- 
- 
- {--
-@@ -353,66 +420,62 @@
-     =   addLocationAndComment (l,st) (unLoc lid) loc mbComment' [Class] []
- --}
- 
--printHsDoc' :: HsDoc Name  -> String
--printHsDoc' d = show (PPDoc d)
--
--#if MIN_VERSION_ghc(6,12,1)
--printHsDoc'' :: HsDocString  -> String
--printHsDoc''  = printHsDoc
--#else
--printHsDoc'' :: HsDoc Name  -> String
--printHsDoc''  = printHsDoc'
--#endif
-+printHsDoc' :: DynFlags -> HsDoc Name  -> String
-+printHsDoc' dflags d = show (PPDoc dflags d)
- 
--newtype PPDoc alpha = PPDoc (HsDoc alpha)
-+data PPDoc alpha = PPDoc DynFlags (HsDoc alpha)
- 
- instance Outputable alpha => Show (PPDoc alpha)  where
--    showsPrec _ (PPDoc DocEmpty)                 =   id
--    showsPrec _ (PPDoc (DocAppend l r))          =   shows (PPDoc l)  . shows (PPDoc r)
--    showsPrec _ (PPDoc (DocString str))          =   showString str
--    showsPrec _ (PPDoc (DocParagraph d))         =   shows (PPDoc d) . showChar '\n'
--    showsPrec _ (PPDoc (DocIdentifier l))        =   foldr (\i _f -> showChar '\'' .
--                                                     ((showString . showSDoc .  ppr) i) . showChar '\'') id [l]
--    showsPrec _ (PPDoc (DocModule str))          =   showChar '"' . showString str . showChar '"'
--    showsPrec _ (PPDoc (DocEmphasis doc))        =   showChar '/' . shows (PPDoc doc)  . showChar '/'
--    showsPrec _ (PPDoc (DocMonospaced doc))      =   showChar '@' . shows (PPDoc doc) . showChar '@'
--    showsPrec _ (PPDoc (DocUnorderedList l))     =
--        foldr (\s r -> showString "* " . shows (PPDoc s) . showChar '\n' . r) id l
--    showsPrec _ (PPDoc (DocOrderedList l))       =
--        foldr (\(i,n) _f -> shows n . showSpace .  shows (PPDoc i)) id (zip l [1 .. length l])
--    showsPrec _ (PPDoc (DocDefList li))          =
--        foldr (\(l,r) f -> showString "[@" . shows (PPDoc l) . showString "[@ " . shows (PPDoc r) . f) id li
--    showsPrec _ (PPDoc (DocCodeBlock doc))      =   showChar '@' . shows (PPDoc doc) . showChar '@'
--    showsPrec _ (PPDoc (DocURL str))            =   showChar '<' . showString str . showChar '>'
--    showsPrec _ (PPDoc (DocAName str))          =   showChar '#' . showString str . showChar '#'
--    showsPrec _ (PPDoc _)                       =   id
-+    showsPrec _ (PPDoc _ DocEmpty)                 =   id
-+    showsPrec _ (PPDoc d (DocAppend l r))          =   shows (PPDoc d l)  . shows (PPDoc d r)
-+    showsPrec _ (PPDoc _ (DocString str))          =   showString str
-+    showsPrec _ (PPDoc d (DocParagraph doc))         =   shows (PPDoc d doc) . showChar '\n'
-+    showsPrec _ (PPDoc d (DocIdentifier l))        =   foldr (\i _f -> showChar '\'' .
-+                                                     ((showString . showSDoc d .  ppr) i) . showChar '\'') id [l]
-+    showsPrec _ (PPDoc _ (DocModule str))          =   showChar '"' . showString str . showChar '"'
-+    showsPrec _ (PPDoc d (DocEmphasis doc))        =   showChar '/' . shows (PPDoc d doc)  . showChar '/'
-+    showsPrec _ (PPDoc d (DocMonospaced doc))      =   showChar '@' . shows (PPDoc d doc) . showChar '@'
-+    showsPrec _ (PPDoc d (DocUnorderedList l))     =
-+        foldr (\s r -> showString "* " . shows (PPDoc d s) . showChar '\n' . r) id l
-+    showsPrec _ (PPDoc d (DocOrderedList l))       =
-+        foldr (\(i,n) _f -> shows n . showSpace .  shows (PPDoc d i)) id (zip l [1 .. length l])
-+    showsPrec _ (PPDoc d (DocDefList li))          =
-+        foldr (\(l,r) f -> showString "[@" . shows (PPDoc d l) . showString "[@ " . shows (PPDoc d r) . f) id li
-+    showsPrec _ (PPDoc d (DocCodeBlock doc))      =   showChar '@' . shows (PPDoc d doc) . showChar '@'
-+#if MIN_VERSION_ghc(7,6,0)
-+    showsPrec _ (PPDoc _ (DocHyperlink h))            =   showChar '<' . showString (show h) . showChar '>'
-+#else
-+    showsPrec _ (PPDoc _ (DocURL str))            =   showChar '<' . showString str . showChar '>'
-+#endif
-+    showsPrec _ (PPDoc _ (DocAName str))          =   showChar '#' . showString str . showChar '#'
-+    showsPrec _ (PPDoc _ _)                       =   id
- 
--attachComments' :: [LSig Name] -> [MyLDocDecl] -> [(LHsDecl Name, Maybe (HsDoc Name))]
--attachComments' sigs docs = collectDocs' $ sortByLoc $
-+attachComments' :: DynFlags -> [LSig Name] -> [MyLDocDecl] -> [(LHsDecl Name, Maybe (HsDoc Name))]
-+attachComments' dflags sigs docs = collectDocs' dflags $ sortByLoc $
-         ((map (\ (L l i) -> L l (SigD i)) sigs) ++ (map (\ (L l i) -> L l (DocD i)) docs))
- 
- -- | Collect the docs and attach them to the right declaration.
--collectDocs' :: [LHsDecl Name] -> [(LHsDecl Name, (Maybe (HsDoc Name)))]
--collectDocs' = collect' Nothing DocEmpty
-+collectDocs' :: DynFlags -> [LHsDecl Name] -> [(LHsDecl Name, (Maybe (HsDoc Name)))]
-+collectDocs' dflags = collect' dflags Nothing DocEmpty
- 
--collect' :: Maybe (LHsDecl Name) -> HsDoc Name -> [LHsDecl Name] -> [(LHsDecl Name, (Maybe (HsDoc Name)))]
--collect' d doc_so_far [] =
-+collect' :: DynFlags -> Maybe (LHsDecl Name) -> HsDoc Name -> [LHsDecl Name] -> [(LHsDecl Name, (Maybe (HsDoc Name)))]
-+collect' _dflags d doc_so_far [] =
-    case d of
-         Nothing -> []
-         Just d0  -> finishedDoc' d0 doc_so_far []
- 
--collect' d doc_so_far (e:es) =
-+collect' dflags d doc_so_far (e:es) =
-   case e of
-     L _ (DocD (DocCommentNext str)) ->
-       case d of
--        Nothing -> collect' d (DocAppend doc_so_far (DocString (show' str))) es
--        Just d0 -> finishedDoc' d0 doc_so_far (collect' Nothing (DocString (show' str)) es)
-+        Nothing -> collect' dflags d (DocAppend doc_so_far (DocString (show' dflags str))) es
-+        Just d0 -> finishedDoc' d0 doc_so_far (collect' dflags Nothing (DocString (show' dflags str)) es)
- 
--    L _ (DocD (DocCommentPrev str)) -> collect' d (DocAppend doc_so_far (DocString (show' str))) es
-+    L _ (DocD (DocCommentPrev str)) -> collect' dflags d (DocAppend doc_so_far (DocString (show' dflags str))) es
- 
-     _ -> case d of
--      Nothing -> collect' (Just e) doc_so_far es
--      Just d0 -> finishedDoc' d0 doc_so_far (collect' (Just e) DocEmpty es)
-+      Nothing -> collect' dflags (Just e) doc_so_far es
-+      Just d0 -> finishedDoc' d0 doc_so_far (collect' dflags (Just e) DocEmpty es)
- 
- finishedDoc' :: LHsDecl alpha -> NDoc -> [(LHsDecl alpha, (Maybe ((HsDoc Name))))]
-                     -> [(LHsDecl alpha, (Maybe ((HsDoc Name))))]
-Index: b/src/IDE/Metainfo/WorkspaceCollector.hs
-===================================================================
---- a/src/IDE/Metainfo/WorkspaceCollector.hs
-+++ b/src/IDE/Metainfo/WorkspaceCollector.hs
-@@ -35,7 +35,12 @@
- #if !MIN_VERSION_ghc(7,2,0)
- import HscTypes hiding (liftIO)
- #endif
-+#if MIN_VERSION_ghc(7,6,0)
- import Outputable hiding(trace)
-+#else
-+import Outputable hiding(trace, showSDoc, showSDocUnqual)
-+import qualified Outputable as O
-+#endif
- import ErrUtils
- import qualified Data.Map as Map
- import Data.Map(Map)
-@@ -54,9 +59,10 @@
- import StringBuffer(hGetStringBuffer)
- import Data.List(partition,sortBy,nub,find)
- import Data.Ord(comparing)
--import RdrName (showRdrName)
- import GHC.Exception
-+#if !MIN_VERSION_ghc(7,6,0)
- import MyMissing(forceHead)
-+#endif
- import LoadIface(findAndReadIface)
- import Distribution.Text(display)
- import TcRnMonad (initTcRnIf, IfGblEnv(..))
-@@ -75,13 +81,13 @@
- #else
- import GHC.Show(showSpace)
- #endif
-+import Control.Exception as E
- 
- type NDecl = LHsDecl RdrName
- myDocEmpty :: NDoc
- myDocAppend :: NDoc -> NDoc -> NDoc
- isEmptyDoc :: NDoc -> Bool
- 
--
- #if MIN_VERSION_ghc(6,12,1)
- type NDoc  = HsDocString
- type MyLDocDecl = LDocDecl
-@@ -101,6 +107,16 @@
- #endif
- type NSig  = Located (Sig RdrName)
- 
-+#if !MIN_VERSION_ghc(7,6,0)
-+showSDoc :: DynFlags -> SDoc -> String
-+showSDoc _ = O.showSDoc
-+showSDocUnqual :: DynFlags -> SDoc -> String
-+showSDocUnqual _ = O.showSDocUnqual
-+#endif
-+
-+showRdrName :: DynFlags -> RdrName -> String
-+showRdrName dflags r = showSDoc dflags (ppr r)
-+
- -- | Test
- collectWorkspace :: PackageIdentifier ->  [(String,FilePath)] -> Bool -> Bool -> FilePath -> IO()
- collectWorkspace packId moduleList forceRebuild writeAscii dir = do
-@@ -146,25 +162,25 @@
- 
- collectModule' :: FilePath -> FilePath -> Bool -> PackageIdentifier -> [String] -> ModuleName -> IO()
- collectModule' sourcePath destPath writeAscii packId opts moduleName' = gcatch (
--    inGhcIO (opts++["-cpp"]) [Opt_Haddock] $ \ _dynFlags -> do
-+    inGhcIO (opts++["-cpp"]) [Opt_Haddock] $ \ dynFlags -> do
-         session         <-  getSession
- #if MIN_VERSION_ghc(7,2,0)
-         (dynFlags3,fp') <-  liftIO $ preprocess session (sourcePath,Nothing)
- #else
-         (dynFlags3,fp') <-  preprocess session (sourcePath,Nothing)
- #endif
--        mbInterfaceDescr <- mayGetInterfaceDescription packId moduleName'
-+        mbInterfaceDescr <- mayGetInterfaceDescription dynFlags packId moduleName'
-         liftIO $ do
-             stringBuffer    <-  hGetStringBuffer fp'
-             parseResult     <-  myParseModule dynFlags3 sourcePath (Just stringBuffer)
-             case parseResult of
-                 Right (L _ hsMod@(HsModule{})) -> do
--                    let moduleDescr = extractModDescr packId moduleName' sourcePath hsMod
-+                    let moduleDescr = extractModDescr dynFlags packId moduleName' sourcePath hsMod
-                     let moduleDescr' = case mbInterfaceDescr of
-                                             Nothing -> moduleDescr
-                                             Just md  -> mergeWithInterfaceDescr moduleDescr md
--                    catch (writeExtractedModule destPath writeAscii moduleDescr')
--                        (\ _ -> errorM "leksah-server" ("Can't write extracted package " ++ destPath))
-+                    E.catch (writeExtractedModule destPath writeAscii moduleDescr')
-+                        (\ (_::IOException) -> errorM "leksah-server" ("Can't write extracted package " ++ destPath))
-                 Left errMsg -> do
-                     errorM "leksah-server" $ "Failed to parse " ++ sourcePath ++ " " ++ show errMsg
-                     let moduleDescr =  ModuleDescr {
-@@ -181,8 +197,8 @@
-                         ,   dscMbComment'   =   Just (BS.pack $ show errMsg)
-                         ,   dscTypeHint'    =   ErrorDescr
-                         ,   dscExported'    =   False}]}
--                    catch (deepseq moduleDescr $ writeExtractedModule destPath writeAscii moduleDescr)
--                        (\ _ -> errorM "leksah-server" ("Can't write extracted module " ++ destPath))
-+                    E.catch (deepseq moduleDescr $ writeExtractedModule destPath writeAscii moduleDescr)
-+                        (\ (_::IOException) -> errorM "leksah-server" ("Can't write extracted module " ++ destPath))
-     ) (\ (e :: SomeException) -> errorM "leksah-server" ("Can't extract module " ++ destPath ++ " " ++ show e))
- 
- 
-@@ -195,22 +211,22 @@
- -----------------------------------------------------------------------------------
- -- Format conversion
- 
--extractModDescr :: PackageIdentifier -> ModuleName -> FilePath -> HsModule RdrName -> ModuleDescr
--extractModDescr packId moduleName' sourcePath hsMod = ModuleDescr {
-+extractModDescr :: DynFlags -> PackageIdentifier -> ModuleName -> FilePath -> HsModule RdrName -> ModuleDescr
-+extractModDescr dflags packId moduleName' sourcePath hsMod = ModuleDescr {
-         mdModuleId          =   PM packId moduleName'
-     ,   mdMbSourcePath      =   Just sourcePath
-     ,   mdReferences        =   Map.empty -- imports
-     ,   mdIdDescriptions    =   descrs'}
-     where
--        descrs = extractDescrs (PM packId moduleName') (hsmodDecls hsMod)
--        descrs' = fixExports (hsmodExports hsMod) descrs
-+        descrs = extractDescrs dflags (PM packId moduleName') (hsmodDecls hsMod)
-+        descrs' = fixExports dflags (hsmodExports hsMod) descrs
- 
- -----------------------------------------------------------------------------------
- -- Add exported hint
- 
--fixExports :: Maybe [LIE RdrName] -> [Descr] -> [Descr]
--fixExports Nothing descrs = descrs
--fixExports (Just iel) descrs = map (fixDescr (map unLoc iel)) descrs
-+fixExports :: DynFlags -> Maybe [LIE RdrName] -> [Descr] -> [Descr]
-+fixExports _ Nothing descrs = descrs
-+fixExports dflags (Just iel) descrs = map (fixDescr (map unLoc iel)) descrs
-     where
-         fixDescr ::  [IE RdrName] -> Descr -> Descr
-         fixDescr _ d@(Reexported _) = d
-@@ -223,18 +239,18 @@
-                                                 Nothing                -> nothingExported rd
-                                                 Just (IEThingAll _)    -> allExported rd
-                                                 Just (IEThingAbs _)    -> someExported rd []
--                                                Just (IEThingWith _ l) -> someExported rd (map showRdrName l)
-+                                                Just (IEThingWith _ l) -> someExported rd (map (showRdrName dflags) l)
-                                                 _                      -> allExported rd
-                 findVar = find (\ a ->
-                             case a of
--                                IEVar r | showRdrName r == dscName' rd -> True
-+                                IEVar r | showRdrName dflags r == dscName' rd -> True
-                                 _                                     -> False)
-                                     list
-                 findThing = find (\ a ->
-                                 case a of
--                                IEThingAbs r | showRdrName r == dscName' rd -> True
--                                IEThingAll r | showRdrName r == dscName' rd -> True
--                                IEThingWith r _list | showRdrName r == dscName' rd -> True
-+                                IEThingAbs r | showRdrName dflags r == dscName' rd -> True
-+                                IEThingAll r | showRdrName dflags r == dscName' rd -> True
-+                                IEThingWith r _list | showRdrName dflags r == dscName' rd -> True
-                                 _                                     -> False)
-                                     list
-         allExported rd                                 = rd
-@@ -265,14 +281,14 @@
-         maySetExportedSD list sd = sd{sdExported = elem (sdName sd) list}
- 
- 
--extractDescrs :: PackModule -> [NDecl] -> [Descr]
--extractDescrs pm decls = transformToDescrs pm tripleWithSigs
-+extractDescrs :: DynFlags -> PackModule -> [NDecl] -> [Descr]
-+extractDescrs dflags pm decls = transformToDescrs dflags pm tripleWithSigs
-     where
-         sortedDecls                    = sortByLoc decls
-         pairedWithDocs                 = collectDocs sortedDecls
-         filteredDecls                  = filterUninteresting pairedWithDocs
-         (withoutSignatures,signatures) = partitionSignatures filteredDecls
--        tripleWithSigs                 = attachSignatures signatures withoutSignatures
-+        tripleWithSigs                 = attachSignatures dflags signatures withoutSignatures
- 
- -- | Sort by source location
- sortByLoc :: [Located a] -> [Located a]
-@@ -343,15 +359,15 @@
- sigNameNoLoc' = maybe [] (:[]) . sigNameNoLoc
- #endif
- 
--attachSignatures :: [(NDecl, (Maybe NDoc))] -> [(NDecl,Maybe NDoc)]
-+attachSignatures :: DynFlags -> [(NDecl, (Maybe NDoc))] -> [(NDecl,Maybe NDoc)]
-     -> [(NDecl, (Maybe NDoc), [(NSig,Maybe NDoc)])]
--attachSignatures signatures = map (attachSignature signaturesMap)
-+attachSignatures dflags signatures = map (attachSignature signaturesMap)
-     where
-     signaturesMap = Map.fromListWith (++) $ concatMap sigMap signatures
- 
-     sigMap (L loc (SigD sig),c) | nameList <- sigNameNoLoc' sig =
-         map (\n -> (n, [(L loc sig,c)])) nameList
--    sigMap v = error ("Unexpected location type" ++ (showSDoc . ppr) v)
-+    sigMap v = error ("Unexpected location type" ++ (showSDoc dflags . ppr) v)
- 
-     attachSignature :: Map RdrName  [(NSig,Maybe NDoc)] -> (NDecl, (Maybe NDoc))
-         -> (NDecl, (Maybe NDoc), [(NSig,Maybe NDoc)])
-@@ -366,24 +382,72 @@
-     declName _                                      = Nothing
- 
- 
--transformToDescrs :: PackModule -> [(NDecl, (Maybe NDoc), [(NSig, Maybe NDoc)])] -> [Descr]
--transformToDescrs pm = concatMap transformToDescr
-+transformToDescrs :: DynFlags -> PackModule -> [(NDecl, (Maybe NDoc), [(NSig, Maybe NDoc)])] -> [Descr]
-+transformToDescrs dflags pm = concatMap transformToDescr
-     where
-     transformToDescr :: (NDecl, (Maybe NDoc), [(NSig, Maybe NDoc)]) -> [Descr]
-     transformToDescr ((L loc (ValD (FunBind lid _ _ _ _ _))), mbComment,sigList) =
-         [Real $ RealDescr {
--        dscName'        =   showRdrName (unLoc lid)
--    ,   dscMbTypeStr'   =   sigToByteString sigList
-+        dscName'        =   showRdrName dflags (unLoc lid)
-+    ,   dscMbTypeStr'   =   sigToByteString dflags sigList
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment (catMaybes (map snd sigList))
-     ,   dscTypeHint'    =   VariableDescr
-     ,   dscExported'    =   True}]
- 
-+#if MIN_VERSION_ghc(7,6,0)
-+    transformToDescr ((L loc (TyClD typ@(ForeignType {tcdLName = lid}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   showRdrName dflags (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscTypeHint'    =   TypeDescr
-+    ,   dscExported'    =   True}]
-+
-+    transformToDescr ((L loc (TyClD typ@(TyFamily {tcdLName = lid}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   showRdrName dflags (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscTypeHint'    =   TypeDescr
-+    ,   dscExported'    =   True}]
-+
-+    transformToDescr ((L loc (TyClD typ@(TyDecl {tcdLName = lid, tcdTyDefn = TySynonym {}}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   showRdrName dflags (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscTypeHint'    =   TypeDescr
-+    ,   dscExported'    =   True}]
-+
-+    transformToDescr ((L loc (TyClD typ@(TyDecl {tcdLName = lid, tcdTyDefn = TyData {td_cons=lConDecl, td_derivs=tcdDerivs'}}))), mbComment,_sigList) =
-+        [Real $ RealDescr {
-+        dscName'        =   name
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr (uncommentData typ)))
-+    ,   dscMbModu'      =   Just pm
-+    ,   dscMbLocation'  =   srcSpanToLocation loc
-+    ,   dscMbComment'   =   toComment mbComment []
-+    ,   dscTypeHint'    =   DataDescr constructors fields
-+    ,   dscExported'    =   True}]
-+            ++ derivings tcdDerivs'
-+        where
-+        constructors    =   map (extractConstructor dflags) lConDecl
-+        fields          =   nub $ concatMap (extractRecordFields dflags) lConDecl
-+        name            =   showRdrName dflags (unLoc lid)
-+        derivings Nothing = []
-+        derivings (Just l) = map (extractDeriving dflags pm name) l
-+#else
-     transformToDescr ((L loc (TyClD typ@(TySynonym lid _ _ _ ))), mbComment,_sigList) =
-         [Real $ RealDescr {
--        dscName'        =   showRdrName (unLoc lid)
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr typ))
-+        dscName'        =   showRdrName dflags (unLoc lid)
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr typ))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment []
-@@ -393,7 +457,7 @@
-     transformToDescr ((L loc (TyClD typ@(TyData DataType _ tcdLName' _ _ _ lConDecl tcdDerivs'))), mbComment,_sigList) =
-         [Real $ RealDescr {
-         dscName'        =   name
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr (uncommentData typ)))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr (uncommentData typ)))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment []
-@@ -401,16 +465,16 @@
-     ,   dscExported'    =   True}]
-             ++ derivings tcdDerivs'
-         where
--        constructors    =   map extractConstructor lConDecl
--        fields          =   nub $ concatMap extractRecordFields lConDecl
--        name            =   showRdrName (unLoc tcdLName')
-+        constructors    =   map (extractConstructor dflags) lConDecl
-+        fields          =   nub $ concatMap (extractRecordFields dflags) lConDecl
-+        name            =   showRdrName dflags (unLoc tcdLName')
-         derivings Nothing = []
--        derivings (Just l) = map (extractDeriving pm name) l
-+        derivings (Just l) = map (extractDeriving dflags pm name) l
- 
-     transformToDescr ((L loc (TyClD typ@(TyData NewType _ tcdLName' _ _ _ lConDecl tcdDerivs'))), mbComment,_sigList) =
-         [Real $ RealDescr {
-         dscName'        =   name
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr (uncommentData typ)))
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr (uncommentData typ)))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment []
-@@ -418,39 +482,44 @@
-     ,   dscExported'    =   True}]
-             ++ derivings tcdDerivs'
-         where
--        constructor     =   forceHead (map extractConstructor lConDecl)
-+        constructor     =   forceHead (map (extractConstructor dflags) lConDecl)
-                                 "WorkspaceCollector>>transformToDescr: no constructor for newtype"
--        mbField         =   case concatMap extractRecordFields lConDecl of
-+        mbField         =   case concatMap (extractRecordFields dflags) lConDecl of
-                                 [] -> Nothing
-                                 a:_ -> Just a
--        name            =   showRdrName (unLoc tcdLName')
-+        name            =   showRdrName dflags (unLoc tcdLName')
-         derivings Nothing = []
--        derivings (Just l) = map (extractDeriving pm name) l
-+        derivings (Just l) = map (extractDeriving dflags pm name) l
-+#endif
- 
-     transformToDescr ((L loc (TyClD cl@(ClassDecl{tcdLName=tcdLName', tcdSigs=tcdSigs', tcdDocs=docs}))), mbComment,_sigList) =
-         [Real $ RealDescr {
--        dscName'        =   showRdrName (unLoc tcdLName')
--    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual $ppr cl{tcdMeths = emptyLHsBinds}))
-+        dscName'        =   showRdrName dflags (unLoc tcdLName')
-+    ,   dscMbTypeStr'   =   Just (BS.pack (showSDocUnqual dflags $ppr cl{tcdMeths = emptyLHsBinds}))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment []
-     ,   dscTypeHint'    =   ClassDescr super methods
-     ,   dscExported'    =   True    }]
-         where
--        methods         =   extractMethods tcdSigs' docs
-+        methods         =   extractMethods dflags tcdSigs' docs
-         super           =   []
- 
-+#if MIN_VERSION_ghc(7,6,0)
-+    transformToDescr ((L loc (InstD _inst@(ClsInstD typ _ _ _))), mbComment, _sigList) =
-+#else
-     transformToDescr ((L loc (InstD _inst@(InstDecl typ _ _ _))), mbComment, _sigList) =
-+#endif
-         [Real $ RealDescr {
-         dscName'        =   name
--    ,   dscMbTypeStr'   =   Just (BS.pack ("instance " ++ (showSDocUnqual $ppr typ)))
-+    ,   dscMbTypeStr'   =   Just (BS.pack ("instance " ++ (showSDocUnqual dflags $ppr typ)))
-     ,   dscMbModu'      =   Just pm
-     ,   dscMbLocation'  =   srcSpanToLocation loc
-     ,   dscMbComment'   =   toComment mbComment []
-     ,   dscTypeHint'    =   InstanceDescr other
-     ,   dscExported'    =   True}]
-         where
--        (name,other)           =   case words (showSDocUnqual $ppr typ) of
-+        (name,other)           =   case words (showSDocUnqual dflags $ppr typ) of
-                                 [] -> ("",[])
-                                 hd:tl -> (hd,tl)
- 
-@@ -458,7 +527,12 @@
- 
- 
- uncommentData :: TyClDecl a -> TyClDecl a
-+#if MIN_VERSION_ghc(7,6,0)
-+uncommentData td@(TyDecl {tcdTyDefn = def@(TyData{td_cons = conDecls})}) = td{
-+    tcdTyDefn = def{td_cons = map uncommentDecl conDecls}}
-+#else
- uncommentData td@(TyData {tcdCons = conDecls}) = td{tcdCons = map uncommentDecl conDecls}
-+#endif
- uncommentData other                            = other
- 
- uncommentDecl :: LConDecl a -> LConDecl a
-@@ -489,8 +563,8 @@
-                                         Just d -> dscMbTypeStr d}
-         addType _ d                     = d
- 
--extractDeriving :: OutputableBndr alpha => PackModule -> String -> LHsType alpha -> Descr
--extractDeriving pm name (L loc typ) =
-+extractDeriving :: OutputableBndr alpha => DynFlags -> PackModule -> String -> LHsType alpha -> Descr
-+extractDeriving dflags pm name (L loc typ) =
-         Real $ RealDescr {
-         dscName'        =   className
-     ,   dscMbTypeStr'   =   Just (BS.pack ("instance " ++ (className ++ " " ++ name)))
-@@ -500,61 +574,61 @@
-     ,   dscTypeHint'    =   InstanceDescr (words name)
-     ,   dscExported'    =   True}
-         where
--        className       =   showSDocUnqual $ ppr typ
-+        className       =   showSDocUnqual dflags $ ppr typ
- 
--extractMethods :: [LSig RdrName] -> [MyLDocDecl] -> [SimpleDescr]
--extractMethods sigs docs =
-+extractMethods :: DynFlags -> [LSig RdrName] -> [MyLDocDecl] -> [SimpleDescr]
-+extractMethods dflags sigs docs =
-     let pairs = attachComments sigs docs
--    in mapMaybe extractMethod pairs
-+    in mapMaybe (extractMethod dflags) pairs
- 
--extractMethod :: OutputableBndr alpha => (LHsDecl alpha, Maybe (NDoc)) -> Maybe SimpleDescr
-+extractMethod :: OutputableBndr alpha => DynFlags -> (LHsDecl alpha, Maybe (NDoc)) -> Maybe SimpleDescr
- #if MIN_VERSION_ghc(7,2,0)
--extractMethod ((L loc (SigD ts@(TypeSig [name] _typ))), mbDoc) =
-+extractMethod dflags ((L loc (SigD ts@(TypeSig [name] _typ))), mbDoc) =
- #else
--extractMethod ((L loc (SigD ts@(TypeSig name _typ))), mbDoc) =
-+extractMethod dflags ((L loc (SigD ts@(TypeSig name _typ))), mbDoc) =
- #endif
-     Just $ SimpleDescr
--        ((showSDoc . ppr) (unLoc name))
--        (Just (BS.pack (showSDocUnqual $ ppr ts)))
-+        ((showSDoc dflags . ppr) (unLoc name))
-+        (Just (BS.pack (showSDocUnqual dflags $ ppr ts)))
-         (srcSpanToLocation loc)
-         (toComment mbDoc [])
-         True
--extractMethod (_, _mbDoc) = Nothing
-+extractMethod _ (_, _mbDoc) = Nothing
- 
--extractConstructor :: Located (ConDecl RdrName) -> SimpleDescr
--extractConstructor decl@(L loc (ConDecl {con_name = name, con_doc = doc})) =
-+extractConstructor :: DynFlags -> Located (ConDecl RdrName) -> SimpleDescr
-+extractConstructor dflags decl@(L loc (ConDecl {con_name = name, con_doc = doc})) =
-     SimpleDescr
--        ((showSDoc . ppr) (unLoc name))
--        (Just (BS.pack (showSDocUnqual $ppr (uncommentDecl decl))))
-+        ((showSDoc dflags . ppr) (unLoc name))
-+        (Just (BS.pack (showSDocUnqual dflags $ppr (uncommentDecl decl))))
-         (srcSpanToLocation loc)
-         (case doc of
-             Nothing -> Nothing
-             Just (L _ d) -> Just (BS.pack (printHsDoc d)))
-         True
- 
--extractRecordFields :: Located (ConDecl RdrName) -> [SimpleDescr]
--extractRecordFields (L _ _decl@(ConDecl {con_details = RecCon flds})) =
-+extractRecordFields :: DynFlags -> Located (ConDecl RdrName) -> [SimpleDescr]
-+extractRecordFields dflags (L _ _decl@(ConDecl {con_details = RecCon flds})) =
-     map extractRecordFields' flds
-     where
-     extractRecordFields' _field@(ConDeclField (L loc name) typ doc) =
-         SimpleDescr
--            ((showSDoc . ppr) name)
--            (Just (BS.pack (showSDocUnqual $ ppr typ)))
-+            ((showSDoc dflags . ppr) name)
-+            (Just (BS.pack (showSDocUnqual dflags $ ppr typ)))
-             (srcSpanToLocation loc)
-             (case doc of
-                 Nothing -> Nothing
-                 Just (L _ d) -> Just (BS.pack (printHsDoc d)))
-             True
--extractRecordFields _ = []
-+extractRecordFields _ _ = []
- 
- attachComments :: [LSig RdrName] -> [MyLDocDecl] -> [(LHsDecl RdrName, Maybe (NDoc))]
- attachComments sigs docs = collectDocs $ sortByLoc $
-         ((map (\ (L l i) -> L l (SigD i)) sigs) ++ (map (\ (L l i) -> L l (DocD i)) docs))
- 
--sigToByteString ::  [(NSig, Maybe NDoc)] -> Maybe ByteString
--sigToByteString [] = Nothing
--sigToByteString [(sig,_)] = Just (BS.pack (showSDocUnqual $ppr sig))
--sigToByteString ((sig,_):_) = Just (BS.pack (showSDocUnqual $ppr sig))
-+sigToByteString :: DynFlags -> [(NSig, Maybe NDoc)] -> Maybe ByteString
-+sigToByteString _ [] = Nothing
-+sigToByteString dflags [(sig,_)] = Just (BS.pack (showSDocUnqual dflags $ppr sig))
-+sigToByteString dflags ((sig,_):_) = Just (BS.pack (showSDocUnqual dflags $ppr sig))
- 
- srcSpanToLocation :: SrcSpan -> Maybe Location
- #if MIN_VERSION_ghc(7,2,0)
-@@ -638,16 +712,16 @@
-             M.Succeeded val ->    return (Just val)
-             _               ->    return Nothing
- 
--mayGetInterfaceDescription ::  PackageIdentifier -> ModuleName -> Ghc (Maybe ModuleDescr)
--mayGetInterfaceDescription pid mn = do
-+mayGetInterfaceDescription :: DynFlags -> PackageIdentifier -> ModuleName -> Ghc (Maybe ModuleDescr)
-+mayGetInterfaceDescription dflags pid mn = do
-     mbIf <- mayGetInterfaceFile pid mn
-     case mbIf of
-         Nothing -> do
-             liftIO $ debugM "leksah-server" ("no interface file for " ++ show mn)
-             return Nothing
-         Just (mif,_) ->
--            let allDescrs  =    extractExportedDescrH pid mif
--                mod'       =    extractExportedDescrR pid allDescrs mif
-+            let allDescrs  =    extractExportedDescrH dflags pid mif
-+                mod'       =    extractExportedDescrR dflags pid allDescrs mif
-             in do
-                 liftIO $ debugM "leksah-server" ("interface file for " ++ show mn ++ " descrs: " ++
-                                     show (length (mdIdDescriptions mod')))
-Index: b/src/IDE/Utils/FileUtils.hs
-===================================================================
---- a/src/IDE/Utils/FileUtils.hs
-+++ b/src/IDE/Utils/FileUtils.hs
-@@ -80,6 +80,7 @@
- import System.Log.Logger(errorM,warningM,debugM)
- import IDE.Utils.Tool
- import Control.Monad.IO.Class (MonadIO(..), MonadIO)
-+import Control.Exception as E (SomeException, catch)
- 
- haskellSrcExts :: [String]
- haskellSrcExts = ["hs","lhs","chs","hs.pp","lhs.pp","chs.pp","hsc"]
-@@ -122,12 +123,12 @@
- 
- find' :: [FilePath] -> IO (Maybe FilePath)
- find' []            =   return Nothing
--find' (h:t)         =   catch (do
-+find' (h:t)         =   E.catch (do
-     exists <- doesFileExist h
-     if exists
-         then return (Just h)
-         else find' t)
--        $ \ _ -> return Nothing
-+        $ \ (_ :: SomeException) -> return Nothing
- 
- -- | The directory where config files reside
- --
-@@ -181,7 +182,7 @@
-     return (cd </> fn)
- 
- allModules :: FilePath -> IO [ModuleName]
--allModules filePath = catch (do
-+allModules filePath = E.catch (do
-     exists <- doesDirectoryExist filePath
-     if exists
-         then do
-@@ -202,7 +203,7 @@
-             otherModules <- mapM allModules dirs
-             return (mbModuleNames ++ concat otherModules)
-         else return [])
--            $ \ _ -> return []
-+            $ \ (_ :: SomeException) -> return []
- 
- allHiFiles :: FilePath -> IO [FilePath]
- allHiFiles = allFilesWithExtensions [".hi"] True []
-@@ -214,7 +215,7 @@
- allHaskellSourceFiles = allFilesWithExtensions [".hs",".lhs"] True []
- 
- allFilesWithExtensions :: [String] -> Bool -> [FilePath] -> FilePath -> IO [FilePath]
--allFilesWithExtensions extensions recurseFurther collecting filePath = catch (do
-+allFilesWithExtensions extensions recurseFurther collecting filePath = E.catch (do
-     exists <- doesDirectoryExist filePath
-     if exists
-         then do
-@@ -231,18 +232,18 @@
-                     else return (choosenFiles ++ collecting)
-             return (allFiles)
-         else return collecting)
--            $ \ _ -> return collecting
-+            $ \ (_ :: SomeException) -> return collecting
- 
- 
- moduleNameFromFilePath :: FilePath -> IO (Maybe String)
--moduleNameFromFilePath fp = catch (do
-+moduleNameFromFilePath fp = E.catch (do
-     exists <- doesFileExist fp
-     if exists
-         then do
-             str <-  readFile fp
-             moduleNameFromFilePath' fp str
-         else return Nothing)
--            $ \ _ -> return Nothing
-+            $ \ (_ :: SomeException) -> return Nothing
- 
- moduleNameFromFilePath' :: FilePath -> String -> IO (Maybe String)
- moduleNameFromFilePath' fp str = do
-@@ -300,24 +301,24 @@
-         <?> "midentifier"
- 
- findKnownPackages :: FilePath -> IO (Set String)
--findKnownPackages filePath = catch (do
-+findKnownPackages filePath = E.catch (do
-     paths           <-  getDirectoryContents filePath
-     let nameList    =   map dropExtension  $filter (\s -> leksahMetadataSystemFileExtension `isSuffixOf` s) paths
-     return (Set.fromList nameList))
--        $ \ _ -> return (Set.empty)
-+        $ \ (_ :: SomeException) -> return (Set.empty)
- 
- isEmptyDirectory :: FilePath -> IO Bool
--isEmptyDirectory filePath = catch (do
-+isEmptyDirectory filePath = E.catch (do
-     exists <- doesDirectoryExist filePath
-     if exists
-         then do
-             filesAndDirs <- getDirectoryContents filePath
-             return . null $ filter (not . ("." `isPrefixOf`) . takeFileName) filesAndDirs
-         else return False)
--        (\_ -> return False)
-+        (\ (_ :: SomeException) -> return False)
- 
- cabalFileName :: FilePath -> IO (Maybe FilePath)
--cabalFileName filePath = catch (do
-+cabalFileName filePath = E.catch (do
-     exists <- doesDirectoryExist filePath
-     if exists
-         then do
-@@ -332,7 +333,7 @@
-                         warningM "leksah-server" "Multiple cabal files"
-                         return Nothing
-         else return Nothing)
--        (\_ -> return Nothing)
-+        (\ (_ :: SomeException) -> return Nothing)
- 
- getCabalUserPackageDir :: IO (Maybe FilePath)
- getCabalUserPackageDir = do
-@@ -355,7 +356,7 @@
- 
- autoExtractTarFiles' :: FilePath -> IO ()
- autoExtractTarFiles' filePath =
--    catch (do
-+    E.catch (do
-         exists <- doesDirectoryExist filePath
-         if exists
-             then do
-@@ -376,7 +377,7 @@
-                 mapM_ autoExtractTarFiles' dirs
-                 return ()
-             else return ()
--    ) $ \ _ -> return ()
-+    ) $ \ (_ :: SomeException) -> return ()
- 
- 
- getCollectorPath :: MonadIO m => m FilePath
-@@ -391,21 +392,21 @@
-             return filePath
- 
- getSysLibDir :: IO FilePath
--getSysLibDir = catch (do
-+getSysLibDir = E.catch (do
-     (!output,_) <- runTool' "ghc" ["--print-libdir"] Nothing
-     let libDir = toolline $ head output
-         libDir2 = if ord (last libDir) == 13
-                     then List.init libDir
-                     else libDir
-     return (normalise libDir2)
--    ) $ \ _ -> error ("FileUtils>>getSysLibDir failed")
-+    ) $ \ (_ :: SomeException) -> error ("FileUtils>>getSysLibDir failed")
- 
- getInstalledPackageIds :: IO [PackageIdentifier]
--getInstalledPackageIds = catch (do
-+getInstalledPackageIds = E.catch (do
-     (!output, _) <- runTool' "ghc-pkg" ["list", "--simple-output"] Nothing
-     let names = toolline $ head output
-     return (catMaybes (map T.simpleParse (words names)))
--    ) $ \ _ -> error ("FileUtils>>getInstalledPackageIds failed")
-+    ) $ \ (_ :: SomeException) -> error ("FileUtils>>getInstalledPackageIds failed")
- 
- figureOutHaddockOpts :: IO [String]
- figureOutHaddockOpts = do
-Index: b/src/IDE/Utils/GHCUtils.hs
-===================================================================
---- a/src/IDE/Utils/GHCUtils.hs
-+++ b/src/IDE/Utils/GHCUtils.hs
-@@ -37,7 +37,11 @@
- import Lexer (mkPState,ParseResult(..),getMessages,unP)
- import Outputable (ppr)
- #if MIN_VERSION_ghc(7,2,0)
--import ErrUtils (dumpIfSet_dyn,printBagOfErrors,printBagOfWarnings,errorsFound,mkPlainErrMsg,showPass,ErrMsg(..))
-+#if MIN_VERSION_ghc(7,6,0)
-+#else
-+import ErrUtils (printBagOfWarnings)
-+#endif
-+import ErrUtils (dumpIfSet_dyn,printBagOfErrors,errorsFound,mkPlainErrMsg,showPass,ErrMsg(..))
- import Control.Monad (unless)
- #else
- import ErrUtils (dumpIfSet_dyn,printErrorsAndWarnings,mkPlainErrMsg,showPass,ErrMsg(..))
-@@ -101,7 +105,9 @@
- getInstalledPackageInfos :: Ghc [PackageConfig]
- getInstalledPackageInfos = do
-     dflags1         <-  getSessionDynFlags
-+#if !MIN_VERSION_ghc(7,6,0)
-     setSessionDynFlags $ dopt_set dflags1 Opt_ReadUserPackageConf
-+#endif
-     pkgInfos        <-  case pkgDatabase dflags1 of
-                             Nothing -> return []
- #if MIN_VERSION_Cabal(1,8,0)
-@@ -158,14 +164,22 @@
-       case unP P.parseModule (mkPState buf' loc dflags) of {
- #endif
- 
--	PFailed span' err -> return (Left (mkPlainErrMsg span' err));
-+#if MIN_VERSION_ghc(7,6,0)
-+        PFailed span' err -> return (Left (mkPlainErrMsg dflags span' err));
-+#else
-+        PFailed span' err -> return (Left (mkPlainErrMsg span' err));
-+#endif
- 
- 	POk pst rdr_module -> do {
- 
- #if MIN_VERSION_ghc(7,2,0)
-       let {ms@(warnings, errors) = getMessages pst};
-       printBagOfErrors dflags errors;
-+#if MIN_VERSION_ghc(7,6,0)
-+      unless (errorsFound dflags ms) $ printBagOfErrors dflags warnings;
-+#else
-       unless (errorsFound dflags ms) $ printBagOfWarnings dflags warnings;
-+#endif
- #else
-       let {ms = getMessages pst};
-       printErrorsAndWarnings dflags ms;
-@@ -181,7 +195,7 @@
- 	-- ToDo: free the string buffer later.
-       }}
- 
--myParseHeader :: FilePath -> String -> [String] -> IO (Either String (HsModule RdrName))
-+myParseHeader :: FilePath -> String -> [String] -> IO (Either String (DynFlags, HsModule RdrName))
- myParseHeader fp _str opts = inGhcIO (opts++["-cpp"]) [] $ \ _dynFlags -> do
-     session   <- getSession
- #if MIN_VERSION_ghc(7,2,0)
-@@ -193,7 +207,7 @@
-         stringBuffer  <-  hGetStringBuffer fp'
-         parseResult   <-  myParseModuleHeader dynFlags' fp (Just stringBuffer)
-         case parseResult of
--            Right (L _ mod') -> return (Right mod')
-+            Right (L _ mod') -> return (Right (dynFlags', mod'))
-             Left errMsg         -> do
-                 let str =  "Failed to parse " ++ show errMsg
-                 return (Left str)
-@@ -204,9 +218,9 @@
- myParseModuleHeader :: DynFlags -> FilePath -> Maybe StringBuffer
-               -> IO (Either ErrMsg (Located (HsModule RdrName)))
- myParseModuleHeader dflags src_filename maybe_src_buf
-- =    --------------------------  Parser  ----------------
--      showPass dflags "Parser" >>
--      {-# SCC "Parser" #-} do
-+ =  --------------------------  Parser  ----------------
-+    showPass dflags "Parser" >>
-+    {-# SCC "Parser" #-} do
- 
- 	-- sometimes we already have the buffer in memory, perhaps
- 	-- because we needed to parse the imports out of it, or get the
-@@ -227,14 +241,22 @@
-       case unP P.parseHeader (mkPState buf' loc dflags) of {
- #endif
- 
--	PFailed span' err -> return (Left (mkPlainErrMsg span' err));
-+#if MIN_VERSION_ghc(7,6,0)
-+        PFailed span' err -> return (Left (mkPlainErrMsg dflags span' err));
-+#else
-+        PFailed span' err -> return (Left (mkPlainErrMsg span' err));
-+#endif
- 
- 	POk pst rdr_module -> do {
- 
- #if MIN_VERSION_ghc(7,2,0)
-       let {ms@(warnings, errors) = getMessages pst};
-       printBagOfErrors dflags errors;
-+#if MIN_VERSION_ghc(7,6,0)
-+      unless (errorsFound dflags ms) $ printBagOfErrors dflags warnings;
-+#else
-       unless (errorsFound dflags ms) $ printBagOfWarnings dflags warnings;
-+#endif
- #else
-       let {ms = getMessages pst};
-       printErrorsAndWarnings dflags ms;
-Index: b/src/IDE/Utils/Server.hs
-===================================================================
---- a/src/IDE/Utils/Server.hs
-+++ b/src/IDE/Utils/Server.hs
-@@ -1,4 +1,4 @@
--{-# OPTIONS_GHC -XFlexibleInstances #-}
-+{-# LANGUAGE FlexibleInstances, ScopedTypeVariables #-}
- -----------------------------------------------------------------------------
- --
- -- Module      :  IDE.Utils.Server
-@@ -28,7 +28,7 @@
- 
- import System.IO
- import Control.Concurrent
--import Control.Exception hiding (catch)
-+import Control.Exception as E
- 
- import Data.Word
- import System.Log.Logger (infoM)
-@@ -97,9 +97,10 @@
- 	waitFor (_, mvar) = waitFor mvar
- 
- acceptance :: Socket -> ServerRoutine -> IO ()
--acceptance sock action = catch (do
-+acceptance sock action = E.catch (do
- 		dta <- accept sock
--		forkIO (action dta) >> return ()) print >>
-+		forkIO (action dta) >> return ())
-+		(\(e :: SomeException) -> print e) >>
- 		acceptance sock action
- 
- 
-Index: b/src/IDE/Utils/VersionUtils.hs
-===================================================================
---- a/src/IDE/Utils/VersionUtils.hs
-+++ b/src/IDE/Utils/VersionUtils.hs
-@@ -22,9 +22,10 @@
- import Data.Char (ord)
- import qualified Data.List as List (init)
- import System.Log.Logger (debugM)
-+import Control.Exception as E (SomeException, catch)
- 
- getGhcVersion :: IO FilePath
--getGhcVersion = catch (do
-+getGhcVersion = E.catch (do
-     (!output,_) <- runTool' "ghc" ["--numeric-version"] Nothing
-     let vers = toolline $ head output
-         vers2 = if ord (last vers) == 13
-@@ -32,17 +33,17 @@
-                     else vers
-     debugM "leksah-server" $ "Got GHC Version " ++ vers2
-     return vers2
--    ) $ \ _ -> error ("FileUtils>>getGhcVersion failed")
-+    ) $ \ (_ :: SomeException) -> error ("FileUtils>>getGhcVersion failed")
- 
- getHaddockVersion :: IO String
--getHaddockVersion = catch (do
-+getHaddockVersion = E.catch (do
-     (!output,_) <- runTool' "haddock" ["--version"] Nothing
-     let vers = toolline $ head output
-         vers2 = if ord (last vers) == 13
-                     then List.init vers
-                     else vers
-     return vers2
--    ) $ \ _ -> error ("FileUtils>>getHaddockVersion failed")
-+    ) $ \ (_ :: SomeException) -> error ("FileUtils>>getHaddockVersion failed")
- 
- 
- 
diff --git a/patches/leksah-server/0.12.1.2/series b/patches/leksah-server/0.12.1.2/series
deleted file mode 100644
index fbd6b7e..0000000
--- a/patches/leksah-server/0.12.1.2/series
+++ /dev/null
@@ -1 +0,0 @@
-ghc-7.6-compatibility.patch
diff --git a/patches/leksah-server/0.14.0.1/no-attoparsec-conduit b/patches/leksah-server/0.14.0.1/no-attoparsec-conduit
deleted file mode 100644
index 04ea644..0000000
--- a/patches/leksah-server/0.14.0.1/no-attoparsec-conduit
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: leksah-server-0.14.0.1/leksah-server.cabal
-===================================================================
---- leksah-server-0.14.0.1.orig/leksah-server.cabal	2014-12-21 12:18:47.720538480 +0100
-+++ leksah-server-0.14.0.1/leksah-server.cabal	2014-12-21 12:19:22.829261333 +0100
-@@ -40,7 +40,7 @@
-                pretty >=1.0.1.0 && <1.2, time >=1.1 && <1.5, deepseq >=1.1 && <1.4,
-                hslogger >= 1.0.7 && <1.3, network >=2.2 && <3.0, conduit >= 1.0.8 && <1.3,
-                conduit-extra >=1.0.0.1 && <1.2, resourcet,
--               attoparsec-conduit >=1.0.1.2 && <1.2, attoparsec >=0.10.0.3 && <0.13,
-+               attoparsec >=0.10.0.3 && <0.13,
-                transformers >=0.2.2.0 && <0.5, strict >=0.3.2 && <0.4, text >=0.11.3.1 && <1.3
-     if (impl(ghc >= 7.8))
-        build-depends: haddock >= 2.7.2 && <2.15
-@@ -104,7 +104,7 @@
-                pretty >=1.0.1.0 && <1.2, time >=1.1 && <1.5, deepseq >=1.1 && <1.4,
-                hslogger >= 1.0.7 && <1.3, network >=2.2 && <3.0, conduit >= 1.0.8 && <1.3,
-                conduit-extra >=1.0.0.1 && <1.2, resourcet,
--               attoparsec-conduit >=1.0.1.2 && <1.2, attoparsec >=0.10.0.3 && <0.13,
-+               attoparsec >=0.10.0.3 && <0.13,
-                transformers >=0.2.2.0 && <0.5, strict >=0.3.2 && <0.4, text >=0.11.3.1 && <1.3
-     if (impl(ghc >= 7.8))
-        build-depends: haddock >= 2.7.2 && <2.15
-@@ -177,7 +177,7 @@
-     build-depends:  base >= 4.0.0.0 && <4.8, hslogger >= 1.0.7 && <1.3, deepseq >=1.1 && <1.4,
-                bytestring >=0.9.0.1 && <0.11, conduit >= 1.0.8 && <1.3,
-                conduit-extra >=1.0.0.1 && <1.2, resourcet,
--               attoparsec-conduit >=1.0.1.2 && <1.2, attoparsec >=0.10.0.3 && <0.13,
-+               attoparsec >=0.10.0.3 && <0.13,
-                transformers >=0.2.2.0 && <0.5, text >=0.11.3.1 && <1.3
- 
-     if (impl(ghc >= 7.2))
diff --git a/patches/leksah-server/0.14.0.1/series b/patches/leksah-server/0.14.0.1/series
deleted file mode 100644
index 622fa67..0000000
--- a/patches/leksah-server/0.14.0.1/series
+++ /dev/null
@@ -1 +0,0 @@
-no-attoparsec-conduit
diff --git a/patches/leksah/0.12.1.3/ghc-7.6-compatibility.patch b/patches/leksah/0.12.1.3/ghc-7.6-compatibility.patch
deleted file mode 100644
index 475f403..0000000
--- a/patches/leksah/0.12.1.3/ghc-7.6-compatibility.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 04bfcb664d3672adc06ed9646b337b2a8fe7784d Mon Sep 17 00:00:00 2001
-From: Hamish Mackenzie <Hamish.K.Mackenzie at googlemail.com>
-Date: Wed, 10 Oct 2012 17:25:06 +1300
-Subject: [PATCH] GHC 7.6 fixes
-
----
- leksah.cabal                 | 28 ++++++++++++++--------------
- src/IDE/BufferMode.hs        |  9 ++++++++-
- src/IDE/Core/Types.hs        |  8 +++++++-
- src/IDE/Pane/SourceBuffer.hs |  5 +++--
- src/IDE/Utils/GUIUtils.hs    |  7 ++++---
- 5 files changed, 36 insertions(+), 21 deletions(-)
-
-Index: b/leksah.cabal
-===================================================================
---- a/leksah.cabal
-+++ b/leksah.cabal
-@@ -94,7 +94,7 @@
-         includes: windows.h
- --        include-dirs: C:/cygwin/usr/include/w32api
-     else
--        build-depends: unix >=2.3.1.0 && <2.6
-+        build-depends: unix >=2.3.1.0 && <2.7
- 
-     if os(osx)
-         build-depends: gtk-mac-integration >= 0.0.0.2 && <0.2
-@@ -113,17 +113,17 @@
-     hs-source-dirs: src
-     default-language: Haskell98
- 
--    build-depends: Cabal >=1.6.0.1 && <1.15, base >=4.0.0.0 && <4.6, binary >=0.5.0.0 && <0.6,
--                       bytestring >=0.9.0.1 && <0.10, containers >=0.2.0.0 && <0.5, directory >=1.0.0.2 && <3.1,
-+    build-depends: Cabal >=1.6.0.1 && <1.17, base >=4.0.0.0 && <4.7, binary >=0.5.0.0 && <0.6,
-+                       bytestring >=0.9.0.1 && <0.11, containers >=0.2.0.0 && <0.6, directory >=1.0.0.2 && <3.1,
-                        filepath >=1.1.0.1 && <1.4, glib >=0.10 && <0.13, gtk >=0.10 && <0.13,
-                        gtksourceview2 >=0.10.0 && <0.13, mtl >=1.1.0.2 && <2.2, old-time >=1.0.0.1 && <1.2,
-                        parsec >=2.1.0.1 && <3.2, pretty >=1.0.1.0 && <1.2,
-                        regex-tdfa ==1.1.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-                        time >=0.1 && <1.5, ltk >= 0.12.1.0 && <0.13, binary-shared >= 0.8 && <0.9, deepseq >= 1.1.0.0 && <1.4,
--                       hslogger >= 1.0.7 && <1.2, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
--                       ghc >=6.10.1 && <7.5, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-+                       hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-+                       ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-                        gio >=0.12.2 && <0.13, transformers >=0.2.2.0 && <0.4,
--                       QuickCheck >=2.4.2 && <2.5
-+                       QuickCheck >=2.4.2 && <2.6
- 
-     exposed-modules:
-         IDE.Leksah IDE.Completion IDE.ImportTool
-@@ -165,7 +165,7 @@
-         includes: windows.h
- --        include-dirs: C:/cygwin/usr/include/w32api
-     else
--        build-depends: unix >=2.3.1.0 && <2.6
-+        build-depends: unix >=2.3.1.0 && <2.7
- 
-     if os(osx)
-         build-depends: gtk-mac-integration >= 0.0.0.2 && <0.2
-@@ -187,17 +187,17 @@
- 
-     if impl(ghc < 7.0)
-         hs-source-dirs: src, main
--        build-depends: Cabal >=1.6.0.1 && <1.15, base >=4.0.0.0 && <4.6, binary >=0.5.0.0 && <0.6,
--                       bytestring >=0.9.0.1 && <0.10, containers >=0.2.0.0 && <0.5, directory >=1.0.0.2 && <3.1,
-+        build-depends: Cabal >=1.6.0.1 && <1.17, base >=4.0.0.0 && <4.7, binary >=0.5.0.0 && <0.6,
-+                       bytestring >=0.9.0.1 && <0.11, containers >=0.2.0.0 && <0.6, directory >=1.0.0.2 && <3.1,
-                        filepath >=1.1.0.1 && <1.4, glib >=0.10 && <0.13, gtk >=0.10 && <0.13,
-                        gtksourceview2 >=0.10.0 && <0.13, mtl >=1.1.0.2 && <2.2, old-time >=1.0.0.1 && <1.2,
-                        parsec >=2.1.0.1 && <3.2, pretty >=1.0.1.0 && <1.2,
-                        regex-tdfa ==1.1.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-                        time >=0.1 && <1.5, ltk >=0.12.1.0 && <0.13, binary-shared >= 0.8 && <0.9, deepseq >= 1.1.0.0 && <1.4,
--                       hslogger >= 1.0.7 && <1.2, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
--                       ghc >=6.10.1 && <7.5, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-+                       hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-+                       ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-                        gio >=0.12.2 && <0.13, transformers >=0.2.2.0 && <0.4,
--                       QuickCheck >=2.4.2 && <2.5
-+                       QuickCheck >=2.4.2 && <2.6
-     else
-         hs-source-dirs: main
-         build-depends: leksah ==0.12.1.3, base >=4.0.0.0 && <= 5
-@@ -214,7 +214,7 @@
-     type:       exitcode-stdio-1.0
-     hs-source-dirs: tests
-     main-is:    Tests.hs
--    build-depends: base >= 4.0.0.0 && <4.6, Cabal >=1.6.0.1 && <1.15, QuickCheck >=2.4.2 && <2.5,
-+    build-depends: base >= 4.0.0.0 && <4.7, Cabal >=1.6.0.1 && <1.17, QuickCheck >=2.4.2 && <2.6,
-                    leksah ==0.12.1.3
- 
- 
-Index: b/src/IDE/BufferMode.hs
-===================================================================
---- a/src/IDE/BufferMode.hs
-+++ b/src/IDE/BufferMode.hs
-@@ -1,4 +1,4 @@
--{-# LANGUAGE FlexibleInstances, DeriveDataTypeable, TypeSynonymInstances, MultiParamTypeClasses #-}
-+{-# LANGUAGE CPP, FlexibleInstances, DeriveDataTypeable, TypeSynonymInstances, MultiParamTypeClasses #-}
- -----------------------------------------------------------------------------
- --
- -- Module      :  IDE.BufferMode
-@@ -36,6 +36,9 @@
- import Graphics.UI.Gtk
-        (Notebook, castToWidget, notebookPageNum, ScrolledWindow)
- import Control.Monad.IO.Class (MonadIO(..))
-+#if MIN_VERSION_directory(1,2,0)
-+import Data.Time (UTCTime)
-+#endif
- 
- 
- -- * Buffer Basics
-@@ -49,7 +52,11 @@
- ,   addedIndex      ::  Int
- ,   sourceView      ::  EditorView
- ,   scrolledWindow  ::  ScrolledWindow
-+#if MIN_VERSION_directory(1,2,0)
-+,   modTime         ::  IORef (Maybe (UTCTime))
-+#else
- ,   modTime         ::  IORef (Maybe (ClockTime))
-+#endif
- ,   mode            ::  Mode
- } deriving (Typeable)
- 
-Index: b/src/IDE/Core/Types.hs
-===================================================================
---- a/src/IDE/Core/Types.hs
-+++ b/src/IDE/Core/Types.hs
-@@ -119,6 +119,9 @@
- import Control.Monad.Trans.Class (lift)
- import Control.Monad.IO.Class (liftIO)
- import Control.Monad.Trans.Reader (ReaderT(..))
-+#if MIN_VERSION_directory(1,2,0)
-+import Data.Time (UTCTime(..))
-+#endif
- 
- -- ---------------------------------------------------------------------
- -- IDE State
-@@ -555,5 +558,8 @@
-     |   CompartmentCollect Bool
- 
- type PackageDescrCache = Map PackageIdentifier ModuleDescrCache
-+#if MIN_VERSION_directory(1,2,0)
-+type ModuleDescrCache = Map ModuleName (UTCTime, Maybe FilePath, ModuleDescr)
-+#else
- type ModuleDescrCache = Map ModuleName (ClockTime, Maybe FilePath, ModuleDescr)
--
-+#endif
-Index: b/src/IDE/Pane/SourceBuffer.hs
-===================================================================
---- a/src/IDE/Pane/SourceBuffer.hs
-+++ b/src/IDE/Pane/SourceBuffer.hs
-@@ -134,6 +134,7 @@
- import Control.Monad.Trans.Reader (ask)
- import Control.Monad.IO.Class (MonadIO(..))
- import Control.Monad (foldM, forM, filterM, unless, when)
-+import Control.Exception as E (catch, SomeException)
- 
- allBuffers :: IDEM [IDEBuffer]
- allBuffers = getPanes
-@@ -808,8 +809,8 @@
-             let text' = if removeTBlanks
-                             then unlines $ map removeTrailingBlanks $lines text
-                             else text
--            succ <- liftIO $ catch (do UTF8.writeFile fn text'; return True)
--                (\e -> do
-+            succ <- liftIO $ E.catch (do UTF8.writeFile fn text'; return True)
-+                (\(e :: SomeException) -> do
-                     sysMessage Normal (show e)
-                     return False)
-             setModified buf (not succ)
-Index: b/src/IDE/Utils/GUIUtils.hs
-===================================================================
---- a/src/IDE/Utils/GUIUtils.hs
-+++ b/src/IDE/Utils/GUIUtils.hs
-@@ -1,4 +1,4 @@
--{-# LANGUAGE CPP #-}
-+{-# LANGUAGE CPP, ScopedTypeVariables #-}
- -----------------------------------------------------------------------------
- --
- -- Module      :  IDE.Utils.GUIUtils
-@@ -56,6 +56,7 @@
- import Graphics.UI.Gtk.Gdk.Enums (Modifier(..))
- #endif
- import Control.Monad.IO.Class (liftIO)
-+import Control.Exception as E
- 
- chooseDir :: Window -> String -> Maybe FilePath -> IO (Maybe FilePath)
- chooseDir window prompt mbFolder = do
-@@ -134,10 +135,10 @@
- openBrowser :: String -> IDEAction
- openBrowser url = do
-     prefs' <- readIDE prefs
--    liftIO (catch (do
-+    liftIO (E.catch (do
-                 runProcess (browser prefs') [url] Nothing Nothing Nothing Nothing Nothing
-                 return ())
--            (\ _ -> sysMessage Normal ("Can't find browser executable " ++ browser prefs')))
-+            (\ (_ :: SomeException) -> sysMessage Normal ("Can't find browser executable " ++ browser prefs')))
-     return ()
- 
- -- get widget elements (menu & toolbar)
diff --git a/patches/leksah/0.12.1.3/quickcheck-2.7-compat.patch b/patches/leksah/0.12.1.3/quickcheck-2.7-compat.patch
deleted file mode 100644
index 359d544..0000000
--- a/patches/leksah/0.12.1.3/quickcheck-2.7-compat.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: haskell-leksah-0.12.1.3/leksah.cabal
-===================================================================
---- haskell-leksah-0.12.1.3.orig/leksah.cabal	2014-07-30 23:13:54.631847283 +0200
-+++ haskell-leksah-0.12.1.3/leksah.cabal	2014-07-30 23:14:18.379848280 +0200
-@@ -123,7 +123,7 @@
-                        hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-                        ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-                        gio >=0.12.2 && <0.13, transformers >=0.2.2.0 && <0.4,
--                       QuickCheck >=2.4.2 && <2.6
-+                       QuickCheck >=2.4.2 && <2.8
- 
-     exposed-modules:
-         IDE.Leksah IDE.Completion IDE.ImportTool
-@@ -197,7 +197,7 @@
-                        hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-                        ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-                        gio >=0.12.2 && <0.13, transformers >=0.2.2.0 && <0.4,
--                       QuickCheck >=2.4.2 && <2.6
-+                       QuickCheck >=2.4.2 && <2.8
-     else
-         hs-source-dirs: main
-         build-depends: leksah ==0.12.1.3, base >=4.0.0.0 && <= 5
-@@ -214,7 +214,7 @@
-     type:       exitcode-stdio-1.0
-     hs-source-dirs: tests
-     main-is:    Tests.hs
--    build-depends: base >= 4.0.0.0 && <4.7, Cabal >=1.6.0.1 && <1.17, QuickCheck >=2.4.2 && <2.6,
-+    build-depends: base >= 4.0.0.0 && <4.7, Cabal >=1.6.0.1 && <1.17, QuickCheck >=2.4.2 && <2.8,
-                    leksah ==0.12.1.3
- 
- 
diff --git a/patches/leksah/0.12.1.3/regex-tdfa-1.2.patch b/patches/leksah/0.12.1.3/regex-tdfa-1.2.patch
deleted file mode 100644
index fa5af2a..0000000
--- a/patches/leksah/0.12.1.3/regex-tdfa-1.2.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: haskell-leksah-0.12.1.3/leksah.cabal
-===================================================================
---- haskell-leksah-0.12.1.3.orig/leksah.cabal	2014-08-03 21:16:53.203078792 +0200
-+++ haskell-leksah-0.12.1.3/leksah.cabal	2014-08-03 21:16:53.203078792 +0200
-@@ -118,7 +118,7 @@
-                        filepath >=1.1.0.1 && <1.4, glib >=0.10 && <0.13, gtk >=0.10 && <0.13,
-                        gtksourceview2 >=0.10.0 && <0.13, mtl >=1.1.0.2 && <2.2, old-time >=1.0.0.1 && <1.2,
-                        parsec >=2.1.0.1 && <3.2, pretty >=1.0.1.0 && <1.2,
--                       regex-tdfa ==1.1.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-+                       regex-tdfa ==1.2.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-                        time >=0.1 && <1.5, ltk >= 0.12.1.0 && <0.13, binary-shared >= 0.8 && <0.9, deepseq >= 1.1.0.0 && <1.4,
-                        hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-                        ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
-@@ -192,7 +192,7 @@
-                        filepath >=1.1.0.1 && <1.4, glib >=0.10 && <0.13, gtk >=0.10 && <0.13,
-                        gtksourceview2 >=0.10.0 && <0.13, mtl >=1.1.0.2 && <2.2, old-time >=1.0.0.1 && <1.2,
-                        parsec >=2.1.0.1 && <3.2, pretty >=1.0.1.0 && <1.2,
--                       regex-tdfa ==1.1.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-+                       regex-tdfa ==1.2.*, regex-base ==0.93.*, utf8-string >=0.3.1.1 && <0.4, array >=0.2.0.0 && <0.5,
-                        time >=0.1 && <1.5, ltk >=0.12.1.0 && <0.13, binary-shared >= 0.8 && <0.9, deepseq >= 1.1.0.0 && <1.4,
-                        hslogger >= 1.0.7 && <1.3, leksah-server >=0.12.1.2 && <0.13, network >= 2.2 && <3.0,
-                        ghc >=6.10.1 && <7.7, strict >= 0.3.2 && <0.4, enumerator >=0.4.14 && <0.5, text >= 0.11.1.5 && < 0.12,
diff --git a/patches/leksah/0.12.1.3/series b/patches/leksah/0.12.1.3/series
deleted file mode 100644
index 4701d9d..0000000
--- a/patches/leksah/0.12.1.3/series
+++ /dev/null
@@ -1,3 +0,0 @@
-ghc-7.6-compatibility.patch
-quickcheck-2.7-compat.patch
-regex-tdfa-1.2.patch
diff --git a/patches/leksah/0.14.1.1/no-hamlet b/patches/leksah/0.14.1.1/no-hamlet
deleted file mode 100644
index 64da7ba..0000000
--- a/patches/leksah/0.14.1.1/no-hamlet
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: leksah-0.14.1.1/leksah.cabal
-===================================================================
---- leksah-0.14.1.1.orig/leksah.cabal	2014-12-22 00:13:20.137997702 +0100
-+++ leksah-0.14.1.1/leksah.cabal	2014-12-22 00:19:33.273531382 +0100
-@@ -237,7 +237,7 @@
-           build-depends: webkitgtk3 -any, webkitgtk3-javascriptcore -any
-         else
-           build-depends: webkit -any, webkit-javascriptcore -any
--        build-depends: jsaddle -any, ghcjs-codemirror -any, hamlet -any, blaze-html -any,
-+        build-depends: jsaddle -any, ghcjs-codemirror -any, blaze-html -any,
-                        lens -any, pretty-show >=1.6.3 && <1.7
-         cpp-options: -DWEBKITGTK -DLEKSAH_WITH_CODE_MIRROR
- 
diff --git a/patches/leksah/0.14.1.1/series b/patches/leksah/0.14.1.1/series
deleted file mode 100644
index 576533e..0000000
--- a/patches/leksah/0.14.1.1/series
+++ /dev/null
@@ -1 +0,0 @@
-no-hamlet
diff --git a/patches/ltk/0.12.1.0/ghc-7.6-compatibility.patch b/patches/ltk/0.12.1.0/ghc-7.6-compatibility.patch
deleted file mode 100644
index 84fa66b..0000000
--- a/patches/ltk/0.12.1.0/ghc-7.6-compatibility.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-Description: Compile with the versions of some modules in GHC 7.6
-Forwarded: yes
-Author: Iain Lane <laney at debian.org>
-
-Index: b/ltk.cabal
-===================================================================
---- a/ltk.cabal
-+++ b/ltk.cabal
-@@ -16,8 +16,8 @@
- tested-with: GHC ==6.10 || ==6.12 || ==7.0
- 
- Library
--    build-depends: Cabal >=1.6.0 && <1.15, base >=4.0.0.0 && <4.6,
--               containers >=0.2 && <0.5, filepath >=1.1.0 && <1.4,
-+    build-depends: Cabal >=1.6.0 && <1.17, base >=4.0.0.0 && <4.7,
-+               containers >=0.2 && <0.6, filepath >=1.1.0 && <1.4,
-                glib >=0.10.0 && <0.13, gtk >=0.10.0 && <0.13,
-                mtl >=1.1.0.2 && <2.2, parsec >=2.1.0.1 && <3.2,
-                pretty >=1.0.1.0 && <1.2, transformers >=0.2.2.0 && <0.4,
-Index: b/src/Text/PrinterParser.hs
-===================================================================
---- a/src/Text/PrinterParser.hs
-+++ b/src/Text/PrinterParser.hs
-@@ -1,4 +1,4 @@
--{-# OPTIONS_GHC -XTypeSynonymInstances -XFlexibleInstances #-}
-+{-# OPTIONS_GHC -XTypeSynonymInstances -XFlexibleInstances -XScopedTypeVariables #-}
- --
- -- | Module for saving and restoring preferences and settings
- --
-@@ -49,6 +49,7 @@
- import Data.List (foldl')
- import qualified Text.ParserCombinators.Parsec as  P
-     ((<?>), CharParser(..), parseFromFile)
-+import Control.Exception (catch, IOException)
- 
- 
- type Printer beta       =   beta -> PP.Doc
-@@ -232,7 +233,7 @@
-     case res of
-                 Left pe -> error $ "Error reading file " ++ show fn ++ " " ++ show pe
-                 Right r -> return r)
--    (\ e -> error $ "Error reading file " ++ show fn ++ " " ++ show e)
-+    (\ (e :: IOException) -> error $ "Error reading file " ++ show fn ++ " " ++ show e)
- 
- parseFields ::  alpha ->  [FieldDescriptionS alpha] ->  P.CharParser () alpha
- parseFields defaultValue descriptions =
-Index: b/src/Graphics/UI/Editor/Simple.hs
-===================================================================
---- a/src/Graphics/UI/Editor/Simple.hs
-+++ b/src/Graphics/UI/Editor/Simple.hs
-@@ -63,6 +63,7 @@
- import Graphics.UI.Editor.Basics
-        (GUIEvent(..), GUIEventSelector(..), propagateAsChanged,
-         genericGUIEvents, activateEvent, Editor)
-+import Control.Exception (catch, IOException)
- 
- -- ------------------------------------------------------------
- -- * Simple Editors
-@@ -360,7 +361,7 @@
-         case s of
-             Nothing -> return Nothing
-             Just s -> catch (liftM Just (readIO s))
--                            (\e -> do
-+                            (\ (e :: IOException) -> do
-                                 putStrLn ("Generic editor no parse for " ++ s ++ " " ++ show e)
-                                 return Nothing)
-     return (wid,ginj,gext)
diff --git a/patches/ltk/0.12.1.0/series b/patches/ltk/0.12.1.0/series
deleted file mode 100644
index fbd6b7e..0000000
--- a/patches/ltk/0.12.1.0/series
+++ /dev/null
@@ -1 +0,0 @@
-ghc-7.6-compatibility.patch
diff --git a/patches/reform-hamlet/0.0.4/newer-blaze-markup.diff b/patches/reform-hamlet/0.0.4/newer-blaze-markup.diff
deleted file mode 100644
index 88d69cd..0000000
--- a/patches/reform-hamlet/0.0.4/newer-blaze-markup.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/reform-hamlet.cabal
-+++ b/reform-hamlet.cabal
-@@ -22,7 +22,7 @@
-                        Text.Reform.Hamlet.String
-                        Text.Reform.Hamlet.Text
-   Build-depends:       base         > 4     && < 5,
--                       blaze-markup > 0.5   && < 0.7,
-+                       blaze-markup > 0.5   && < 0.8,
-                        shakespeare  >= 2.0  && < 2.1,
-                        reform       == 0.2.*,
-                        text         >= 0.11 && < 1.3
diff --git a/patches/reform-hamlet/0.0.4/series b/patches/reform-hamlet/0.0.4/series
deleted file mode 100644
index a029661..0000000
--- a/patches/reform-hamlet/0.0.4/series
+++ /dev/null
@@ -1 +0,0 @@
-newer-blaze-markup.diff
diff --git a/patches/simpleirc/0.2.1/new-exceptions.diff b/patches/simpleirc/0.2.1/new-exceptions.diff
deleted file mode 100644
index 8747f38..0000000
--- a/patches/simpleirc/0.2.1/new-exceptions.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: haskell-simpleirc-0.2.1/Network/SimpleIRC/Core.hs
-===================================================================
---- haskell-simpleirc-0.2.1.orig/Network/SimpleIRC/Core.hs	2011-11-30 17:04:43.000000000 +0000
-+++ haskell-simpleirc-0.2.1/Network/SimpleIRC/Core.hs	2012-11-09 05:27:05.666355483 +0000
-@@ -47,6 +47,7 @@
- import Control.Concurrent
- import Control.Concurrent.Chan
- import Control.Concurrent.MVar
-+import Control.Exception.Base (try)
- import Network.SimpleIRC.Messages
- import Data.Unique
- import System.IO.Error
diff --git a/patches/simpleirc/0.2.1/series b/patches/simpleirc/0.2.1/series
deleted file mode 100644
index e60c9c0..0000000
--- a/patches/simpleirc/0.2.1/series
+++ /dev/null
@@ -1 +0,0 @@
-new-exceptions.diff
diff --git a/patches/snap-loader-dynamic/0.10.0.2/new-mtl b/patches/snap-loader-dynamic/0.10.0.2/new-mtl
deleted file mode 100644
index c37338c..0000000
--- a/patches/snap-loader-dynamic/0.10.0.2/new-mtl
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: snap-loader-dynamic-0.10.0.2/snap-loader-dynamic.cabal
-===================================================================
---- snap-loader-dynamic-0.10.0.2.orig/snap-loader-dynamic.cabal	2014-09-07 11:27:16.272029779 +0200
-+++ snap-loader-dynamic-0.10.0.2/snap-loader-dynamic.cabal	2014-09-07 11:27:46.500028726 +0200
-@@ -31,7 +31,7 @@
-   build-depends:
-     base              >= 4       && < 5,
-     directory-tree    >= 0.10    && < 0.12,
--    mtl               >  2.0     && < 2.2,
-+    mtl               >  2.0     && < 2.3,
-     snap-core         >= 0.9     && < 0.10,
-     time              >= 1.1     && < 1.5,
-     template-haskell  >= 2.2     && < 2.10
diff --git a/patches/snap-loader-dynamic/0.10.0.2/series b/patches/snap-loader-dynamic/0.10.0.2/series
deleted file mode 100644
index 3a41f62..0000000
--- a/patches/snap-loader-dynamic/0.10.0.2/series
+++ /dev/null
@@ -1 +0,0 @@
-new-mtl

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list