[DHG_packages] 01/02: hoauth: Added instance for (Monad m) => Applicative (OAuthMonadT m), to satisfy Monad superclass. Use defaultTimeLocale from time, rather than old-time. Depend on ghc >= 7.10, because defaultLocalTime was added to time in ghc 7.10.
Sven Bartscher
svenb-guest at moszumanska.debian.org
Mon Aug 17 22:42:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
svenb-guest pushed a commit to branch st3
in repository DHG_packages.
commit e836b931487260f969b876dae91fdec913bff325
Author: Sven Bartscher <sven.bartscher at weltraumschlangen.de>
Date: Tue Aug 18 00:38:59 2015 +0200
hoauth: Added instance for (Monad m) => Applicative (OAuthMonadT m),
to satisfy Monad superclass.
Use defaultTimeLocale from time, rather than old-time.
Depend on ghc >= 7.10, because defaultLocalTime was added to time in
ghc 7.10.
---
p/hoauth/debian/changelog | 4 ++--
p/hoauth/debian/control | 5 +----
p/hoauth/debian/patches/ghc-7.10 | 32 ++++++++++++++++++++++++++++++++
p/hoauth/debian/patches/series | 1 +
4 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/p/hoauth/debian/changelog b/p/hoauth/debian/changelog
index 9272e3e..f45431c 100644
--- a/p/hoauth/debian/changelog
+++ b/p/hoauth/debian/changelog
@@ -1,8 +1,8 @@
hoauth (0.3.5-4) UNRELEASED; urgency=medium
- * Depend on old-{locale,time}
+ * Patch support for ghc-7.10
- -- Joachim Breitner <nomeata at debian.org> Sat, 15 Aug 2015 23:06:16 +0200
+ -- Sven Bartscher <sven.bartscher at weltraumschlangen.de> Tue, 18 Aug 2015 00:38:06 +0200
hoauth (0.3.5-3) unstable; urgency=low
diff --git a/p/hoauth/debian/control b/p/hoauth/debian/control
index f0cb797..2c23995 100644
--- a/p/hoauth/debian/control
+++ b/p/hoauth/debian/control
@@ -6,7 +6,7 @@ Section: haskell
Build-Depends: debhelper (>= 9),
haskell-devscripts (>= 0.9),
cdbs,
- ghc,
+ ghc (>= 7.10),
ghc-prof,
libghc-rsa-dev (>= 1.2.0.1),
libghc-rsa-prof,
@@ -22,8 +22,6 @@ Build-Depends: debhelper (>= 9),
libghc-entropy-prof,
libghc-mtl-dev (>= 1.1.0.2),
libghc-mtl-prof,
- libghc-old-locale-dev (>= 1.0.0.2),
- libghc-old-locale-prof,
libghc-random-dev (>= 1.0.0.2),
libghc-random-prof,
libghc-utf8-string-dev (>= 0.3.4),
@@ -36,7 +34,6 @@ Build-Depends-Indep: ghc-doc,
libghc-dataenc-doc,
libghc-entropy-doc,
libghc-mtl-doc,
- libghc-old-locale-doc,
libghc-random-doc,
libghc-utf8-string-doc,
Standards-Version: 3.9.4
diff --git a/p/hoauth/debian/patches/ghc-7.10 b/p/hoauth/debian/patches/ghc-7.10
new file mode 100644
index 0000000..28911f3
--- /dev/null
+++ b/p/hoauth/debian/patches/ghc-7.10
@@ -0,0 +1,32 @@
+--- a/src/main/haskell/Network/OAuth/Consumer.hs
++++ b/src/main/haskell/Network/OAuth/Consumer.hs
+@@ -89,8 +89,8 @@
+ import Control.Monad.Trans
+ import System.IO
+ import System.Entropy (getEntropy)
+-import System.Locale (defaultTimeLocale)
+ import Data.Time (getCurrentTime,formatTime)
++import Data.Time.Format (defaultTimeLocale)
+ import Data.Char (chr,ord)
+ import Data.List (intercalate,sort)
+ import Data.Word (Word8)
+@@ -390,6 +390,19 @@
+ right (t1,a) = let OAuthMonadT mb = f a
+ in mb t1
+
++instance (Monad m) => Applicative (OAuthMonadT m) where
++ pure = return
++ (OAuthMonadT af) <*> (OAuthMonadT ax) =
++ OAuthMonadT $ \t -> do
++ ef <- af t
++ case ef of
++ Left s -> return $ Left s
++ Right (nt, f) -> do
++ ex <- ax nt
++ case ex of
++ Left s -> return $ Left s
++ Right (ft, x) -> return $ Right (ft, f x)
++
+ instance MonadTrans OAuthMonadT where
+ lift ma = OAuthMonadT $ \t -> do { a <- ma
+ ; return $ Right (t,a)
diff --git a/p/hoauth/debian/patches/series b/p/hoauth/debian/patches/series
index a5d24bf..af317a3 100644
--- a/p/hoauth/debian/patches/series
+++ b/p/hoauth/debian/patches/series
@@ -1 +1,2 @@
new-RSA
+ghc-7.10
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git
More information about the Pkg-haskell-commits
mailing list