[Pkg-haskell-commits] darcs: haskell-leksah: Add forgotten patch
Iain Lane
laney at debian.org
Sun Apr 14 10:10:40 UTC 2013
Sun Apr 14 10:10:23 UTC 2013 Iain Lane <laney at debian.org>
* Add forgotten patch
Ignore-this: c57df235e4a8640650b05e299585a189
A ./patches/ghc-7.6-compatibility.patch
Sun Apr 14 10:10:23 UTC 2013 Iain Lane <laney at debian.org>
* Add forgotten patch
Ignore-this: c57df235e4a8640650b05e299585a189
diff -rN -u old-haskell-leksah//patches/ghc-7.6-compatibility.patch new-haskell-leksah//patches/ghc-7.6-compatibility.patch
--- old-haskell-leksah//patches/ghc-7.6-compatibility.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-leksah//patches/ghc-7.6-compatibility.patch 2013-04-14 10:10:40.590023484 +0000
@@ -0,0 +1,200 @@
+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)
More information about the Pkg-haskell-commits
mailing list