ghc/u_haskeline_update.patch

151 lines
6.6 KiB
Diff
Raw Normal View History

diff --git a/ghc-7.10.3.old/libraries/haskeline/Changelog b/ghc-7.10.3/libraries/haskeline/Changelog
index 5cb7cc5..e559185 100644
--- a/ghc-7.10.3.old/libraries/haskeline/Changelog
+++ b/ghc-7.10.3/libraries/haskeline/Changelog
@@ -1,3 +1,10 @@
+Changed in version 0.7.2.2:
+ * Fix Linux to Windows cross-compile
+ * Canonicalize AMP instances to make the code more future proof
+ * Generalize constraints for InputT instances
+ * Bump upper bounds on base and transformers
+ * Make Haskeline `-Wtabs` clean
+
Changed in version 0.7.2.1:
* Fix build on Windows.
diff --git a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Command/Completion.hs b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Command/Completion.hs
index 97a887b..71a0f12 100644
--- a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Command/Completion.hs
+++ b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Command/Completion.hs
@@ -21,7 +21,7 @@ useCompletion im c = insertString r im
where r | isFinished c = replacement c ++ " "
| otherwise = replacement c
-askIMCompletions :: CommandMonad m =>
+askIMCompletions :: CommandMonad m =>
Command m InsertMode (InsertMode, [Completion])
askIMCompletions (IMode xs ys) = do
(rest, completions) <- lift $ runCompletion (withRev graphemesToString xs,
@@ -72,7 +72,7 @@ pagingCompletion :: MonadReader Layout m => Key -> Prefs
pagingCompletion k prefs completions = \im -> do
ls <- asks $ makeLines (map display completions)
let pageAction = do
- askFirst prefs (length completions) $
+ askFirst prefs (length completions) $
if completionPaging prefs
then printPage ls
else effect (PrintLines ls)
@@ -134,7 +134,7 @@ padWords :: Int -> [String] -> String
padWords _ [x] = x
padWords _ [] = ""
padWords len (x:xs) = x ++ replicate (len - glength x) ' '
- ++ padWords len xs
+ ++ padWords len xs
where
-- kludge: compute the length in graphemes, not chars.
-- but don't use graphemes for the max length, since I'm not convinced
@@ -159,5 +159,3 @@ splitIntoGroups n xs = transpose $ unfoldr f xs
ceilDiv :: Integral a => a -> a -> a
ceilDiv m n | m `rem` n == 0 = m `div` n
| otherwise = m `div` n + 1
-
-
diff --git a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Command.hs b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Command.hs
index 986fd42..1a0d915 100644
--- a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Command.hs
+++ b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Command.hs
@@ -66,11 +66,11 @@ instance Monad m => Functor (CmdM m) where
fmap = liftM
instance Monad m => Applicative (CmdM m) where
- pure = return
+ pure = Result
(<*>) = ap
instance Monad m => Monad (CmdM m) where
- return = Result
+ return = pure
GetKey km >>= g = GetKey $ fmap (>>= g) km
DoEffect e f >>= g = DoEffect e (f >>= g)
diff --git a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Directory.hsc b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Directory.hsc
index b2deb22..9eb0952 100644
--- a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Directory.hsc
+++ b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Directory.hsc
@@ -19,7 +19,7 @@ import qualified System.Directory
#endif
#include <windows.h>
-#include <Shlobj.h>
+#include <shlobj.h>
##if defined(i386_HOST_ARCH)
## define WINDOWS_CCONV stdcall
diff --git a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/InputT.hs b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/InputT.hs
index 383cf5f..c1ee55e 100644
--- a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/InputT.hs
+++ b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/InputT.hs
@@ -47,19 +47,12 @@ newtype InputT m a = InputT {unInputT ::
(ReaderT (IORef KillRing)
(ReaderT Prefs
(ReaderT (Settings m) m)))) a}
- deriving (Monad, MonadIO, MonadException)
+ deriving (Functor, Applicative, Monad, MonadIO, MonadException)
-- NOTE: we're explicitly *not* making InputT an instance of our
-- internal MonadState/MonadReader classes. Otherwise haddock
-- displays those instances to the user, and it makes it seem like
-- we implement the mtl versions of those classes.
-instance Monad m => Functor (InputT m) where
- fmap = liftM
-
-instance Monad m => Applicative (InputT m) where
- pure = return
- (<*>) = ap
-
instance MonadTrans InputT where
lift = InputT . lift . lift . lift . lift . lift
diff --git a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Monads.hs b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Monads.hs
index 6668e96..d5fc1bb 100644
--- a/ghc-7.10.3.old/libraries/haskeline/System/Console/Haskeline/Monads.hs
+++ b/ghc-7.10.3/libraries/haskeline/System/Console/Haskeline/Monads.hs
@@ -77,11 +77,11 @@ instance Monad m => Functor (StateT s m) where
fmap = liftM
instance Monad m => Applicative (StateT s m) where
- pure = return
+ pure x = StateT $ \s -> return $ \f -> f x s
(<*>) = ap
instance Monad m => Monad (StateT s m) where
- return x = StateT $ \s -> return $ \f -> f x s
+ return = pure
StateT f >>= g = StateT $ \s -> do
useX <- f s
useX $ \x s' -> getStateTFunc (g x) s'
diff --git a/ghc-7.10.3.old/libraries/haskeline/haskeline.cabal b/ghc-7.10.3/libraries/haskeline/haskeline.cabal
index b709ee3..7402b6d 100644
--- a/ghc-7.10.3.old/libraries/haskeline/haskeline.cabal
+++ b/ghc-7.10.3/libraries/haskeline/haskeline.cabal
@@ -1,6 +1,6 @@
Name: haskeline
Cabal-Version: >=1.10
-Version: 0.7.2.1
+Version: 0.7.2.2
Category: User Interfaces
License: BSD3
License-File: LICENSE
@@ -50,9 +50,9 @@ flag legacy-encoding
Default: False
Library
- Build-depends: base >=4.3 && < 4.9, containers>=0.4 && < 0.6,
+ Build-depends: base >=4.3 && < 4.10, containers>=0.4 && < 0.6,
directory>=1.1 && < 1.3, bytestring>=0.9 && < 0.11,
- filepath >= 1.2 && < 1.5, transformers >= 0.2 && < 0.5
+ filepath >= 1.2 && < 1.5, transformers >= 0.2 && < 0.6
Default-Language: Haskell98
Default-Extensions:
ForeignFunctionInterface, Rank2Types, FlexibleInstances,