[DHG_packages] 01/01: lambdabot-haskell-plugins: patch for newer haskell-src-exts

Clint Adams clint at moszumanska.debian.org
Fri May 6 15:42:46 UTC 2016


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

clint pushed a commit to annotated tag haskell-lambdabot-haskell-plugins_v5.0.3-4
in repository DHG_packages.

commit bdafab8b54226d824ca2588a678e69fda6fe1a17
Author: Clint Adams <clint at debian.org>
Date:   Fri May 6 11:32:18 2016 -0400

    lambdabot-haskell-plugins: patch for newer haskell-src-exts
---
 .../debian/changelog                               |  6 ++
 p/haskell-lambdabot-haskell-plugins/debian/control |  2 +-
 .../debian/patches/newer-haskell-src-exts          | 80 ++++++++++++++++++++++
 .../debian/patches/series                          |  1 +
 4 files changed, 88 insertions(+), 1 deletion(-)

diff --git a/p/haskell-lambdabot-haskell-plugins/debian/changelog b/p/haskell-lambdabot-haskell-plugins/debian/changelog
index e403190..56d68e1 100644
--- a/p/haskell-lambdabot-haskell-plugins/debian/changelog
+++ b/p/haskell-lambdabot-haskell-plugins/debian/changelog
@@ -1,3 +1,9 @@
+haskell-lambdabot-haskell-plugins (5.0.3-4) unstable; urgency=medium
+
+  * Patch for newer haskell-src-exts.
+
+ -- Clint Adams <clint at debian.org>  Fri, 06 May 2016 11:31:32 -0400
+
 haskell-lambdabot-haskell-plugins (5.0.3-3) unstable; urgency=medium
 
   * Set a human Uploader
diff --git a/p/haskell-lambdabot-haskell-plugins/debian/control b/p/haskell-lambdabot-haskell-plugins/debian/control
index c21edae..0f8d84d 100644
--- a/p/haskell-lambdabot-haskell-plugins/debian/control
+++ b/p/haskell-lambdabot-haskell-plugins/debian/control
@@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 9),
  libghc-arrows-prof,
  libghc-data-memocombinators-dev (>= 0.4),
  libghc-data-memocombinators-prof,
- libghc-src-exts-dev (>= 1.16.0),
+ libghc-src-exts-dev (>= 1.17.0),
  libghc-src-exts-prof,
  libghc-hoogle-dev (>= 4.2),
  libghc-hoogle-prof,
diff --git a/p/haskell-lambdabot-haskell-plugins/debian/patches/newer-haskell-src-exts b/p/haskell-lambdabot-haskell-plugins/debian/patches/newer-haskell-src-exts
new file mode 100644
index 0000000..bd3fdd2
--- /dev/null
+++ b/p/haskell-lambdabot-haskell-plugins/debian/patches/newer-haskell-src-exts
@@ -0,0 +1,80 @@
+--- a/src/Lambdabot/Plugin/Haskell/Undo.hs
++++ b/src/Lambdabot/Plugin/Haskell/Undo.hs
+@@ -54,7 +54,7 @@
+                                             (var "fail")
+                                             (Lit $ String "")
+                                     ]
+-        where alt pat x = Alt s pat (UnGuardedRhs x) (BDecls [])
++        where alt pat x = Alt s pat (UnGuardedRhs x) Nothing
+     f _ = error "Undo plugin error: can't undo!"
+ undo v (ListComp e stms) = f stms
+  where
+@@ -69,7 +69,7 @@
+                                     [ alt p (f xs)
+                                     , alt PWildCard nil
+                                     ]
+-        where alt pat x = Alt s pat (UnGuardedRhs x) (BDecls [])
++        where alt pat x = Alt s pat (UnGuardedRhs x) Nothing
+               concatMap' fun = App (App (var "concatMap") (Paren fun)) l
+     f _ = error "Undo plugin error: can't undo!"
+ undo _ x           = x
+@@ -103,8 +103,8 @@
+              case r of
+                  (Lambda loc [p] (Do stms)) -> Do (Generator loc p l : stms)
+                  (Lambda loc [PVar v1] (Case (Var (UnQual v2))
+-                                            [ Alt _ p (UnGuardedRhs s) (BDecls [])
+-                                            , Alt _ PWildCard (UnGuardedRhs (App (Var (UnQual (Ident "fail"))) _)) (BDecls [])
++                                            [ Alt _ p (UnGuardedRhs s) Nothing
++                                            , Alt _ PWildCard (UnGuardedRhs (App (Var (UnQual (Ident "fail"))) _)) Nothing
+                                             ]))
+                            | v1 == v2           -> case s of
+                                                        Do stms -> Do (Generator loc p l : stms)
+--- a/lambdabot-haskell-plugins.cabal
++++ b/lambdabot-haskell-plugins.cabal
+@@ -98,7 +98,7 @@
+                         containers              >= 0.4,
+                         directory               >= 1.1,
+                         filepath                >= 1.3,
+-                        haskell-src-exts        >= 1.16.0,
++                        haskell-src-exts        >= 1.17.0,
+                         lambdabot-core          >= 5.0.3 && < 5.1,
+                         lambdabot-reference-plugins >= 5.0.3 && < 5.1,
+                         lifted-base             >= 0.2,
+--- a/src/Lambdabot/Plugin/Haskell/Pointful.hs
++++ b/src/Lambdabot/Plugin/Haskell/Pointful.hs
+@@ -54,11 +54,11 @@
+ 
+ -- move lambda patterns into LHS
+ optimizeD :: Decl -> Decl
+-optimizeD (PatBind locat (PVar fname) (UnGuardedRhs (Lambda _ pats rhs)) (BDecls []))
+-        =  FunBind [Match locat fname pats Nothing (UnGuardedRhs rhs) (BDecls [])]
++optimizeD (PatBind locat (PVar fname) (UnGuardedRhs (Lambda _ pats rhs)) Nothing)
++        =  FunBind [Match locat fname pats Nothing (UnGuardedRhs rhs) Nothing]
+ ---- combine function binding and lambda
+-optimizeD (FunBind [Match locat fname pats1 Nothing (UnGuardedRhs (Lambda _ pats2 rhs)) (BDecls [])])
+-        =  FunBind [Match locat fname (pats1 ++ pats2) Nothing (UnGuardedRhs rhs) (BDecls [])]
++optimizeD (FunBind [Match locat fname pats1 Nothing (UnGuardedRhs (Lambda _ pats2 rhs)) Nothing)
++        =  FunBind [Match locat fname (pats1 ++ pats2) Nothing (UnGuardedRhs rhs) Nothing]
+ optimizeD x = x
+ 
+ -- remove parens
+@@ -174,7 +174,7 @@
+   where defs = case parseModule combinatorModule of
+           ParseOk (Hs.Module _ _ _ _ _ _ d) -> d
+           f@(ParseFailed _ _) -> error ("Combinator loading: " ++ show f)
+-        declToTuple (PatBind _ (PVar fname) (UnGuardedRhs body) (BDecls []))
++        declToTuple (PatBind _ (PVar fname) (UnGuardedRhs body) Nothing)
+           = (UnQual fname, Paren body)
+         declToTuple _ = error "Pointful Plugin error: can't convert declaration to tuple"
+ 
+--- a/src/Lambdabot/Plugin/Haskell/Pretty.hs
++++ b/src/Lambdabot/Plugin/Haskell/Pretty.hs
+@@ -73,7 +73,7 @@
+             caseIndent   = 4,
+             onsideIndent = 0
+         }
+-        prettyDecl (PatBind _ (PVar (Ident "__expr__")) (UnGuardedRhs e) (BDecls [])) -- pretty printing an expression
++        prettyDecl (PatBind _ (PVar (Ident "__expr__")) (UnGuardedRhs e) Nothing) -- pretty printing an expression
+                      = prettyPrintWithMode (makeModeExp e) e
+         prettyDecl d = prettyPrintWithMode (makeMode d) d
+     -- TODO: prefixing with hashes is done, because i didn't find a way
diff --git a/p/haskell-lambdabot-haskell-plugins/debian/patches/series b/p/haskell-lambdabot-haskell-plugins/debian/patches/series
new file mode 100644
index 0000000..87ca087
--- /dev/null
+++ b/p/haskell-lambdabot-haskell-plugins/debian/patches/series
@@ -0,0 +1 @@
+newer-haskell-src-exts

-- 
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