openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2017
- 1 participants
- 2097 discussions
Hello community,
here is the log from the commit of package hapistrano for openSUSE:Factory checked in at 2017-08-31 21:02:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hapistrano (Old)
and /work/SRC/openSUSE:Factory/.hapistrano.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hapistrano"
Thu Aug 31 21:02:56 2017 rev:2 rq:513565 version:0.3.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hapistrano/hapistrano.changes 2017-03-24 02:05:07.688386543 +0100
+++ /work/SRC/openSUSE:Factory/.hapistrano.new/hapistrano.changes 2017-08-31 21:02:57.544657753 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:14 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.3.2.2.
+
+-------------------------------------------------------------------
Old:
----
hapistrano-0.2.1.2.tar.gz
New:
----
hapistrano-0.3.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hapistrano.spec ++++++
--- /var/tmp/diff_new_pack.dZVskP/_old 2017-08-31 21:02:58.564514462 +0200
+++ /var/tmp/diff_new_pack.dZVskP/_new 2017-08-31 21:02:58.580512214 +0200
@@ -1,7 +1,7 @@
#
# spec file for package hapistrano
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,32 +19,34 @@
%global pkg_name hapistrano
%bcond_with tests
Name: %{pkg_name}
-Version: 0.2.1.2
+Version: 0.3.2.2
Release: 0
Summary: A deployment library for Haskell applications
License: MIT
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.t…
-# Begin cabal-rpm deps:
BuildRequires: chrpath
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-base-compat-devel
-BuildRequires: ghc-either-devel
+BuildRequires: ghc-aeson-devel
+BuildRequires: ghc-async-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-mtl-devel
+BuildRequires: ghc-optparse-applicative-devel
+BuildRequires: ghc-path-devel
+BuildRequires: ghc-path-io-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-stm-devel
BuildRequires: ghc-time-devel
-BuildRequires: ghc-time-locale-compat-devel
BuildRequires: ghc-transformers-devel
+BuildRequires: ghc-yaml-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-directory-devel
BuildRequires: ghc-hspec-devel
BuildRequires: ghc-temporary-devel
%endif
-# End cabal-rpm deps
%description
Hapistrano makes it easy to reliably deploy Haskell applications to a server.
@@ -82,22 +84,15 @@
%prep
%setup -q
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
-%ghc_fix_dynamic_rpath hap
-
+%ghc_fix_rpath %{pkg_name}-%{version}
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post -n ghc-%{name}-devel
%ghc_pkg_recache
@@ -108,8 +103,11 @@
%files
%defattr(-,root,root,-)
%doc LICENSE
-%doc README.md
+%doc CHANGELOG.md README.md
%{_bindir}/hap
+%dir %{_datadir}/%{name}-%{version}
+%dir %{_datadir}/%{name}-%{version}/script
+%{_datadir}/%{name}-%{version}/script/clean-build.sh
%files -n ghc-%{name} -f ghc-%{name}.files
%defattr(-,root,root,-)
@@ -117,6 +115,6 @@
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%defattr(-,root,root,-)
-%doc README.md
+%doc CHANGELOG.md README.md
%changelog
++++++ hapistrano-0.2.1.2.tar.gz -> hapistrano-0.3.2.2.tar.gz ++++++
++++ 2518 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package gipeda for openSUSE:Factory checked in at 2017-08-31 21:02:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gipeda (Old)
and /work/SRC/openSUSE:Factory/.gipeda.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gipeda"
Thu Aug 31 21:02:53 2017 rev:2 rq:513564 version:0.3.3.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/gipeda/gipeda.changes 2017-05-17 10:52:02.194389529 +0200
+++ /work/SRC/openSUSE:Factory/.gipeda.new/gipeda.changes 2017-08-31 21:02:55.480947709 +0200
@@ -1,0 +2,5 @@
+Fri Jul 28 07:54:15 UTC 2017 - psimons(a)suse.com
+
+- Relax the over-specified version constraint on concurrent-output.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gipeda.spec ++++++
--- /var/tmp/diff_new_pack.W1cvRc/_old 2017-08-31 21:02:56.612788683 +0200
+++ /var/tmp/diff_new_pack.W1cvRc/_new 2017-08-31 21:02:56.656782502 +0200
@@ -72,6 +72,7 @@
%prep
%setup -q
+cabal-tweak-dep-ver concurrent-output '< 1.8' ' < 2'
%build
%ghc_bin_build
1
0
Hello community,
here is the log from the commit of package ghc-yi-snippet for openSUSE:Factory checked in at 2017-08-31 21:02:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-snippet (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-snippet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-snippet"
Thu Aug 31 21:02:50 2017 rev:3 rq:513563 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-snippet/ghc-yi-snippet.changes 2017-07-06 00:00:39.205510444 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-snippet.new/ghc-yi-snippet.changes 2017-08-31 21:02:53.245261827 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:44 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-snippet-0.13.7.tar.gz
New:
----
yi-snippet-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-snippet.spec ++++++
--- /var/tmp/diff_new_pack.J9QiQf/_old 2017-08-31 21:02:54.549078638 +0200
+++ /var/tmp/diff_new_pack.J9QiQf/_new 2017-08-31 21:02:54.569075828 +0200
@@ -19,7 +19,7 @@
%global pkg_name yi-snippet
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Snippet support for yi
License: GPL-2.0+
++++++ yi-snippet-0.13.7.tar.gz -> yi-snippet-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-snippet-0.13.7/yi-snippet.cabal new/yi-snippet-0.14.0/yi-snippet.cabal
--- old/yi-snippet-0.13.7/yi-snippet.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-snippet-0.14.0/yi-snippet.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-snippet
-version: 0.13.7
+version: 0.14.0
synopsis: Snippet support for yi
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -23,16 +23,16 @@
ghc-options: -Wall -ferror-spans
build-depends:
base >= 4.8 && < 5
- , binary >= 0.7.5
, containers >= 0.5.6
+ , yi-rope >= 0.7
+ , binary >= 0.7.5
, data-default >= 0.5
, free >= 4.12
, microlens-platform
, mtl >= 2.2
, text >= 1.2
, vector >= 0.11
- , yi-core >= 0.13.1
- , yi-rope >= 0.7
+ , yi-core >= 0.14.0
exposed-modules:
Yi.Snippet
Yi.Snippet.Internal
@@ -48,15 +48,7 @@
ghc-options: -Wall -ferror-spans
build-depends:
base >= 4.8 && < 5
- , binary >= 0.7.5
, containers >= 0.5.6
- , data-default >= 0.5
- , free >= 4.12
- , microlens-platform
- , mtl >= 2.2
- , text >= 1.2
- , vector >= 0.11
- , yi-core >= 0.13.1
, yi-rope >= 0.7
, tasty-th
, tasty-hunit
1
0
Hello community,
here is the log from the commit of package ghc-yi-rope for openSUSE:Factory checked in at 2017-08-31 21:02:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-rope (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-rope.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-rope"
Thu Aug 31 21:02:46 2017 rev:3 rq:513562 version:0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-rope/ghc-yi-rope.changes 2017-04-07 13:55:28.989032222 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-rope.new/ghc-yi-rope.changes 2017-08-31 21:02:50.925587746 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:04 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.9.
+
+-------------------------------------------------------------------
Old:
----
yi-rope-0.8.tar.gz
New:
----
yi-rope-0.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-rope.spec ++++++
--- /var/tmp/diff_new_pack.hC6bzx/_old 2017-08-31 21:02:52.357386575 +0200
+++ /var/tmp/diff_new_pack.hC6bzx/_new 2017-08-31 21:02:52.377383766 +0200
@@ -19,7 +19,7 @@
%global pkg_name yi-rope
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.8
+Version: 0.9
Release: 0
Summary: A rope data structure used by Yi
License: GPL-2.0+
++++++ yi-rope-0.8.tar.gz -> yi-rope-0.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-rope-0.8/bench/MainBenchmarkSuite.hs new/yi-rope-0.9/bench/MainBenchmarkSuite.hs
--- old/yi-rope-0.8/bench/MainBenchmarkSuite.hs 2016-10-07 19:59:34.000000000 +0200
+++ new/yi-rope-0.9/bench/MainBenchmarkSuite.hs 2017-07-03 23:38:45.000000000 +0200
@@ -84,7 +84,7 @@
mkTexts x t = (x, F.fromText' x t)
allTexts :: [(Int -> String, [(Int, F.YiString)])]
-allTexts = [longTexts {-, wideTexts, shortTexts, tinyTexts -}]
+allTexts = [longTexts, wideTexts, shortTexts, tinyTexts]
allChars :: [(Int -> String, [(Int, Char)])]
allChars = map mkChar "λa"
@@ -160,6 +160,7 @@
, onCharGroup "singleton" F.singleton
, onTextGroup "countNewLines" F.countNewLines
, onTextGroup "lines" F.lines
+ , onTextGroup "lines'" F.lines'
, onSplitGroup "splitAt" F.splitAt
, onSplitGroup "splitAtLine" F.splitAtLine
, onTextGroup "toReverseString" F.toReverseString
@@ -181,4 +182,4 @@
] ++ splitBench
++ wordsBench
++ spanBreakBench
- ++ foldBench
+ ++ foldBench
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-rope-0.8/src/Yi/Rope.hs new/yi-rope-0.9/src/Yi/Rope.hs
--- old/yi-rope-0.8/src/Yi/Rope.hs 2016-10-10 15:23:38.000000000 +0200
+++ new/yi-rope-0.9/src/Yi/Rope.hs 2017-07-03 23:38:45.000000000 +0200
@@ -2,6 +2,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
@@ -70,6 +71,7 @@
import Data.Default
import qualified Data.FingerTree as T
import Data.FingerTree hiding (null, empty, reverse, split)
+import Data.Function (fix)
import qualified Data.List as L (foldl')
import Data.Maybe
import Data.Monoid
@@ -501,24 +503,18 @@
go acc (t':ts') = go (acc <> (c `cons` t')) ts'
-- | Add a 'Char' in front of a 'YiString'.
---
--- We add the character to the front of the first chunk. This does
--- mean that a lot of 'cons' might result in an abnormally large first
--- chunk so if you have to do that, consider using 'append' instead..
cons :: Char -> YiString -> YiString
cons c (YiString t) = case viewl t of
EmptyL -> Yi.Rope.singleton c
- Chunk !l x :< ts -> YiString $ Chunk (l + 1) (c `TX.cons` x) <| ts
+ Chunk l x :< ts | l < defaultChunkSize -> YiString $ Chunk (l + 1) (c `TX.cons` x) <| ts
+ _ -> YiString $ Chunk 1 (TX.singleton c) <| t
-- | Add a 'Char' in the back of a 'YiString'.
---
--- We add the character to the end of the last chunk. This does mean
--- that a lot of 'snoc' might result in an abnormally large last chunk
--- so if you have to do that, consider using 'append' instead..
snoc :: YiString -> Char -> YiString
snoc (YiString t) c = case viewr t of
EmptyR -> Yi.Rope.singleton c
- ts :> Chunk l x -> YiString $ ts |> Chunk (l + 1) (x `TX.snoc` c)
+ ts :> Chunk l x | l < defaultChunkSize -> YiString $ ts |> Chunk (l + 1) (x `TX.snoc` c)
+ _ -> YiString $ t |> Chunk 1 (TX.singleton c)
-- | Single character 'YiString'. Consider whether it's worth creating
-- this, maybe you can use 'cons' or 'snoc' instead?
@@ -569,26 +565,11 @@
-- | This is like 'lines'' but it does *not* preserve newlines.
--
--- Specifically, we just strip the newlines from the result of
--- 'lines''.
---
--- This behaves slightly differently than the old split: the number of
--- resulting strings here is equal to the number of newline characters
--- in the underlying string. This is much more consistent than the old
--- behaviour which blindly used @ByteString@s split and stitched the
--- result back together which was inconsistent with the rest of the
--- interface which worked with number of newlines.
+-- Implementation note: GHC does a pretty good job of optimizing
+-- this naive version. Hand coding a loop should be unnecessary
+-- here.
lines :: YiString -> [YiString]
-lines = Prelude.map dropNl . lines'
- where
- dropNl (YiString t) = case viewr t of
- EmptyR -> Yi.Rope.empty
- ts :> ch@(Chunk l tx) ->
- YiString $ ts |- if TX.null tx
- then ch
- else case TX.last tx of
- '\n' -> Chunk (l - 1) (TX.init tx)
- _ -> ch
+lines = fmap fromText . TX.lines . toText
-- | Splits the 'YiString' into a list of 'YiString' each containing a
-- line.
@@ -603,13 +584,15 @@
--
-- > 'toText' . 'concat' . 'lines'' ≡ 'toText'
--
--- but the underlying structure might change: notably, chunks will
--- most likely change sizes.
lines' :: YiString -> [YiString]
-lines' t = let (YiString f, YiString s) = splitAtLine' 0 t
- in if T.null s
- then if T.null f then [] else [YiString f]
- else YiString f : lines' (YiString s)
+lines' = splitByKeepingDelim '\n'
+
+splitByKeepingDelim :: Char -> YiString -> [YiString]
+splitByKeepingDelim x = fmap fromText . fix go x . toText
+ where
+ go :: (Char -> TX.Text -> [TX.Text]) -> Char -> TX.Text -> [TX.Text]
+ go _ c (TX.span (/=c) -> (_, TX.null -> True)) = []
+ go f c (TX.span (/=c) -> (a,b)) = a `TX.snoc` c : f c (TX.tail b)
-- | Joins up lines by a newline character. It does not leave a
-- newline after the last line. If you want a more classical
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-rope-0.8/yi-rope.cabal new/yi-rope-0.9/yi-rope.cabal
--- old/yi-rope-0.8/yi-rope.cabal 2016-10-10 15:27:03.000000000 +0200
+++ new/yi-rope-0.9/yi-rope.cabal 2017-07-03 22:35:43.000000000 +0200
@@ -1,17 +1,17 @@
name: yi-rope
-version: 0.8
+version: 0.9
synopsis: A rope data structure used by Yi
description: A rope data structure used by Yi
license: GPL-2
license-file: LICENSE
-author: Mateusz Kowalczyk
-maintainer: fuuzetsu(a)fuuzetsu.co.uk
+author: AUTHORS
+maintainer: yi-devel(a)googlegroups.com
category: Yi
build-type: Simple
cabal-version: >=1.10
library
- ghc-options: -fpedantic-bottoms -fexpose-all-unfoldings -Wall -O2 -flate-dmd-anal
+ ghc-options: -fpedantic-bottoms -fexpose-all-unfoldings -ferror-spans -Wall -O2 -flate-dmd-anal
exposed-modules:
Yi.Rope
1
0
Hello community,
here is the log from the commit of package ghc-yi-mode-javascript for openSUSE:Factory checked in at 2017-08-31 21:02:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-mode-javascript (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-mode-javascript.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-mode-javascript"
Thu Aug 31 21:02:44 2017 rev:3 rq:513561 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-mode-javascript/ghc-yi-mode-javascript.changes 2017-07-06 00:00:28.035084055 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-mode-javascript.new/ghc-yi-mode-javascript.changes 2017-08-31 21:02:48.805885568 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:44 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-mode-javascript-0.13.7.tar.gz
New:
----
yi-mode-javascript-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-mode-javascript.spec ++++++
--- /var/tmp/diff_new_pack.6vqihZ/_old 2017-08-31 21:02:50.173693388 +0200
+++ /var/tmp/diff_new_pack.6vqihZ/_new 2017-08-31 21:02:50.177692827 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-mode-javascript
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Yi editor javascript mode
License: GPL-2.0+
++++++ yi-mode-javascript-0.13.7.tar.gz -> yi-mode-javascript-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-javascript-0.13.7/src/Yi/Syntax/JavaScript.hs new/yi-mode-javascript-0.14.0/src/Yi/Syntax/JavaScript.hs
--- old/yi-mode-javascript-0.13.7/src/Yi/Syntax/JavaScript.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-mode-javascript-0.14.0/src/Yi/Syntax/JavaScript.hs 2017-06-19 21:00:18.000000000 +0200
@@ -18,6 +18,7 @@
module Yi.Syntax.JavaScript where
import Prelude hiding (elem,error,any,exp)
+import qualified Prelude
import Control.Applicative (Alternative ((<|>), many), optional)
import Data.Data (Data)
@@ -126,6 +127,8 @@
subtrees (Else _ x) = fromBlock x
subtrees (With _ _ x) = fromBlock x
subtrees _ = []
+ uniplate = Prelude.error "uniplate not implemented in IsTree (Yi.Syntax.JavaScript.Statement)"
+ emptyNode = Prelude.error "emptyNode not implemented in IsTree (Yi.Syntax.JavaScript.Statement)"
instance Failable ForContent where
stupid = ForErr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-javascript-0.13.7/yi-mode-javascript.cabal new/yi-mode-javascript-0.14.0/yi-mode-javascript.cabal
--- old/yi-mode-javascript-0.13.7/yi-mode-javascript.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-mode-javascript-0.14.0/yi-mode-javascript.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-mode-javascript
-version: 0.13.7
+version: 0.14.0
synopsis: Yi editor javascript mode
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-mode-haskell for openSUSE:Factory checked in at 2017-08-31 21:02:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-mode-haskell (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-mode-haskell.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-mode-haskell"
Thu Aug 31 21:02:42 2017 rev:3 rq:513560 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-mode-haskell/ghc-yi-mode-haskell.changes 2017-07-06 00:00:23.699694794 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-mode-haskell.new/ghc-yi-mode-haskell.changes 2017-08-31 21:02:46.602195191 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:12 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-mode-haskell-0.13.7.tar.gz
New:
----
yi-mode-haskell-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-mode-haskell.spec ++++++
--- /var/tmp/diff_new_pack.75am7O/_old 2017-08-31 21:02:48.001998516 +0200
+++ /var/tmp/diff_new_pack.75am7O/_new 2017-08-31 21:02:48.041992896 +0200
@@ -17,9 +17,8 @@
%global pkg_name yi-mode-haskell
-%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Yi editor haskell mode
License: GPL-2.0+
@@ -31,6 +30,7 @@
BuildRequires: ghc-array-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-data-default-devel
+BuildRequires: ghc-filepath-devel
BuildRequires: ghc-microlens-platform-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-text-devel
@@ -38,19 +38,6 @@
BuildRequires: ghc-yi-language-devel
BuildRequires: ghc-yi-rope-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if %{with tests}
-BuildRequires: ghc-QuickCheck-devel
-BuildRequires: ghc-containers-devel
-BuildRequires: ghc-filepath-devel
-BuildRequires: ghc-hashable-devel
-BuildRequires: ghc-hspec-devel
-BuildRequires: ghc-pointedlist-devel
-BuildRequires: ghc-regex-base-devel
-BuildRequires: ghc-regex-tdfa-devel
-BuildRequires: ghc-template-haskell-devel
-BuildRequires: ghc-transformers-base-devel
-BuildRequires: ghc-unordered-containers-devel
-%endif
%description
Yi editor haskell mode.
@@ -76,9 +63,6 @@
%install
%ghc_lib_install
-%check
-%cabal_test
-
%post devel
%ghc_pkg_recache
++++++ yi-mode-haskell-0.13.7.tar.gz -> yi-mode-haskell-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-haskell-0.13.7/test/Spec.hs new/yi-mode-haskell-0.14.0/test/Spec.hs
--- old/yi-mode-haskell-0.13.7/test/Spec.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-mode-haskell-0.14.0/test/Spec.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-haskell-0.13.7/test/Yi/Lexer/HaskellSpec.hs new/yi-mode-haskell-0.14.0/test/Yi/Lexer/HaskellSpec.hs
--- old/yi-mode-haskell-0.13.7/test/Yi/Lexer/HaskellSpec.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-mode-haskell-0.14.0/test/Yi/Lexer/HaskellSpec.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-{-# LANGUAGE OverloadedStrings, FlexibleInstances #-}
-{-# LANGUAGE IncoherentInstances, UndecidableInstances #-}
-{-# LANGUAGE StandaloneDeriving, QuasiQuotes #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-
-module Yi.Lexer.HaskellSpec (main, spec) where
-
-
-import Control.Applicative ((<$>))
-import Prelude hiding (lex)
-import System.FilePath ((</>))
-import Test.Hspec
-import Yi.Buffer.Basic (Point(..))
-import Yi.Lexer.Alex
-import Yi.Lexer.Haskell
-import Yi.Lexer.Helpers.TH
-
-
-deriving instance Read OpType
-deriving instance Read ReservedType
-deriving instance Read CommentType
-deriving instance Read Token
-deriving instance Read Posn
-deriving instance Read Size
-deriving instance Read Point
-deriving instance Read a => Read (Tok a)
-
-newState :: AlexState HlState
-newState = AlexState initState 0 startPosn
-
-mkIndx :: String -> IndexedStr
-mkIndx = zip [1 ..]
-
-newInput :: String -> AlexInput
-newInput s = ('\n', [], mkIndx s)
-
-lex :: String -> [(AlexState HlState, TT)]
-lex s = unfoldLexer alexScanToken (newState, newInput s)
-
-lexTok :: String -> [TT]
-lexTok = map snd . lex
-
-lexToks :: String -> [Token]
-lexToks = map tokT . lexTok
-
-shouldLexToS :: FilePath -> [Token] -> Expectation
-shouldLexToS fp t = lexToks <$> readSample fp `shouldReturn` t
-
-lexesToS :: String -> [Token] -> Spec
-lexesToS s tt = it s $ s `shouldLexToS` tt
-
-readSample :: FilePath -> IO String
-readSample x = readFile $ "test" </> "test_data" </> x
-
-main :: IO ()
-main = hspec spec
-
-spec :: Spec
-spec = do
- describe "lexer tests" $ do
- it "fill me in" pending
- -- "Simple1.hs" `lexesToS` [ritFile|test/test_data/Simple1.hs_Token|]
- -- "Simple1Unicode.hs" `lexesToS` [ritFile|test/test_data/Simple1Unicode.hs_Token|]
- -- "UnicodeLiteral.hs" `lexesTo` [ritFile|test/test_data/UnicodeLiteral.hs_TToken|]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-haskell-0.13.7/test/Yi/Lexer/Helpers/TH.hs new/yi-mode-haskell-0.14.0/test/Yi/Lexer/Helpers/TH.hs
--- old/yi-mode-haskell-0.13.7/test/Yi/Lexer/Helpers/TH.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-mode-haskell-0.14.0/test/Yi/Lexer/Helpers/TH.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-module Yi.Lexer.Helpers.TH where
-
-import Language.Haskell.TH
-import Language.Haskell.TH.Quote
-
-literally :: String -> Q Exp
-literally = return . LitE . StringL
-
-withRead :: String -> Q Exp
-withRead s = return $ AppE (VarE $ mkName "read") (LitE $ StringL s)
-
-lit :: QuasiQuoter
-lit = QuasiQuoter { quoteExp = literally
- , quotePat = \s -> error s $ "quotePat: " ++ s
- , quoteType = \s -> error $ "quoteType: " ++ s
- , quoteDec = \s -> error $ "quoteDec: " ++ s}
-
-rlit :: QuasiQuoter
-rlit = QuasiQuoter { quoteExp = withRead
- , quotePat = \s -> error s $ "quotePat: " ++ s
- , quoteType = \s -> error $ "quoteType: " ++ s
- , quoteDec = \s -> error $ "quoteDec: " ++ s}
-
-
--- | Read file as-is.
-litFile :: QuasiQuoter
-litFile = quoteFile lit
-
-ritFile :: QuasiQuoter
-ritFile = quoteFile rlit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-haskell-0.13.7/test/Yi/Lexer/Helpers.hs new/yi-mode-haskell-0.14.0/test/Yi/Lexer/Helpers.hs
--- old/yi-mode-haskell-0.13.7/test/Yi/Lexer/Helpers.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-mode-haskell-0.14.0/test/Yi/Lexer/Helpers.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-{-# LANGUAGE QuasiQuotes #-}
-module Yi.Lexer.Helpers where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-mode-haskell-0.13.7/yi-mode-haskell.cabal new/yi-mode-haskell-0.14.0/yi-mode-haskell.cabal
--- old/yi-mode-haskell-0.13.7/yi-mode-haskell.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-mode-haskell-0.14.0/yi-mode-haskell.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-mode-haskell
-version: 0.13.7
+version: 0.14.0
synopsis: Yi editor haskell mode
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -31,6 +31,7 @@
, array
, binary >= 0.7
, data-default
+ , filepath
, microlens-platform
, text
, yi-core
@@ -51,42 +52,3 @@
other-modules:
Paths_yi_mode_haskell
default-language: Haskell2010
-
-test-suite spec
- type: exitcode-stdio-1.0
- main-is: Spec.hs
- hs-source-dirs:
- test
- ghc-options: -Wall -ferror-spans
- include-dirs:
- src/Yi/Lexer
- build-depends:
- base >= 4.8 && < 5
- , array
- , binary >= 0.7
- , data-default
- , microlens-platform
- , text
- , yi-core
- , yi-language
- , yi-rope
- , base
- , array
- , binary
- , containers
- , data-default
- , filepath
- , hashable >=1.1.2.5
- , hspec
- , microlens-platform
- , pointedlist >= 0.5
- , regex-base ==0.93.*
- , regex-tdfa >= 1.1 && <1.3
- , template-haskell >= 2.4
- , transformers-base
- , unordered-containers >= 0.1.3 && < 0.3
- , QuickCheck == 2.*
- , yi-mode-haskell
- other-modules:
- Yi.Lexer.HaskellSpec Yi.Lexer.Helpers Yi.Lexer.Helpers.TH
- default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package ghc-yi-misc-modes for openSUSE:Factory checked in at 2017-08-31 21:02:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-misc-modes (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-misc-modes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-misc-modes"
Thu Aug 31 21:02:39 2017 rev:3 rq:513559 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-misc-modes/ghc-yi-misc-modes.changes 2017-07-06 00:00:19.916227781 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-misc-modes.new/ghc-yi-misc-modes.changes 2017-08-31 21:02:43.974564378 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:32 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-misc-modes-0.13.7.tar.gz
New:
----
yi-misc-modes-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-misc-modes.spec ++++++
--- /var/tmp/diff_new_pack.wlVpcL/_old 2017-08-31 21:02:45.750314882 +0200
+++ /var/tmp/diff_new_pack.wlVpcL/_new 2017-08-31 21:02:45.754314320 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-misc-modes
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Yi editor miscellaneous modes
License: GPL-2.0+
++++++ yi-misc-modes-0.13.7.tar.gz -> yi-misc-modes-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-misc-modes-0.13.7/yi-misc-modes.cabal new/yi-misc-modes-0.14.0/yi-misc-modes.cabal
--- old/yi-misc-modes-0.13.7/yi-misc-modes.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-misc-modes-0.14.0/yi-misc-modes.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-misc-modes
-version: 0.13.7
+version: 0.14.0
synopsis: Yi editor miscellaneous modes
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-language for openSUSE:Factory checked in at 2017-08-31 21:02:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-language (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-language.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-language"
Thu Aug 31 21:02:38 2017 rev:3 rq:513558 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-language/ghc-yi-language.changes 2017-07-06 00:00:17.340590617 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-language.new/ghc-yi-language.changes 2017-08-31 21:02:40.962987511 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:40 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-language-0.13.7.tar.gz
New:
----
yi-language-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-language.spec ++++++
--- /var/tmp/diff_new_pack.XmbD50/_old 2017-08-31 21:02:42.814727338 +0200
+++ /var/tmp/diff_new_pack.XmbD50/_new 2017-08-31 21:02:42.870719470 +0200
@@ -19,7 +19,7 @@
%global pkg_name yi-language
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Collection of language-related Yi libraries
License: GPL-2.0+
++++++ yi-language-0.13.7.tar.gz -> yi-language-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-language-0.13.7/src/Yi/Style/Library.hs new/yi-language-0.14.0/src/Yi/Style/Library.hs
--- old/yi-language-0.13.7/src/Yi/Style/Library.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-language-0.14.0/src/Yi/Style/Library.hs 2017-06-19 21:00:18.000000000 +0200
@@ -3,7 +3,6 @@
import Yi.Style
import Data.Prototype
-import Data.Monoid
type Theme = Proto UIStyle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-language-0.13.7/src/Yi/Syntax.hs new/yi-language-0.14.0/src/Yi/Syntax.hs
--- old/yi-language-0.13.7/src/Yi/Syntax.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-language-0.14.0/src/Yi/Syntax.hs 2017-06-19 21:00:18.000000000 +0200
@@ -33,8 +33,6 @@
import qualified Data.Map as M
import Control.Arrow
import Yi.Style
-import Data.Foldable
-import Data.Traversable
import Yi.Buffer.Basic
import Yi.Region
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-language-0.13.7/src/Yi/Utils.hs new/yi-language-0.14.0/src/Yi/Utils.hs
--- old/yi-language-0.13.7/src/Yi/Utils.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-language-0.14.0/src/Yi/Utils.hs 2017-06-19 21:00:18.000000000 +0200
@@ -1,6 +1,7 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# OPTIONS_HADDOCK show-extensions #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-} -- for Binary instance of Hashmap
-- |
-- Module : Yi.Utils
@@ -15,12 +16,10 @@
module Yi.Utils where
-import Control.Applicative
import Lens.Micro.Platform
import Control.Monad.Base
import Data.Binary
import Data.Char (toLower)
-import Data.Foldable hiding (all,any)
import qualified Data.HashMap.Strict as HashMap
import Data.Hashable(Hashable)
import qualified Data.List.PointedList as PL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-language-0.13.7/test/Spec.hs new/yi-language-0.14.0/test/Spec.hs
--- old/yi-language-0.13.7/test/Spec.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-language-0.14.0/test/Spec.hs 2017-06-19 21:00:18.000000000 +0200
@@ -1,3 +1,6 @@
+
+import Data.Bifunctor (first)
+
import Test.Tasty
import Test.Tasty.Hspec
import Test.Tasty.QuickCheck
@@ -7,13 +10,13 @@
import Text.Regex.TDFA.Pattern
ignoreDoPa :: Pattern -> Pattern
-ignoreDoPa (PCarat dp ) = PCarat (DoPa 0)
-ignoreDoPa (PDollar dp ) = PDollar (DoPa 0)
-ignoreDoPa (PDot dp ) = PDot (DoPa 0)
-ignoreDoPa (PAny dp ps) = PAny (DoPa 0) ps
-ignoreDoPa (PAnyNot dp ps) = PAnyNot (DoPa 0) ps
-ignoreDoPa (PEscape dp pc) = PEscape (DoPa 0) pc
-ignoreDoPa (PChar dp pc) = PChar (DoPa 0) pc
+ignoreDoPa (PCarat _dp ) = PCarat (DoPa 0)
+ignoreDoPa (PDollar _dp ) = PDollar (DoPa 0)
+ignoreDoPa (PDot _dp ) = PDot (DoPa 0)
+ignoreDoPa (PAny _dp ps) = PAny (DoPa 0) ps
+ignoreDoPa (PAnyNot _dp ps) = PAnyNot (DoPa 0) ps
+ignoreDoPa (PEscape _dp pc) = PEscape (DoPa 0) pc
+ignoreDoPa (PChar _dp pc) = PChar (DoPa 0) pc
ignoreDoPa (PGroup m p ) = PGroup m (ignoreDoPa p)
ignoreDoPa (POr l ) = POr (map ignoreDoPa l)
ignoreDoPa (PConcat l ) = PConcat (map ignoreDoPa l)
@@ -25,15 +28,15 @@
ignoreDoPa (PNonEmpty p) = PNonEmpty (ignoreDoPa p)
ignoreDoPa p = p
-mapFst f (a,b) = (f a,b)
-
+main :: IO ()
main = defaultMain =<< tests
+tests :: IO TestTree
tests = testSpec "(Hspec tests)" $ do
describe "reversePattern" $ do
it "reverses normal characters" $
- (mapFst ignoreDoPa . reversePattern <$> parseRegex "ab")
- `shouldBe` (mapFst ignoreDoPa <$> parseRegex "ba")
+ (first ignoreDoPa . reversePattern <$> parseRegex "ab")
+ `shouldBe` (first ignoreDoPa <$> parseRegex "ba")
it "changes carat to dollar" $
(reversePattern <$> parseRegex "^") `shouldBe` parseRegex "$"
@@ -45,5 +48,5 @@
property $ \p -> (reversePattern . reversePattern <$> parseRegex p) `shouldBe` parseRegex p
it "recursively reverses patterns" $
- (mapFst ignoreDoPa . reversePattern <$> parseRegex "foo|bar")
- `shouldBe` (mapFst ignoreDoPa <$> parseRegex "oof|rab")
\ No newline at end of file
+ (first ignoreDoPa . reversePattern <$> parseRegex "foo|bar")
+ `shouldBe` (first ignoreDoPa <$> parseRegex "oof|rab")
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-language-0.13.7/yi-language.cabal new/yi-language-0.14.0/yi-language.cabal
--- old/yi-language-0.13.7/yi-language.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-language-0.14.0/yi-language.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-language
-version: 0.13.7
+version: 0.14.0
synopsis: Collection of language-related Yi libraries.
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -34,13 +34,13 @@
, template-haskell >= 2.4
, containers
, hashable >=1.1.2.5
- , oo-prototypes
, pointedlist >= 0.5
, regex-base ==0.93.*
, regex-tdfa >= 1.1 && <1.3
, transformers-base
, unordered-containers >= 0.1.3 && < 0.3
, microlens-platform
+ , oo-prototypes
build-tools:
alex >= 3.0.3 && < 3.2.0 || >= 3.2.1
exposed-modules:
@@ -71,7 +71,6 @@
, template-haskell >= 2.4
, containers
, hashable >=1.1.2.5
- , oo-prototypes
, pointedlist >= 0.5
, regex-base ==0.93.*
, regex-tdfa >= 1.1 && <1.3
1
0
Hello community,
here is the log from the commit of package ghc-yi-keymap-vim for openSUSE:Factory checked in at 2017-08-31 21:02:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-keymap-vim (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-keymap-vim.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-keymap-vim"
Thu Aug 31 21:02:36 2017 rev:3 rq:513557 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-keymap-vim/ghc-yi-keymap-vim.changes 2017-07-06 00:00:14.988921903 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-keymap-vim.new/ghc-yi-keymap-vim.changes 2017-08-31 21:02:38.167380299 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:46 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-keymap-vim-0.13.7.tar.gz
New:
----
yi-keymap-vim-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-keymap-vim.spec ++++++
--- /var/tmp/diff_new_pack.LGB2wy/_old 2017-08-31 21:02:39.919134175 +0200
+++ /var/tmp/diff_new_pack.LGB2wy/_new 2017-08-31 21:02:39.919134175 +0200
@@ -19,7 +19,7 @@
%global pkg_name yi-keymap-vim
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Vim keymap for Yi editor
License: GPL-2.0+
@@ -490,6 +490,7 @@
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/sort/3.test
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/sort/4.test
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/sort/5.test
+%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/sort/6.test
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/switchcase/g_capU.test
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/switchcase/gtilde.test
%{_datadir}/%{pkg_name}-%{version}/tests/vimtests/switchcase/gtilde_1.test
++++++ yi-keymap-vim-0.13.7.tar.gz -> yi-keymap-vim-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Ex/Commands/Reload.hs new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Ex/Commands/Reload.hs
--- old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Ex/Commands/Reload.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Ex/Commands/Reload.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# OPTIONS_HADDOCK show-extensions #-}
-
--- |
--- Module : Yi.Keymap.Vim.Ex.Commands.Reload
--- License : GPL-2
--- Maintainer : yi-devel(a)googlegroups.com
--- Stability : experimental
--- Portability : portable
-
-module Yi.Keymap.Vim.Ex.Commands.Reload (parse) where
-
-import Data.Text ()
-import Yi.Boot.Internal (reload)
-import Yi.Keymap (Action (YiA))
-import Yi.Keymap.Vim.Common (EventString)
-import Yi.Keymap.Vim.Ex.Commands.Common (impureExCommand)
-import Yi.Keymap.Vim.Ex.Types (ExCommand (cmdAction, cmdShow))
-
-parse :: EventString -> Maybe ExCommand
-parse "reload" = Just $ impureExCommand {
- cmdShow = "reload"
- , cmdAction = YiA reload
- }
-parse _ = Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Ex.hs new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Ex.hs
--- old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Ex.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Ex.hs 2017-06-19 21:01:10.000000000 +0200
@@ -30,7 +30,6 @@
import qualified Yi.Keymap.Vim.Ex.Commands.Paste as Paste (parse)
import qualified Yi.Keymap.Vim.Ex.Commands.Quit as Quit (parse)
import qualified Yi.Keymap.Vim.Ex.Commands.Read as Read (parse)
-import qualified Yi.Keymap.Vim.Ex.Commands.Reload as Reload (parse)
import qualified Yi.Keymap.Vim.Ex.Commands.Shell as Shell (parse)
import qualified Yi.Keymap.Vim.Ex.Commands.Sort as Sort (parse)
import qualified Yi.Keymap.Vim.Ex.Commands.Substitute as Substitute (parse)
@@ -60,7 +59,6 @@
, Paste.parse
, Quit.parse
, Read.parse
- , Reload.parse
, Sort.parse
, Substitute.parse
, Shell.parse
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Motion.hs new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Motion.hs
--- old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/Motion.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/Motion.hs 2017-06-19 21:00:18.000000000 +0200
@@ -205,12 +205,12 @@
matchGotoCharMove (m:[]) | m `elem` ('f' : "FtT") = PartialMatch
matchGotoCharMove (m:"<lt>") | m `elem` ('f' : "FtT") = matchGotoCharMove (m:"<")
matchGotoCharMove (m:c:[]) | m `elem` ('f' : "FtT") = WholeMatch $ Move style False action
- where (dir, style, move, offset) =
+ where (style, move, offset) =
case m of
- 'f' -> (Forward, Inclusive, nextCInLineInc c, pure ())
- 't' -> (Forward, Inclusive, nextCInLineInc c, moveB Character Backward)
- 'F' -> (Backward, Exclusive, prevCInLineInc c, pure ())
- 'T' -> (Backward, Exclusive, prevCInLineInc c, moveB Character Forward)
+ 'f' -> (Inclusive, nextCInLineInc c, pure ())
+ 't' -> (Inclusive, nextCInLineInc c, moveB Character Backward)
+ 'F' -> (Exclusive, prevCInLineInc c, pure ())
+ 'T' -> (Exclusive, prevCInLineInc c, moveB Character Forward)
_ -> error "can't happen"
action mcount = do
let count = fromMaybe 1 mcount
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/VisualMap.hs new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/VisualMap.hs
--- old/yi-keymap-vim-0.13.7/src/Yi/Keymap/Vim/VisualMap.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/src/Yi/Keymap/Vim/VisualMap.hs 2017-06-19 21:00:18.000000000 +0200
@@ -30,7 +30,7 @@
import Yi.Keymap.Vim.Utils (matchFromBool, mkChooseRegisterBinding, mkMotionBinding, addNewLineIfNecessary)
import Yi.MiniBuffer (spawnMinibufferE)
import Yi.Monad (whenM)
-import qualified Yi.Rope as R (toText, countNewLines)
+import qualified Yi.Rope as R (toText)
import Yi.Tag (Tag (Tag))
import Yi.Utils (SemiNum ((-~)))
@@ -253,7 +253,7 @@
void $ deleteRegionWithStyleB reg Block
moveTo (minimum [here, there, here', there'])
insertRopeWithStyleB rope Block
- (Just (Register _ rope), Block) ->
+ (Just (Register _ _), Block) ->
printMsg "Pasting non-block string into a block selection is not implemented"
(Just (Register _style rope), _) -> withCurrentBuffer $ do
region <- regionOfSelectionB
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/tests/Generic/TestPureBufferManipulations.hs new/yi-keymap-vim-0.14.0/tests/Generic/TestPureBufferManipulations.hs
--- old/yi-keymap-vim-0.13.7/tests/Generic/TestPureBufferManipulations.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/tests/Generic/TestPureBufferManipulations.hs 2017-06-19 21:00:18.000000000 +0200
@@ -4,7 +4,7 @@
-- cursor. For example, opening a second buffer is not considered a pure buffer
-- operation.
-module Generic.TestPureBufferManipulations where
+module Generic.TestPureBufferManipulations (getTests) where
import Test.Tasty.HUnit
import Test.Tasty (TestTree, testGroup)
@@ -24,7 +24,6 @@
import Yi.Config (Config)
import Yi.Editor
import Yi.Window
-import Yi.Region
import Generic.TestUtils
@@ -152,9 +151,9 @@
return $ testsFromDirs ++ testsFromFiles
optionalSettingAction :: OptionalSetting -> EditorM ()
-optionalSettingAction (WindowSize w h) =
- let region = mkSizeRegion (Point 0) (Size (w*h))
- in currentWindowA %= (\w -> w { height = h, actualLines = h, winRegion = region })
+optionalSettingAction (WindowSize width' height') =
+ let region = mkSizeRegion (Point 0) (Size (width' * height'))
+ in currentWindowA %= (\w -> w { height = height', actualLines = height', winRegion = region })
mkTestCase :: Config -> KeymapTest -> TestTree
mkTestCase cf t = testCase (ktName t) $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/tests/Vim/EditorManipulations/BufferExCommand.hs new/yi-keymap-vim-0.14.0/tests/Vim/EditorManipulations/BufferExCommand.hs
--- old/yi-keymap-vim-0.13.7/tests/Vim/EditorManipulations/BufferExCommand.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/tests/Vim/EditorManipulations/BufferExCommand.hs 2017-06-19 21:00:18.000000000 +0200
@@ -14,7 +14,7 @@
type BufferName = String
--- | Create three buffers and return the 'BufferRef' and buffer name of
+-- | Create three bufs and return the 'BufferRef' and buffer name of
-- each.
createInitialBuffers :: EditorM [(BufferRef, BufferName)]
createInitialBuffers = do
@@ -25,10 +25,10 @@
nthBufferRef :: Int -> [(BufferRef, BufferName)] -> BufferRef
-nthBufferRef n buffers = fst $ buffers !! n
+nthBufferRef n bufs = fst $ bufs !! n
nthBufferName :: Int -> [(BufferRef, BufferName)] -> BufferName
-nthBufferName n buffers = snd $ buffers !! n
+nthBufferName n bufs = snd $ bufs !! n
tests :: Config -> KeyEval -> TestTree
@@ -37,15 +37,15 @@
testCase ":buffer {bufname} switches to the named buffer" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ preConditions editor bufs =
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
- testActions buffers =
- ev $ ":buffer " ++ nthBufferName 1 buffers ++ "<CR>"
+ testActions bufs =
+ ev $ ":buffer " ++ nthBufferName 1 bufs ++ "<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
assertContentOfCurrentBuffer c "Buffer two" editor
- assertCurrentBuffer (nthBufferRef 1 buffers) editor
+ assertCurrentBuffer (nthBufferRef 1 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -53,16 +53,16 @@
, testCase ":buffer N switches to the numbered buffer" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ preConditions editor bufs =
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
- testActions buffers =
- let (BufferRef bref) = nthBufferRef 1 buffers
+ testActions bufs =
+ let (BufferRef bref) = nthBufferRef 1 bufs
in ev $ ":buffer " ++ show bref ++ "<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
assertContentOfCurrentBuffer c "Buffer two" editor
- assertCurrentBuffer (nthBufferRef 1 buffers) editor
+ assertCurrentBuffer (nthBufferRef 1 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -70,17 +70,17 @@
, testCase ":buffer # switches to the previous buffer" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
+ preConditions editor bufs =
assertEqual "Unexpected buffer stack"
- [nthBufferRef 2 buffers, nthBufferRef 1 buffers]
+ [nthBufferRef 2 bufs, nthBufferRef 1 bufs]
(take 2 . NE.toList $ bufferStack editor)
testActions _ =
ev $ ":buffer #<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
assertEqual "Unexpected buffer stack"
- [nthBufferRef 1 buffers, nthBufferRef 2 buffers]
+ [nthBufferRef 1 bufs, nthBufferRef 2 bufs]
(take 2 . NE.toList $ bufferStack editor)
runTest setupActions preConditions testActions assertions c
@@ -89,15 +89,15 @@
, testCase ":buffer % is a no-op" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertCurrentBuffer (nthBufferRef 2 buffers) editor
+ preConditions editor bufs =
+ assertCurrentBuffer (nthBufferRef 2 bufs) editor
testActions _ =
ev $ ":buffer %<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
assertContentOfCurrentBuffer c "Buffer three" editor
- assertCurrentBuffer (nthBufferRef 2 buffers) editor
+ assertCurrentBuffer (nthBufferRef 2 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -105,15 +105,15 @@
, testCase ":buffer is a no-op" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertCurrentBuffer (nthBufferRef 2 buffers) editor
+ preConditions editor bufs =
+ assertCurrentBuffer (nthBufferRef 2 bufs) editor
testActions _ =
ev $ ":buffer<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
assertContentOfCurrentBuffer c "Buffer three" editor
- assertCurrentBuffer (nthBufferRef 2 buffers) editor
+ assertCurrentBuffer (nthBufferRef 2 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -121,15 +121,15 @@
, testCase "A modified buffer is not abandoned" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ preConditions editor bufs =
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
- testActions buffers = do
+ testActions bufs = do
withCurrentBuffer $ insertN "The buffer is altered"
- ev $ ":buffer " ++ nthBufferName 1 buffers ++ "<CR>"
+ ev $ ":buffer " ++ nthBufferName 1 bufs ++ "<CR>"
- assertions editor buffers = do
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ assertions editor bufs = do
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -137,15 +137,15 @@
, testCase "A modified buffer can be abandoned with a bang" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ preConditions editor bufs =
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
- testActions buffers = do
+ testActions bufs = do
withCurrentBuffer $ insertN "The buffer is altered"
- ev $ ":buffer! " ++ nthBufferName 1 buffers ++ "<CR>"
+ ev $ ":buffer! " ++ nthBufferName 1 bufs ++ "<CR>"
- assertions editor buffers = do
- assertCurrentBuffer (nthBufferRef 1 buffers) editor
+ assertions editor bufs = do
+ assertCurrentBuffer (nthBufferRef 1 bufs) editor
runTest setupActions preConditions testActions assertions c
@@ -153,18 +153,18 @@
, testCase ":Nbuffer switches to the numbered buffer" $ do
let setupActions = createInitialBuffers
- preConditions editor buffers =
- assertNotCurrentBuffer (nthBufferRef 1 buffers) editor
+ preConditions editor bufs =
+ assertNotCurrentBuffer (nthBufferRef 1 bufs) editor
- testActions buffers =
+ testActions bufs =
-- return ()
- let (BufferRef bref) = nthBufferRef 1 buffers
+ let (BufferRef bref) = nthBufferRef 1 bufs
in ev $ ":" ++ show bref ++ "buffer<CR>"
-- in ev $ ":buffer " ++ show bref ++ "<CR>"
- assertions editor buffers = do
+ assertions editor bufs = do
-- assertContentOfCurrentBuffer c "Buffer two" editor
- assertCurrentBuffer (nthBufferRef 1 buffers) editor
+ assertCurrentBuffer (nthBufferRef 1 bufs) editor
runTest setupActions preConditions testActions assertions c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/tests/Vim/TestExCommandParsers.hs new/yi-keymap-vim-0.14.0/tests/Vim/TestExCommandParsers.hs
--- old/yi-keymap-vim-0.13.7/tests/Vim/TestExCommandParsers.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/tests/Vim/TestExCommandParsers.hs 2017-06-19 21:00:18.000000000 +0200
@@ -1,7 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
module Vim.TestExCommandParsers (tests) where
-import Control.Applicative
import Data.List (inits)
import Data.Maybe
import Data.Monoid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/tests/vimtests/sort/6.test new/yi-keymap-vim-0.14.0/tests/vimtests/sort/6.test
--- old/yi-keymap-vim-0.13.7/tests/vimtests/sort/6.test 1970-01-01 01:00:00.000000000 +0100
+++ new/yi-keymap-vim-0.14.0/tests/vimtests/sort/6.test 2017-06-18 15:15:20.000000000 +0200
@@ -0,0 +1,20 @@
+-- Input
+(1,1)
+#pragma once
+
+#include <memory>
+#include <future>
+#include <string>
+
+namespace stuff {
+-- Output
+(6,1)
+#pragma once
+
+#include <future>
+#include <memory>
+#include <string>
+
+namespace stuff {
+-- Events
+jjVjj:sort<CR>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-vim-0.13.7/yi-keymap-vim.cabal new/yi-keymap-vim-0.14.0/yi-keymap-vim.cabal
--- old/yi-keymap-vim-0.13.7/yi-keymap-vim.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-keymap-vim-0.14.0/yi-keymap-vim.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-keymap-vim
-version: 0.13.7
+version: 0.14.0
synopsis: Vim keymap for Yi editor
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -384,6 +384,7 @@
tests/vimtests/sort/3.test
tests/vimtests/sort/4.test
tests/vimtests/sort/5.test
+ tests/vimtests/sort/6.test
tests/vimtests/switchcase/g_capU.test
tests/vimtests/switchcase/gtilde.test
tests/vimtests/switchcase/gtilde_1.test
@@ -531,7 +532,6 @@
Yi.Keymap.Vim.Ex.Commands.Paste
Yi.Keymap.Vim.Ex.Commands.Quit
Yi.Keymap.Vim.Ex.Commands.Read
- Yi.Keymap.Vim.Ex.Commands.Reload
Yi.Keymap.Vim.Ex.Commands.Shell
Yi.Keymap.Vim.Ex.Commands.Sort
Yi.Keymap.Vim.Ex.Commands.Substitute
1
0
Hello community,
here is the log from the commit of package ghc-yi-keymap-emacs for openSUSE:Factory checked in at 2017-08-31 21:02:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-keymap-emacs (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-keymap-emacs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-keymap-emacs"
Thu Aug 31 21:02:34 2017 rev:3 rq:513556 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-keymap-emacs/ghc-yi-keymap-emacs.changes 2017-07-06 00:00:12.353293191 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-keymap-emacs.new/ghc-yi-keymap-emacs.changes 2017-08-31 21:02:35.775716333 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:17 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-keymap-emacs-0.13.7.tar.gz
New:
----
yi-keymap-emacs-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-keymap-emacs.spec ++++++
--- /var/tmp/diff_new_pack.QhTVN0/_old 2017-08-31 21:02:37.199516286 +0200
+++ /var/tmp/diff_new_pack.QhTVN0/_new 2017-08-31 21:02:37.227512352 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-keymap-emacs
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Emacs keymap for Yi editor
License: GPL-2.0+
++++++ yi-keymap-emacs-0.13.7.tar.gz -> yi-keymap-emacs-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-emacs-0.13.7/yi-keymap-emacs.cabal new/yi-keymap-emacs-0.14.0/yi-keymap-emacs.cabal
--- old/yi-keymap-emacs-0.13.7/yi-keymap-emacs.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-keymap-emacs-0.14.0/yi-keymap-emacs.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-keymap-emacs
-version: 0.13.7
+version: 0.14.0
synopsis: Emacs keymap for Yi editor
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-keymap-cua for openSUSE:Factory checked in at 2017-08-31 21:02:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-keymap-cua (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-keymap-cua.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-keymap-cua"
Thu Aug 31 21:02:29 2017 rev:3 rq:513555 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-keymap-cua/ghc-yi-keymap-cua.changes 2017-07-06 00:00:09.413707297 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-keymap-cua.new/ghc-yi-keymap-cua.changes 2017-08-31 21:02:31.944254661 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:33 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-keymap-cua-0.13.7.tar.gz
New:
----
yi-keymap-cua-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-keymap-cua.spec ++++++
--- /var/tmp/diff_new_pack.06eUx0/_old 2017-08-31 21:02:34.999825347 +0200
+++ /var/tmp/diff_new_pack.06eUx0/_new 2017-08-31 21:02:35.023821975 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-keymap-cua
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Cua keymap for Yi editor
License: GPL-2.0+
++++++ yi-keymap-cua-0.13.7.tar.gz -> yi-keymap-cua-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-keymap-cua-0.13.7/yi-keymap-cua.cabal new/yi-keymap-cua-0.14.0/yi-keymap-cua.cabal
--- old/yi-keymap-cua-0.13.7/yi-keymap-cua.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-keymap-cua-0.14.0/yi-keymap-cua.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-keymap-cua
-version: 0.13.7
+version: 0.14.0
synopsis: Cua keymap for Yi editor
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-ireader for openSUSE:Factory checked in at 2017-08-31 21:02:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-ireader (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-ireader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-ireader"
Thu Aug 31 21:02:26 2017 rev:3 rq:513554 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-ireader/ghc-yi-ireader.changes 2017-07-06 00:00:05.318284229 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-ireader.new/ghc-yi-ireader.changes 2017-08-31 21:02:27.764841877 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:04 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-ireader-0.13.7.tar.gz
New:
----
yi-ireader-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-ireader.spec ++++++
--- /var/tmp/diff_new_pack.k0jI1a/_old 2017-08-31 21:02:28.936677231 +0200
+++ /var/tmp/diff_new_pack.k0jI1a/_new 2017-08-31 21:02:28.956674422 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-ireader
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Yi editor incremental reader
License: GPL-2.0+
++++++ yi-ireader-0.13.7.tar.gz -> yi-ireader-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-ireader-0.13.7/yi-ireader.cabal new/yi-ireader-0.14.0/yi-ireader.cabal
--- old/yi-ireader-0.13.7/yi-ireader.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-ireader-0.14.0/yi-ireader.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-ireader
-version: 0.13.7
+version: 0.14.0
synopsis: Yi editor incremental reader
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-fuzzy-open for openSUSE:Factory checked in at 2017-08-31 21:02:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-fuzzy-open (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-fuzzy-open.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-fuzzy-open"
Thu Aug 31 21:02:24 2017 rev:3 rq:513553 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-fuzzy-open/ghc-yi-fuzzy-open.changes 2017-07-06 00:00:02.638661713 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-fuzzy-open.new/ghc-yi-fuzzy-open.changes 2017-08-31 21:02:24.961235789 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:26 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-fuzzy-open-0.13.7.tar.gz
New:
----
yi-fuzzy-open-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-fuzzy-open.spec ++++++
--- /var/tmp/diff_new_pack.EDRpIS/_old 2017-08-31 21:02:25.853110479 +0200
+++ /var/tmp/diff_new_pack.EDRpIS/_new 2017-08-31 21:02:25.877107107 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-fuzzy-open
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Fuzzy open plugin for yi
License: GPL-2.0+
++++++ yi-fuzzy-open-0.13.7.tar.gz -> yi-fuzzy-open-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-fuzzy-open-0.13.7/yi-fuzzy-open.cabal new/yi-fuzzy-open-0.14.0/yi-fuzzy-open.cabal
--- old/yi-fuzzy-open-0.13.7/yi-fuzzy-open.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-fuzzy-open-0.14.0/yi-fuzzy-open.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-fuzzy-open
-version: 0.13.7
+version: 0.14.0
synopsis: Fuzzy open plugin for yi
description: This plugin tries to do what ctrl-p does for vim and helm does for emacs.
category: Yi
@@ -33,8 +33,8 @@
, text >= 1.2
, transformers-base >= 0.4.4
, vector >= 0.11
- , yi-core >= 0.13.1
- , yi-language >= 0.13.1
+ , yi-core >= 0.14.0
+ , yi-language >= 0.14.0
, yi-rope >= 0.7
exposed-modules:
Yi.Fuzzy
1
0
Hello community,
here is the log from the commit of package ghc-yi-frontend-vty for openSUSE:Factory checked in at 2017-08-31 21:02:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-frontend-vty (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-frontend-vty.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-frontend-vty"
Thu Aug 31 21:02:22 2017 rev:3 rq:513552 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-frontend-vty/ghc-yi-frontend-vty.changes 2017-07-05 23:59:59.855053846 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-frontend-vty.new/ghc-yi-frontend-vty.changes 2017-08-31 21:02:23.157489220 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:27 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-frontend-vty-0.13.7.tar.gz
New:
----
yi-frontend-vty-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-frontend-vty.spec ++++++
--- /var/tmp/diff_new_pack.pJE5iS/_old 2017-08-31 21:02:24.749265571 +0200
+++ /var/tmp/diff_new_pack.pJE5iS/_new 2017-08-31 21:02:24.749265571 +0200
@@ -18,7 +18,7 @@
%global pkg_name yi-frontend-vty
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Vty frontend for Yi editor
License: GPL-2.0+
++++++ yi-frontend-vty-0.13.7.tar.gz -> yi-frontend-vty-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-frontend-vty-0.13.7/src/Yi/Frontend/Vty.hs new/yi-frontend-vty-0.14.0/src/Yi/Frontend/Vty.hs
--- old/yi-frontend-vty-0.13.7/src/Yi/Frontend/Vty.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-frontend-vty-0.14.0/src/Yi/Frontend/Vty.hs 2017-06-19 21:00:18.000000000 +0200
@@ -402,5 +402,5 @@
baseAttr False sty =
attributesToAttr (appEndo (tabNotFocusedStyle uiStyle) sty) Vty.defAttr
`Vty.withStyle` Vty.underline
- padding = Vty.charFill (tabAttr False) ' ' (SL.sizeX r - width) 1
- width = sum . map ((+2) . T.length . fst) $ ts
+ padding = Vty.charFill (tabAttr False) ' ' (SL.sizeX r - width') 1
+ width' = sum . map ((+2) . T.length . fst) $ ts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-frontend-vty-0.13.7/yi-frontend-vty.cabal new/yi-frontend-vty-0.14.0/yi-frontend-vty.cabal
--- old/yi-frontend-vty-0.13.7/yi-frontend-vty.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-frontend-vty-0.14.0/yi-frontend-vty.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-frontend-vty
-version: 0.13.7
+version: 0.14.0
synopsis: Vty frontend for Yi editor
category: Yi
homepage: https://github.com/yi-editor/yi#readme
1
0
Hello community,
here is the log from the commit of package ghc-yi-core for openSUSE:Factory checked in at 2017-08-31 21:02:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yi-core (Old)
and /work/SRC/openSUSE:Factory/.ghc-yi-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yi-core"
Thu Aug 31 21:02:20 2017 rev:3 rq:513551 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yi-core/ghc-yi-core.changes 2017-07-05 23:59:56.535521475 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yi-core.new/ghc-yi-core.changes 2017-08-31 21:02:21.425732535 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:16 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.14.0.
+
+-------------------------------------------------------------------
Old:
----
yi-core-0.13.7.tar.gz
New:
----
yi-core-0.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yi-core.spec ++++++
--- /var/tmp/diff_new_pack.IdshH6/_old 2017-08-31 21:02:22.585569575 +0200
+++ /var/tmp/diff_new_pack.IdshH6/_new 2017-08-31 21:02:22.621564518 +0200
@@ -19,7 +19,7 @@
%global pkg_name yi-core
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.13.7
+Version: 0.14.0
Release: 0
Summary: Yi editor core library
License: GPL-2.0+
@@ -27,7 +27,6 @@
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-Hclip-devel
BuildRequires: ghc-ListLike-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-attoparsec-devel
@@ -39,7 +38,6 @@
BuildRequires: ghc-dlist-devel
BuildRequires: ghc-dynamic-state-devel
BuildRequires: ghc-dyre-devel
-BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-microlens-platform-devel
@@ -51,7 +49,6 @@
BuildRequires: ghc-process-devel
BuildRequires: ghc-process-extras-devel
BuildRequires: ghc-rpm-macros
-BuildRequires: ghc-safe-devel
BuildRequires: ghc-semigroups-devel
BuildRequires: ghc-split-devel
BuildRequires: ghc-text-devel
@@ -61,7 +58,6 @@
BuildRequires: ghc-unix-compat-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-unordered-containers-devel
-BuildRequires: ghc-word-trie-devel
BuildRequires: ghc-xdg-basedir-devel
BuildRequires: ghc-yi-language-devel
BuildRequires: ghc-yi-rope-devel
++++++ yi-core-0.13.7.tar.gz -> yi-core-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/System/CanonicalizePath.hs new/yi-core-0.14.0/src/System/CanonicalizePath.hs
--- old/yi-core-0.13.7/src/System/CanonicalizePath.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/System/CanonicalizePath.hs 2017-06-19 21:00:18.000000000 +0200
@@ -12,7 +12,6 @@
-- System.Directory.canonicalizePath replacement
module System.CanonicalizePath
( canonicalizePath
- , normalisePath
, replaceShorthands
) where
@@ -32,13 +31,6 @@
pathSeparators, takeDirectory, (</>))
import System.PosixCompat.Files (readSymbolicLink)
--- | Removes `/./` `//` and `/../` sequences from path,
--- doesn't follow symlinks
-normalisePath :: FilePath -> IO FilePath
-normalisePath path = do
- absPath <- makeAbsolute path
- return $ foldl combinePath "/" $ splitPath absPath
-
-- | Returns absolute name of the file, which doesn't contain
-- any `/./`, `/../`, `//` sequences or symlinks
canonicalizePath :: FilePath -> IO FilePath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Boot/Internal.hs new/yi-core-0.14.0/src/Yi/Boot/Internal.hs
--- old/yi-core-0.13.7/src/Yi/Boot/Internal.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Boot/Internal.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-{-# OPTIONS_HADDOCK show-extensions #-}
-
--- |
--- Module : Yi.Boot.Internal
--- License : GPL-2
--- Maintainer : yi-devel(a)googlegroups.com
--- Stability : experimental
--- Portability : portable
---
--- Internal use for Yi.Boot
-
-module Yi.Boot.Internal where
-
-import Config.Dyre.Relaunch (relaunchWithBinaryState)
-import Control.Monad.Base (liftBase)
-import Control.Monad.State (get)
-import Yi.Keymap (YiM, withUI)
-import Yi.Types (withEditor)
-import Yi.UI.Common (end)
-
--- | "reloads" the configuration
---
--- Serializes the editor state and relaunches Yi using the serialized
--- state. The launch of Yi will result in recompilation of the user's
--- custom Yi. This, in effect, "reloads" the configuration.
-reload :: YiM ()
-reload = do
- editor <- withEditor get
- withUI (`end` False)
- liftBase $ relaunchWithBinaryState (Just editor) Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Boot.hs new/yi-core-0.14.0/src/Yi/Boot.hs
--- old/yi-core-0.13.7/src/Yi/Boot.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Boot.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,97 +0,0 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# OPTIONS_HADDOCK show-extensions #-}
-
--- |
--- Module : Yi.Boot
--- License : GPL-2
--- Maintainer : yi-devel(a)googlegroups.com
--- Stability : experimental
--- Portability : portable
---
--- Boot process of Yi.
---
--- Uses Dyre to implement the XMonad-style dynamic reconfiguration.
-
-module Yi.Boot (yi, yiDriver, yiDriver', reload) where
-
-import qualified Config.Dyre as Dyre
-import qualified Config.Dyre.Options as Dyre
-import qualified Config.Dyre.Params as Dyre
-import Config.Dyre.Relaunch
-import Lens.Micro.Platform
-import Data.Text ()
-import qualified Data.Text.IO as T (putStrLn)
-import System.Environment
-import System.Exit
-import Yi.Boot.Internal
-import Yi.Buffer.Misc (BufferId(..))
-import Yi.Config
-import Yi.Editor
-import Yi.Keymap
-import Yi.Main
-import Yi.Option (OptionError(..))
-import Yi.Paths (getCustomConfigPath)
-import Yi.Rope (fromString)
-
--- | Once the custom yi is compiled this restores the editor state (if
--- requested) then proceeds to run the editor.
-realMain :: (Config, ConsoleConfig) -> IO ()
-realMain configs = restoreBinaryState Nothing >>= main configs
-
--- | If the custom yi compile produces errors or warnings then the
--- messages are presented as a separate activity in the editor.
---
--- The use of a separate activity prevents any other initial actions
--- from immediately masking the output.
-showErrorsInConf :: (Config, ConsoleConfig) -> String -> (Config, ConsoleConfig)
-showErrorsInConf c errs = c & _1 . initialActionsA %~ (makeAction openErrBuf :)
- where
- openErrBuf = splitE >> newBufferE (MemBuffer "*errors*") (fromString errs)
-
--- | Handy alias for 'yiDriver'.
-yi :: Config -> IO ()
-yi = yiDriver
-
--- | Called from the yi built with the user's configuration. Does not
--- ignore unknown arguments.
-yiDriver :: Config -> IO ()
-yiDriver = yiDriver' False
-
--- | Used by both the yi executable and the custom yi that is built
--- from the user's configuration. The yi executable uses a default
--- config.
-yiDriver' :: Bool -> Config -> IO ()
-yiDriver' ignoreUnknownArgs cfg = do
- args <- Dyre.withDyreOptions Dyre.defaultParams getArgs
- -- we do the arg processing before dyre, so we can extract
- -- '--ghc-option=' and '--help' and so on.
- case do_args ignoreUnknownArgs cfg args of
- Left (OptionError err code) -> T.putStrLn err >> exitWith code
- Right (finalCfg, cfgcon) -> do
- modules <- getCustomConfigPath (userConfigDir cfgcon) "modules"
- let yiParams = Dyre.defaultParams
- { Dyre.projectName = "yi"
- , Dyre.realMain = realMain
- , Dyre.showError = showErrorsInConf
- , Dyre.configDir = Just $ userConfigDir cfgcon
- , Dyre.ghcOpts = ["-threaded", "-O2", "-rtsopts"]
- ++ ["-i" ++ modules]
- ++ profilingParams
- ++ ghcOptions cfgcon
- , Dyre.includeCurrentDirectory = False
- , Dyre.rtsOptsHandling = Dyre.RTSAppend ["-I5"]
- }
- Dyre.wrapMain yiParams (finalCfg, cfgcon)
-
--- | CPP-guarded profiling params.
-profilingParams :: [String]
-profilingParams =
-#ifdef EVENTLOG
- ["-eventlog", "-rtsopts"] ++
-#endif
-#ifdef PROFILING
- ["-prof", "-auto-all", "-rtsopts"
- , "-osuf=p_o", "-hisuf=p_hi"] ++
-#endif
- []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Buffer/Implementation.hs new/yi-core-0.14.0/src/Yi/Buffer/Implementation.hs
--- old/yi-core-0.13.7/src/Yi/Buffer/Implementation.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Buffer/Implementation.hs 2017-06-19 21:00:18.000000000 +0200
@@ -24,17 +24,16 @@
, Update (..)
, updateIsDelete
, Point
- , Mark, MarkValue(..)
+ , Mark, MarkValue (..)
, Size
, Direction (..)
- , BufferImpl(..)
+ , BufferImpl (mem, marks, markNames, hlCache, overlays, dirtyOffset)
, Overlay (..)
, mkOverlay
, overlayUpdate
, applyUpdateI
, isValidUpdate
, reverseUpdateI
- , nelemsBI
, sizeBI
, newBI
, solPoint
@@ -62,7 +61,6 @@
, SearchExp
, markPointAA
, markGravityAA
- , mem
) where
import GHC.Generics (Generic)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Buffer/Indent.hs new/yi-core-0.14.0/src/Yi/Buffer/Indent.hs
--- old/yi-core-0.13.7/src/Yi/Buffer/Indent.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Buffer/Indent.hs 2017-06-19 21:00:18.000000000 +0200
@@ -38,7 +38,6 @@
import Yi.Buffer.Basic (Direction (..))
import Yi.Buffer.HighLevel (firstNonSpaceB, getNextLineB, getNextNonBlankLineB, moveToSol, readLnB)
import Yi.Buffer.Misc
-import Yi.Buffer.Normal ()
import Yi.Buffer.Region (Region (regionStart), mkRegion, modifyRegionB, readRegionB)
import Yi.Buffer.TextUnit (regionWithTwoMovesB)
import Yi.Rope (YiString)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Buffer/Misc.hs new/yi-core-0.14.0/src/Yi/Buffer/Misc.hs
--- old/yi-core-0.13.7/src/Yi/Buffer/Misc.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Buffer/Misc.hs 2017-06-19 21:00:18.000000000 +0200
@@ -224,7 +224,7 @@
import Yi.Buffer.Implementation
import Yi.Buffer.Undo
import Yi.Interact as I (P (End))
-import Yi.Monad (getsAndModify)
+import Yi.Monad (getsAndModify, uses)
import Yi.Region (Region, mkRegion)
import Yi.Rope (YiString)
import qualified Yi.Rope as R
@@ -233,9 +233,6 @@
import Yi.Utils (SemiNum ((+~)), makeClassyWithSuffix, makeLensesWithSuffix)
import Yi.Window (Window (width, wkey, actualLines), dummyWindow)
-
-uses l f = f <$> use l
-
-- In addition to Buffer's text, this manages (among others):
-- * Log of updates mades
-- * Undo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Buffer/Region.hs new/yi-core-0.14.0/src/Yi/Buffer/Region.hs
--- old/yi-core-0.13.7/src/Yi/Buffer/Region.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Buffer/Region.hs 2017-06-19 21:00:18.000000000 +0200
@@ -130,7 +130,6 @@
linesOfRegionB :: Region -> BufferM [Region]
linesOfRegionB region = do
let start = regionStart region
- end = regionEnd region
direction = regionDirection region
ls <- R.lines' <$> readRegionB region
return $ case ls of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Buffer/Undo.hs new/yi-core-0.14.0/src/Yi/Buffer/Undo.hs
--- old/yi-core-0.13.7/src/Yi/Buffer/Undo.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Buffer/Undo.hs 2017-06-19 21:00:18.000000000 +0200
@@ -57,7 +57,6 @@
) where
import Data.Binary (Binary (..))
-import Data.Monoid
import qualified Data.Sequence as S
import GHC.Generics (Generic)
import Yi.Buffer.Implementation
@@ -147,7 +146,7 @@
where
-- Apply a /valid/ update and also move point in buffer to update position
applyUpdateWithMoveI :: Update -> BufferImpl syntax -> BufferImpl syntax
- applyUpdateWithMoveI u = case updateDirection u of
+ applyUpdateWithMoveI upd = case updateDirection upd of
Forward -> apply . move
Backward -> move . apply
where move = modifyMarkBI pointMark (\v -> v {markPoint = updatePoint u})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/CompletionTree.hs new/yi-core-0.14.0/src/Yi/CompletionTree.hs
--- old/yi-core-0.13.7/src/Yi/CompletionTree.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/CompletionTree.hs 2017-06-19 21:00:18.000000000 +0200
@@ -177,9 +177,9 @@
| mempty == ct = []
| otherwise = toList' ct
where
- toList' (CompletionTree ct)
- | M.null ct = [mempty]
- | otherwise = concat $ M.elems $ M.mapWithKey (\k v -> map (k `LL.append`) $ toList' v) ct
+ toList' (CompletionTree ct')
+ | M.null ct' = [mempty]
+ | otherwise = concat $ M.elems $ M.mapWithKey (\k v -> map (k `LL.append`) $ toList' v) ct'
-- TODO: make this function display a tree and rename to showTree
-- | For debugging purposes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Config/Simple.hs new/yi-core-0.14.0/src/Yi/Config/Simple.hs
--- old/yi-core-0.13.7/src/Yi/Config/Simple.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Config/Simple.hs 2017-06-19 21:01:10.000000000 +0200
@@ -22,6 +22,7 @@
--
-- @
-- import Yi.Config.Simple
+-- import Yi.Boot
-- import qualified Yi.Mode.Haskell as Haskell
-- -- note: don't import "Yi", or else there will be name clashes
--
@@ -45,7 +46,6 @@
module Yi.Config.Simple (
-- * The main interface
ConfigM,
- configMain,
Field,
-- * Modes, commands, and keybindings
globalBindKeys,
@@ -98,7 +98,6 @@
-- we can't just export 'module Yi', because then we would get
-- clashes with Yi.Config
- module Yi.Boot,
module Yi.Buffer,
module Yi.Core,
module Yi.Dired,
@@ -120,7 +119,6 @@
import qualified Data.Text as T
import qualified Data.Sequence as S
import Text.Printf(printf)
-import Yi.Boot
import Yi.Buffer hiding (modifyMode)
import Yi.Config.Default
import Yi.Config.Misc
@@ -157,11 +155,6 @@
--------------- Main interface
-- newtype ConfigM a (imported)
--- | Starts with the given initial config, makes the described
--- modifications, then starts yi.
-configMain :: Config -> ConfigM () -> IO ()
-configMain c m = yi =<< execStateT (runConfigM m) c
-
------------------------- Modes, commands, and keybindings
-- | Adds the given key bindings to the `global keymap'. The bindings
-- will override existing bindings in the case of a clash.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Core.hs new/yi-core-0.14.0/src/Yi/Core.hs
--- old/yi-core-0.13.7/src/Yi/Core.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Core.hs 2017-06-19 21:00:18.000000000 +0200
@@ -85,7 +85,7 @@
import Yi.Keymap
import Yi.Keymap.Keys
import Yi.KillRing (krEndCmd)
-import Yi.Monad (gets)
+import Yi.Monad (gets, uses)
import Yi.PersistentState (loadPersistentState, savePersistentState)
import Yi.Process
import qualified Yi.Rope as R (YiString, fromString, readFile)
@@ -95,8 +95,6 @@
import Yi.Utils (io)
import Yi.Window (bufkey, dummyWindow, isMini, winRegion, wkey)
-
-uses l f = f <$> use l
-- | Make an action suitable for an interactive run.
-- UI will be refreshed.
interactive :: IsRefreshNeeded -> [Action] -> YiM ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Editor.hs new/yi-core-0.14.0/src/Yi/Editor.hs
--- old/yi-core-0.13.7/src/Yi/Editor.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Editor.hs 2017-06-19 21:00:18.000000000 +0200
@@ -102,12 +102,11 @@
import Lens.Micro.Platform (Lens', lens, mapped,
use, view, (%=), (%~),
- (&), (.~), (^.), (.=),
- ASetter)
+ (&), (.~), (^.))
import Control.Monad (forM_, liftM)
import Control.Monad.Reader (MonadReader (ask), asks,
unless, when)
-import Control.Monad.State (gets, modify, MonadState)
+import Control.Monad.State (gets, modify)
import Data.Binary (Binary, get, put)
import Data.Default (Default, def)
import qualified Data.DelayList as DelayList (insert)
@@ -137,7 +136,7 @@
import Yi.JumpList (Jump (..), JumpList, addJump, jumpBack, jumpForward)
import Yi.KillRing (krEmpty, krGet, krPut, krSet)
import Yi.Layout
-import Yi.Monad (getsAndModify)
+import Yi.Monad (assign, getsAndModify, uses)
import Yi.Rope (YiString, empty, fromText)
import qualified Yi.Rope as R (YiString, fromText, snoc)
import Yi.String (listify)
@@ -147,11 +146,6 @@
import Yi.Utils
import Yi.Window
-assign :: MonadState s m => ASetter s s a b -> b -> m ()
-assign = (.=)
-
-uses l f = f <$> use l
-
instance Binary Editor where
put (Editor bss bs supply ts dv _sl msh kr regex _dir _ev _cwa ) =
let putNE (x :| xs) = put x >> put xs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Eval.hs new/yi-core-0.14.0/src/Yi/Eval.hs
--- old/yi-core-0.13.7/src/Yi/Eval.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Eval.hs 2017-06-19 21:00:18.000000000 +0200
@@ -42,7 +42,7 @@
import Prelude hiding (mapM_)
import Lens.Micro.Platform ( (^.), (.=), (%=) )
-import Control.Monad (when, void, forever)
+import Control.Monad (when)
import Data.Array ( elems )
import Data.Binary ( Binary )
import Data.Default ( Default, def )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/MiniBuffer.hs new/yi-core-0.14.0/src/Yi/MiniBuffer.hs
--- old/yi-core-0.13.7/src/Yi/MiniBuffer.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/MiniBuffer.hs 2017-06-19 21:00:18.000000000 +0200
@@ -10,6 +10,7 @@
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_HADDOCK show-extensions #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module : Yi.Minibuffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Monad.hs new/yi-core-0.14.0/src/Yi/Monad.hs
--- old/yi-core-0.13.7/src/Yi/Monad.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Monad.hs 2017-06-19 21:00:18.000000000 +0200
@@ -1,8 +1,10 @@
module Yi.Monad (
+ assign,
gets,
getsAndModify,
maybeM,
repeatUntilM,
+ uses,
whenM,
with,
) where
@@ -10,6 +12,7 @@
import Control.Monad.Base (MonadBase, liftBase)
import Control.Monad.Reader (MonadReader, ask)
import Control.Monad.State (MonadState, get, gets, put, when)
+import Lens.Micro.Platform (Getting, ASetter, (.=), use)
-- | Combination of the Control.Monad.State 'modify' and 'gets'
getsAndModify :: MonadState s m => (s -> (s,a)) -> m a
@@ -39,3 +42,9 @@
then (do xs <- repeatUntilM m
return (x:xs))
else return [x]
+
+assign :: MonadState s m => ASetter s s a b -> b -> m ()
+assign = (.=)
+
+uses :: MonadState s m => Getting a s a -> (a -> b) -> m b
+uses l f = f <$> use l
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Syntax/Tree.hs new/yi-core-0.14.0/src/Yi/Syntax/Tree.hs
--- old/yi-core-0.13.7/src/Yi/Syntax/Tree.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Syntax/Tree.hs 2017-06-19 21:00:18.000000000 +0200
@@ -41,10 +41,9 @@
import Data.Monoid (First (First, getFirst), Last (Last, getLast), (<>))
import Yi.Buffer.Basic (Point)
import Yi.Debug (error, trace)
-import Yi.Lexer.Alex (Posn (Posn, posnLine, posnOfs),
- Tok (Tok, tokPosn), tokBegin, tokEnd)
-import Yi.Region (Region (regionEnd, regionStart),
- includedRegion, mkRegion)
+import Yi.Lexer.Alex (posnLine, posnOfs,
+ Tok (tokPosn), tokBegin, tokEnd)
+import Yi.Region (Region (regionEnd, regionStart), mkRegion)
import Yi.String (showT)
#ifdef TESTING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi/Tag.hs new/yi-core-0.14.0/src/Yi/Tag.hs
--- old/yi-core-0.13.7/src/Yi/Tag.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi/Tag.hs 2017-06-19 21:00:18.000000000 +0200
@@ -41,8 +41,8 @@
import qualified Data.Foldable as F (concat)
import Data.Map (Map, fromListWith, keys, lookup)
import Data.Maybe (mapMaybe)
-import qualified Data.Text as T (Text, append, isPrefixOf, lines, pack, unpack, words)
-import qualified Data.Text.Encoding as E (decodeUtf8, encodeUtf8)
+import qualified Data.Text as T (Text, append, isPrefixOf, lines, unpack, words)
+import qualified Data.Text.Encoding as E (decodeUtf8)
import qualified Data.Text.Read as R (decimal)
import qualified Yi.CompletionTree as CT
import System.FilePath (takeDirectory, takeFileName, (</>))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/src/Yi.hs new/yi-core-0.14.0/src/Yi.hs
--- old/yi-core-0.13.7/src/Yi.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/src/Yi.hs 2017-06-19 21:01:10.000000000 +0200
@@ -20,7 +20,6 @@
module Yi
(
module Data.Prototype, -- prototypes are mainly there for config; makes sense to export them.
- module Yi.Boot,
module Yi.Buffer,
module Yi.Config,
module Yi.Config.Default,
@@ -38,7 +37,6 @@
) where
import Data.Prototype
-import Yi.Boot
import Yi.Buffer
import Yi.Config
import Yi.Config.Default
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/test/Yi/CompletionTests.hs new/yi-core-0.14.0/test/Yi/CompletionTests.hs
--- old/yi-core-0.13.7/test/Yi/CompletionTests.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/test/Yi/CompletionTests.hs 2017-06-19 21:00:18.000000000 +0200
@@ -1,13 +1,11 @@
module Yi.CompletionTests (testSuite) where
-import Data.List (sort,nub)
import Data.Maybe(isJust)
import Data.Monoid
import Data.Text.Arbitrary()
import Test.Tasty
import Test.Tasty.QuickCheck
import Yi.Completion as C
-import qualified Data.Map as M
import qualified Data.Text as T
testSuite :: TestTree
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/test/Yi/Mode/CommonTests.hs new/yi-core-0.14.0/test/Yi/Mode/CommonTests.hs
--- old/yi-core-0.13.7/test/Yi/Mode/CommonTests.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/test/Yi/Mode/CommonTests.hs 2017-06-19 21:00:18.000000000 +0200
@@ -2,7 +2,6 @@
module Yi.Mode.CommonTests (testSuite) where
import Test.Tasty
-import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Yi.Mode.Common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/test/Yi/TagTests.hs new/yi-core-0.14.0/test/Yi/TagTests.hs
--- old/yi-core-0.13.7/test/Yi/TagTests.hs 2017-06-14 18:26:30.000000000 +0200
+++ new/yi-core-0.14.0/test/Yi/TagTests.hs 2017-06-19 21:00:18.000000000 +0200
@@ -2,7 +2,6 @@
module Yi.TagTests (testSuite) where
import Test.Tasty
-import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Yi.Tag
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yi-core-0.13.7/yi-core.cabal new/yi-core-0.14.0/yi-core.cabal
--- old/yi-core-0.13.7/yi-core.cabal 2017-06-17 19:57:23.000000000 +0200
+++ new/yi-core-0.14.0/yi-core.cabal 2017-06-19 21:18:28.000000000 +0200
@@ -3,7 +3,7 @@
-- see: https://github.com/sol/hpack
name: yi-core
-version: 0.13.7
+version: 0.14.0
synopsis: Yi editor core library
category: Yi
homepage: https://github.com/yi-editor/yi#readme
@@ -52,11 +52,8 @@
, directory
, dlist >= 0.4.1
, dynamic-state >= 0.1.0.5
- , dyre >= 0.8.11
- , exceptions
, filepath >= 1.1
, hashable >= 1.1.2.5
- , Hclip >= 3
, ListLike >= 4.5
, microlens-platform
, mtl >= 0.1.0.1
@@ -66,8 +63,6 @@
, pointedlist >= 0.5
, process >= 1.0.1.1
, process-extras >= 0.3.3.8
- , safe >= 0.3.4
- , semigroups
, split >= 0.2
, text >= 1.1.1.3
, text-icu >= 0.7
@@ -75,10 +70,11 @@
, transformers-base
, unix-compat >= 0.1
, unordered-containers >= 0.1.3
- , word-trie >= 0.2.0.4
, xdg-basedir >= 0.2.1
, yi-language >= 0.1.1.0
, yi-rope >= 0.7.0.0
+ , semigroups
+ , dyre >= 0.8.11
if os(win32)
build-depends:
Win32
@@ -101,8 +97,6 @@
, random
exposed-modules:
Yi
- Yi.Boot
- Yi.Boot.Internal
Yi.Buffer
Yi.Buffer.Adjusted
Yi.Buffer.HighLevel
@@ -194,11 +188,8 @@
, directory
, dlist >= 0.4.1
, dynamic-state >= 0.1.0.5
- , dyre >= 0.8.11
- , exceptions
, filepath >= 1.1
, hashable >= 1.1.2.5
- , Hclip >= 3
, ListLike >= 4.5
, microlens-platform
, mtl >= 0.1.0.1
@@ -208,8 +199,6 @@
, pointedlist >= 0.5
, process >= 1.0.1.1
, process-extras >= 0.3.3.8
- , safe >= 0.3.4
- , semigroups
, split >= 0.2
, text >= 1.1.1.3
, text-icu >= 0.7
@@ -217,7 +206,6 @@
, transformers-base
, unix-compat >= 0.1
, unordered-containers >= 0.1.3
- , word-trie >= 0.2.0.4
, xdg-basedir >= 0.2.1
, yi-language >= 0.1.1.0
, yi-rope >= 0.7.0.0
@@ -258,11 +246,8 @@
, directory
, dlist >= 0.4.1
, dynamic-state >= 0.1.0.5
- , dyre >= 0.8.11
- , exceptions
, filepath >= 1.1
, hashable >= 1.1.2.5
- , Hclip >= 3
, ListLike >= 4.5
, microlens-platform
, mtl >= 0.1.0.1
@@ -272,8 +257,6 @@
, pointedlist >= 0.5
, process >= 1.0.1.1
, process-extras >= 0.3.3.8
- , safe >= 0.3.4
- , semigroups
, split >= 0.2
, text >= 1.1.1.3
, text-icu >= 0.7
@@ -281,7 +264,6 @@
, transformers-base
, unix-compat >= 0.1
, unordered-containers >= 0.1.3
- , word-trie >= 0.2.0.4
, xdg-basedir >= 0.2.1
, yi-language >= 0.1.1.0
, yi-rope >= 0.7.0.0
1
0
Hello community,
here is the log from the commit of package ghc-yesod-test for openSUSE:Factory checked in at 2017-08-31 21:02:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-test (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-test.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-test"
Thu Aug 31 21:02:17 2017 rev:5 rq:513550 version:1.5.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-test/ghc-yesod-test.changes 2017-07-06 00:03:53.474142697 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-test.new/ghc-yesod-test.changes 2017-08-31 21:02:18.914085426 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:16 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.5.8.
+
+-------------------------------------------------------------------
Old:
----
yesod-test-1.5.7.tar.gz
New:
----
yesod-test-1.5.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-test.spec ++++++
--- /var/tmp/diff_new_pack.3wCk6p/_old 2017-08-31 21:02:19.921943821 +0200
+++ /var/tmp/diff_new_pack.3wCk6p/_new 2017-08-31 21:02:19.937941573 +0200
@@ -19,7 +19,7 @@
%global pkg_name yesod-test
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.5.7
+Version: 1.5.8
Release: 0
Summary: Integration testing for WAI/Yesod Applications
License: MIT
++++++ yesod-test-1.5.7.tar.gz -> yesod-test-1.5.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-test-1.5.7/ChangeLog.md new/yesod-test-1.5.8/ChangeLog.md
--- old/yesod-test-1.5.7/ChangeLog.md 2017-06-22 18:16:04.000000000 +0200
+++ new/yesod-test-1.5.8/ChangeLog.md 2017-07-20 12:41:52.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.5.8
+* Added implicit parameter HasCallStack to assertions.
+[#1421](https://github.com/yesodweb/yesod/pull/1421)
+
## 1.5.7
* Add clickOn.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-test-1.5.7/Yesod/Test.hs new/yesod-test-1.5.8/Yesod/Test.hs
--- old/yesod-test-1.5.7/Yesod/Test.hs 2017-06-22 18:16:04.000000000 +0200
+++ new/yesod-test-1.5.8/Yesod/Test.hs 2017-07-20 12:41:52.000000000 +0200
@@ -4,6 +4,8 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ImplicitParams #-}
+{-# LANGUAGE ConstraintKinds #-}
{-|
Yesod.Test is a pragmatic framework for testing web applications built
@@ -150,6 +152,16 @@
import Control.Applicative ((<$>))
import Text.Show.Pretty (ppShow)
import Data.Monoid (mempty)
+#if MIN_VERSION_base(4,9,0)
+import GHC.Stack (HasCallStack)
+#elif MIN_VERSION_base(4,8,1)
+import GHC.Stack (CallStack)
+type HasCallStack = (?callStack :: CallStack)
+#else
+import GHC.Exts (Constraint)
+type HasCallStack = (() :: Constraint)
+#endif
+
-- | The state used in a single test case defined using 'yit'
--
@@ -330,7 +342,7 @@
-- In case they are not equal, error mesasge includes the two values.
--
-- @since 1.5.2
-assertEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site ()
+assertEq :: (HasCallStack, Eq a, Show a) => String -> a -> a -> YesodExample site ()
assertEq m a b =
liftIO $ HUnit.assertBool msg (a == b)
where msg = "Assertion: " ++ m ++ "\n" ++
@@ -342,24 +354,24 @@
-- In case they are equal, error mesasge includes the values.
--
-- @since 1.5.6
-assertNotEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site ()
+assertNotEq :: (HasCallStack, Eq a, Show a) => String -> a -> a -> YesodExample site ()
assertNotEq m a b =
liftIO $ HUnit.assertBool msg (a /= b)
where msg = "Assertion: " ++ m ++ "\n" ++
"Both arguments: " ++ ppShow a ++ "\n"
{-# DEPRECATED assertEqual "Use assertEq instead" #-}
-assertEqual :: (Eq a) => String -> a -> a -> YesodExample site ()
+assertEqual :: (HasCallStack, Eq a) => String -> a -> a -> YesodExample site ()
assertEqual = assertEqualNoShow
-- | Asserts that the two given values are equal.
--
-- @since 1.5.2
-assertEqualNoShow :: (Eq a) => String -> a -> a -> YesodExample site ()
+assertEqualNoShow :: (HasCallStack, Eq a) => String -> a -> a -> YesodExample site ()
assertEqualNoShow msg a b = liftIO $ HUnit.assertBool msg (a == b)
-- | Assert the last response status is as expected.
-statusIs :: Int -> YesodExample site ()
+statusIs :: HasCallStack => Int -> YesodExample site ()
statusIs number = withResponse $ \ SResponse { simpleStatus = s } ->
liftIO $ flip HUnit.assertBool (H.statusCode s == number) $ concat
[ "Expected status was ", show number
@@ -367,7 +379,7 @@
]
-- | Assert the given header key/value pair was returned.
-assertHeader :: CI BS8.ByteString -> BS8.ByteString -> YesodExample site ()
+assertHeader :: HasCallStack => CI BS8.ByteString -> BS8.ByteString -> YesodExample site ()
assertHeader header value = withResponse $ \ SResponse { simpleHeaders = h } ->
case lookup header h of
Nothing -> failure $ T.pack $ concat
@@ -387,7 +399,7 @@
]
-- | Assert the given header was not included in the response.
-assertNoHeader :: CI BS8.ByteString -> YesodExample site ()
+assertNoHeader :: HasCallStack => CI BS8.ByteString -> YesodExample site ()
assertNoHeader header = withResponse $ \ SResponse { simpleHeaders = h } ->
case lookup header h of
Nothing -> return ()
@@ -400,14 +412,14 @@
-- | Assert the last response is exactly equal to the given text. This is
-- useful for testing API responses.
-bodyEquals :: String -> YesodExample site ()
+bodyEquals :: HasCallStack => String -> YesodExample site ()
bodyEquals text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body to equal " ++ text) $
(simpleBody res) == encodeUtf8 (TL.pack text)
-- | Assert the last response has the given text. The check is performed using the response
-- body in full text form.
-bodyContains :: String -> YesodExample site ()
+bodyContains :: HasCallStack => String -> YesodExample site ()
bodyContains text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body to contain " ++ text) $
(simpleBody res) `contains` text
@@ -415,7 +427,7 @@
-- | Assert the last response doesn't have the given text. The check is performed using the response
-- body in full text form.
-- @since 1.5.3
-bodyNotContains :: String -> YesodExample site ()
+bodyNotContains :: HasCallStack => String -> YesodExample site ()
bodyNotContains text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body not to contain " ++ text) $
not $ contains (simpleBody res) text
@@ -425,7 +437,7 @@
-- | Queries the HTML using a CSS selector, and all matched elements must contain
-- the given string.
-htmlAllContain :: Query -> String -> YesodExample site ()
+htmlAllContain :: HasCallStack => Query -> String -> YesodExample site ()
htmlAllContain query search = do
matches <- htmlQuery query
case matches of
@@ -437,7 +449,7 @@
-- element contains the given string.
--
-- Since 0.3.5
-htmlAnyContain :: Query -> String -> YesodExample site ()
+htmlAnyContain :: HasCallStack => Query -> String -> YesodExample site ()
htmlAnyContain query search = do
matches <- htmlQuery query
case matches of
@@ -450,7 +462,7 @@
-- inverse of htmlAnyContains).
--
-- Since 1.2.2
-htmlNoneContain :: Query -> String -> YesodExample site ()
+htmlNoneContain :: HasCallStack => Query -> String -> YesodExample site ()
htmlNoneContain query search = do
matches <- htmlQuery query
case DL.filter (DL.isInfixOf search) (map (TL.unpack . decodeUtf8) matches) of
@@ -460,7 +472,7 @@
-- | Performs a CSS query on the last response and asserts the matched elements
-- are as many as expected.
-htmlCount :: Query -> Int -> YesodExample site ()
+htmlCount :: HasCallStack => Query -> Int -> YesodExample site ()
htmlCount query count = do
matches <- fmap DL.length $ htmlQuery query
liftIO $ flip HUnit.assertBool (matches == count)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-test-1.5.7/yesod-test.cabal new/yesod-test-1.5.8/yesod-test.cabal
--- old/yesod-test-1.5.7/yesod-test.cabal 2017-06-22 18:16:04.000000000 +0200
+++ new/yesod-test-1.5.8/yesod-test.cabal 2017-07-20 12:41:52.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-test
-version: 1.5.7
+version: 1.5.8
license: MIT
license-file: LICENSE
author: Nubis <nubis(a)woobiz.com.ar>
1
0
Hello community,
here is the log from the commit of package ghc-yesod-static for openSUSE:Factory checked in at 2017-08-31 21:02:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-static (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-static.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-static"
Thu Aug 31 21:02:14 2017 rev:8 rq:513549 version:1.5.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-static/ghc-yesod-static.changes 2017-06-21 13:56:48.430624082 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-static.new/ghc-yesod-static.changes 2017-08-31 21:02:14.746670957 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:13 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.5.3.1.
+
+-------------------------------------------------------------------
Old:
----
yesod-static-1.5.3.tar.gz
New:
----
yesod-static-1.5.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-static.spec ++++++
--- /var/tmp/diff_new_pack.ehtWkY/_old 2017-08-31 21:02:15.598551266 +0200
+++ /var/tmp/diff_new_pack.ehtWkY/_new 2017-08-31 21:02:15.610549580 +0200
@@ -19,7 +19,7 @@
%global pkg_name yesod-static
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.5.3
+Version: 1.5.3.1
Release: 0
Summary: Static file serving subsite for Yesod Web Framework
License: MIT
@@ -36,8 +36,8 @@
BuildRequires: ghc-conduit-devel
BuildRequires: ghc-conduit-extra-devel
BuildRequires: ghc-containers-devel
-BuildRequires: ghc-cryptohash-conduit-devel
-BuildRequires: ghc-cryptohash-devel
+BuildRequires: ghc-cryptonite-conduit-devel
+BuildRequires: ghc-cryptonite-devel
BuildRequires: ghc-css-text-devel
BuildRequires: ghc-data-default-devel
BuildRequires: ghc-directory-devel
@@ -47,6 +47,7 @@
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-hjsmin-devel
BuildRequires: ghc-http-types-devel
+BuildRequires: ghc-memory-devel
BuildRequires: ghc-mime-types-devel
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-process-devel
++++++ yesod-static-1.5.3.tar.gz -> yesod-static-1.5.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-static-1.5.3/ChangeLog.md new/yesod-static-1.5.3.1/ChangeLog.md
--- old/yesod-static-1.5.3/ChangeLog.md 2017-06-07 15:01:59.000000000 +0200
+++ new/yesod-static-1.5.3.1/ChangeLog.md 2017-07-23 06:27:05.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.5.3.1
+
+* Switch to cryptonite
+
## 1.5.3
* Add `staticFilesMap` function
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-static-1.5.3/Yesod/Static.hs new/yesod-static-1.5.3.1/Yesod/Static.hs
--- old/yesod-static-1.5.3/Yesod/Static.hs 2017-06-07 15:01:59.000000000 +0200
+++ new/yesod-static-1.5.3.1/Yesod/Static.hs 2017-07-23 06:13:24.000000000 +0200
@@ -81,7 +81,7 @@
import Control.Monad.Catch (MonadThrow)
import Control.Monad.Trans.State
-import qualified Data.Byteable as Byteable
+import qualified Data.ByteArray as ByteArray
import qualified Data.ByteString.Base64
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy as L
@@ -420,7 +420,7 @@
base64md5File :: FilePath -> IO String
base64md5File = fmap (base64 . encode) . hashFile
- where encode d = Byteable.toBytes (d :: Digest MD5)
+ where encode d = ByteArray.convert (d :: Digest MD5)
base64md5 :: L.ByteString -> String
base64md5 lbs =
@@ -428,7 +428,7 @@
$ runIdentity
$ sourceList (L.toChunks lbs) $$ sinkHash
where
- encode d = Byteable.toBytes (d :: Digest MD5)
+ encode d = ByteArray.convert (d :: Digest MD5)
base64 :: S.ByteString -> String
base64 = map tr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-static-1.5.3/yesod-static.cabal new/yesod-static-1.5.3.1/yesod-static.cabal
--- old/yesod-static-1.5.3/yesod-static.cabal 2017-06-07 15:01:59.000000000 +0200
+++ new/yesod-static-1.5.3.1/yesod-static.cabal 2017-07-23 06:26:50.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-static
-version: 1.5.3
+version: 1.5.3.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
@@ -44,8 +44,9 @@
, unix-compat >= 0.2
, conduit >= 0.5
, conduit-extra
- , cryptohash-conduit >= 0.1
- , cryptohash >= 0.11
+ , cryptonite-conduit >= 0.1
+ , cryptonite >= 0.11
+ , memory
, data-default
, mime-types >= 0.1
, hjsmin
@@ -112,8 +113,9 @@
, http-types
, unix-compat
, conduit
- , cryptohash-conduit
- , cryptohash
+ , cryptonite-conduit
+ , cryptonite
+ , memory
, data-default
, mime-types
, hjsmin
1
0
Hello community,
here is the log from the commit of package ghc-yesod-job-queue for openSUSE:Factory checked in at 2017-08-31 21:02:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-job-queue (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-job-queue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-job-queue"
Thu Aug 31 21:02:10 2017 rev:2 rq:513548 version:0.3.0.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-job-queue/ghc-yesod-job-queue.changes 2017-05-09 18:08:07.278742014 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-job-queue.new/ghc-yesod-job-queue.changes 2017-08-31 21:02:13.326870442 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:15 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.3.0.4.
+
+-------------------------------------------------------------------
Old:
----
yesod-job-queue-0.3.0.2.tar.gz
New:
----
yesod-job-queue-0.3.0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-job-queue.spec ++++++
--- /var/tmp/diff_new_pack.CbpMW6/_old 2017-08-31 21:02:14.170751874 +0200
+++ /var/tmp/diff_new_pack.CbpMW6/_new 2017-08-31 21:02:14.186749627 +0200
@@ -18,7 +18,7 @@
%global pkg_name yesod-job-queue
Name: ghc-%{pkg_name}
-Version: 0.3.0.2
+Version: 0.3.0.4
Release: 0
Summary: Background jobs library for Yesod
License: BSD-3-Clause
++++++ yesod-job-queue-0.3.0.2.tar.gz -> yesod-job-queue-0.3.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-job-queue-0.3.0.2/Yesod/JobQueue/Types.hs new/yesod-job-queue-0.3.0.4/Yesod/JobQueue/Types.hs
--- old/yesod-job-queue-0.3.0.2/Yesod/JobQueue/Types.hs 2016-12-02 10:39:39.000000000 +0100
+++ new/yesod-job-queue-0.3.0.4/Yesod/JobQueue/Types.hs 2017-05-16 19:46:56.000000000 +0200
@@ -1,3 +1,4 @@
+{-# OPTIONS_HADDOCK prune #-}
{-# LANGUAGE TemplateHaskell #-}
module Yesod.JobQueue.Types where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-job-queue-0.3.0.2/Yesod/JobQueue.hs new/yesod-job-queue-0.3.0.4/Yesod/JobQueue.hs
--- old/yesod-job-queue-0.3.0.2/Yesod/JobQueue.hs 2016-12-02 10:39:39.000000000 +0100
+++ new/yesod-job-queue-0.3.0.4/Yesod/JobQueue.hs 2017-05-09 04:25:28.000000000 +0200
@@ -33,7 +33,7 @@
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Control (MonadBaseControl)
import Control.Monad.Trans.Reader (ReaderT, runReaderT)
-import Data.Aeson (ToJSON(toJSON), Value(String), (.=), object)
+import Data.Aeson (Value, (.=), object)
import Data.Aeson.TH (defaultOptions, deriveToJSON)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BSC
@@ -69,8 +69,7 @@
, jobId :: U.UUID
, startTime :: UTCTime
} deriving (Eq)
-instance ToJSON U.UUID where
- toJSON = String . T.pack . U.toString
+
$(deriveToJSON defaultOptions ''RunningJob)
-- | Manage the running jobs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-job-queue-0.3.0.2/yesod-job-queue.cabal new/yesod-job-queue-0.3.0.4/yesod-job-queue.cabal
--- old/yesod-job-queue-0.3.0.2/yesod-job-queue.cabal 2017-05-03 12:15:41.000000000 +0200
+++ new/yesod-job-queue-0.3.0.4/yesod-job-queue.cabal 2017-05-16 19:46:56.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-job-queue
-version: 0.3.0.2
+version: 0.3.0.4
synopsis: Background jobs library for Yesod.
description:
Background jobs library for Yesod
@@ -45,10 +45,10 @@
, TypeSynonymInstances
, ViewPatterns
build-depends: base >= 4.7 && < 5
- , aeson
- , api-field-json-th
+ , aeson >= 1.1
+ , api-field-json-th >= 0.1
, bytestring
- , cron
+ , cron >= 0.5.0 && < 0.6
, file-embed
, hedis
, lens
@@ -61,9 +61,9 @@
, uuid
, yesod >= 1.4 && < 1.5
, yesod-core
- , yesod-persistent
+ , yesod-persistent >= 1.4 && < 1.5
- ghc-options: -Wall -fwarn-tabs -O2
+ ghc-options: -Wall -fwarn-tabs
default-language: Haskell2010
executable yesod-job-queue-example
@@ -83,7 +83,7 @@
, GeneralizedNewtypeDeriving
, DeriveGeneric
-- other-modules:
- ghc-options: -Wall -fwarn-tabs -O2
+ ghc-options: -Wall -fwarn-tabs
build-depends: base >= 4.7 && < 5
, yesod
@@ -95,7 +95,7 @@
, classy-prelude-yesod
, hedis
- ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N
+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
test-suite yesod-job-queue-test
1
0
Hello community,
here is the log from the commit of package ghc-yesod-form for openSUSE:Factory checked in at 2017-08-31 21:02:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-form (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-form.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-form"
Thu Aug 31 21:02:08 2017 rev:8 rq:513547 version:1.4.13
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-form/ghc-yesod-form.changes 2017-06-04 01:59:37.105985606 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-form.new/ghc-yesod-form.changes 2017-08-31 21:02:08.683522842 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:38 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.4.13.
+
+-------------------------------------------------------------------
Old:
----
yesod-form-1.4.12.tar.gz
New:
----
yesod-form-1.4.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-form.spec ++++++
--- /var/tmp/diff_new_pack.Xt7C1F/_old 2017-08-31 21:02:09.587395846 +0200
+++ /var/tmp/diff_new_pack.Xt7C1F/_new 2017-08-31 21:02:09.587395846 +0200
@@ -19,7 +19,7 @@
%global pkg_name yesod-form
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.4.12
+Version: 1.4.13
Release: 0
Summary: Form handling support for Yesod Web Framework
License: MIT
++++++ yesod-form-1.4.12.tar.gz -> yesod-form-1.4.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.12/ChangeLog.md new/yesod-form-1.4.13/ChangeLog.md
--- old/yesod-form-1.4.12/ChangeLog.md 2017-05-13 23:23:44.000000000 +0200
+++ new/yesod-form-1.4.13/ChangeLog.md 2017-07-20 12:41:52.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.4.13
+
+* Fixed `textareaField` `writeHtmlEscapedChar` trim "\r"
+
## 1.4.12
* Password field does not remember its previous value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.12/Yesod/Form/Fields.hs new/yesod-form-1.4.13/Yesod/Form/Fields.hs
--- old/yesod-form-1.4.12/Yesod/Form/Fields.hs 2017-04-12 09:57:39.000000000 +0200
+++ new/yesod-form-1.4.13/Yesod/Form/Fields.hs 2017-07-20 12:41:52.000000000 +0200
@@ -106,6 +106,10 @@
import Yesod.Persist.Core
+#if !MIN_VERSION_base(4,8,0)
+import Data.Monoid
+#endif
+
defaultFormMessage :: FormMessage -> Text
defaultFormMessage = englishFormMessage
@@ -226,6 +230,7 @@
. unTextarea
where
-- Taken from blaze-builder and modified with newline handling.
+ writeHtmlEscapedChar '\r' = mempty
writeHtmlEscapedChar '\n' = writeByteString "<br>"
writeHtmlEscapedChar c = B.writeHtmlEscapedChar c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.12/yesod-form.cabal new/yesod-form-1.4.13/yesod-form.cabal
--- old/yesod-form-1.4.12/yesod-form.cabal 2017-05-13 23:23:29.000000000 +0200
+++ new/yesod-form-1.4.13/yesod-form.cabal 2017-07-20 12:41:52.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-form
-version: 1.4.12
+version: 1.4.13
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
1
0
Hello community,
here is the log from the commit of package ghc-yesod-core for openSUSE:Factory checked in at 2017-08-31 21:02:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-core (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-core"
Thu Aug 31 21:02:05 2017 rev:14 rq:513546 version:1.4.35.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-core/ghc-yesod-core.changes 2017-06-21 13:56:42.971394153 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-core.new/ghc-yesod-core.changes 2017-08-31 21:02:07.083747614 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:14 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.4.35.1.
+
+-------------------------------------------------------------------
Old:
----
yesod-core-1.4.35.tar.gz
yesod-core.cabal
New:
----
yesod-core-1.4.35.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-core.spec ++++++
--- /var/tmp/diff_new_pack.onLI8E/_old 2017-08-31 21:02:08.259582406 +0200
+++ /var/tmp/diff_new_pack.onLI8E/_new 2017-08-31 21:02:08.283579035 +0200
@@ -19,14 +19,13 @@
%global pkg_name yesod-core
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.4.35
+Version: 1.4.35.1
Release: 0
Summary: Creation of type-safe, RESTful web applications
License: MIT
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-auto-update-devel
@@ -105,7 +104,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ yesod-core-1.4.35.tar.gz -> yesod-core-1.4.35.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.35/ChangeLog.md new/yesod-core-1.4.35.1/ChangeLog.md
--- old/yesod-core-1.4.35/ChangeLog.md 2017-06-05 10:33:22.000000000 +0200
+++ new/yesod-core-1.4.35.1/ChangeLog.md 2017-07-20 12:58:03.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.4.35.1
+
+* TH fix for GHC 8.2
+
## 1.4.35
* Contexts can be included in generated TH instances. [1365](https://github.com/yesodweb/yesod/issues/1365)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.35/Yesod/Routes/TH/RenderRoute.hs new/yesod-core-1.4.35.1/Yesod/Routes/TH/RenderRoute.hs
--- old/yesod-core-1.4.35/Yesod/Routes/TH/RenderRoute.hs 2017-06-05 10:33:22.000000000 +0200
+++ new/yesod-core-1.4.35.1/Yesod/Routes/TH/RenderRoute.hs 2017-07-20 12:41:52.000000000 +0200
@@ -160,7 +160,7 @@
(cons, decs) <- mkRouteCons ress
#if MIN_VERSION_template_haskell(2,12,0)
did <- DataInstD [] ''Route [typ] Nothing cons <$> fmap (pure . DerivClause Nothing) (mapM conT (clazzes False))
- let sds = fmap (\t -> StandaloneDerivD cxt $ ConT t `AppT` ( ConT ''Route `AppT` typ)) (clazzes True)
+ let sds = fmap (\t -> StandaloneDerivD Nothing cxt $ ConT t `AppT` ( ConT ''Route `AppT` typ)) (clazzes True)
#elif MIN_VERSION_template_haskell(2,11,0)
did <- DataInstD [] ''Route [typ] Nothing cons <$> mapM conT (clazzes False)
let sds = fmap (\t -> StandaloneDerivD cxt $ ConT t `AppT` ( ConT ''Route `AppT` typ)) (clazzes True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.35/yesod-core.cabal new/yesod-core-1.4.35.1/yesod-core.cabal
--- old/yesod-core-1.4.35/yesod-core.cabal 2017-06-05 10:33:22.000000000 +0200
+++ new/yesod-core-1.4.35.1/yesod-core.cabal 2017-07-20 12:57:56.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-core
-version: 1.4.35
+version: 1.4.35.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
1
0
Hello community,
here is the log from the commit of package ghc-xml-conduit for openSUSE:Factory checked in at 2017-08-31 21:02:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-xml-conduit (Old)
and /work/SRC/openSUSE:Factory/.ghc-xml-conduit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-xml-conduit"
Thu Aug 31 21:02:01 2017 rev:12 rq:513545 version:1.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-xml-conduit/ghc-xml-conduit.changes 2017-03-03 17:52:46.271322152 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-xml-conduit.new/ghc-xml-conduit.changes 2017-08-31 21:02:04.524107249 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:43 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.5.1.
+
+-------------------------------------------------------------------
Old:
----
xml-conduit-1.4.0.4.tar.gz
New:
----
xml-conduit-1.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-xml-conduit.spec ++++++
--- /var/tmp/diff_new_pack.g1jony/_old 2017-08-31 21:02:05.611954404 +0200
+++ /var/tmp/diff_new_pack.g1jony/_new 2017-08-31 21:02:05.639950470 +0200
@@ -19,7 +19,7 @@
%global pkg_name xml-conduit
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.4.0.4
+Version: 1.5.1
Release: 0
Summary: Pure-Haskell utilities for dealing with XML with the conduit package
License: MIT
++++++ xml-conduit-1.4.0.4.tar.gz -> xml-conduit-1.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/ChangeLog.md new/xml-conduit-1.5.1/ChangeLog.md
--- old/xml-conduit-1.4.0.4/ChangeLog.md 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/ChangeLog.md 2017-05-21 00:05:14.000000000 +0200
@@ -1,3 +1,17 @@
+## 1.5.1
+
+* New render setting, `rsXMLDeclaration`; setting it to `False` omits the XML declaration.
+
+## 1.5.0
+
+* `tag` function no longer throws an exception when attributes don't match [#93](https://github.com/snoyberg/xml/pull/93)
+* Add `many_` combinator to avoid building results in memory [#94](https://github.com/snoyberg/xml/pull/94)
+* Turn some functions from `Consumer Event m a` to `ConduitM Event o m a` to allow yielding values
+* Replace `takeAllTreesContent` with `takeAnyTreeContent`, that only consumes one tree
+* Introduce `NameMatcher` type to refactor tag parsers
+* Add a couple of `take*` functions to stream events rather than parse them
+* Rename `ignore*` functions to comply with naming convention
+
## 1.4.0.3
* Compatibility with blaze-markup-0.8.0.0 [#95](https://github.com/snoyberg/xml/issues/95)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/Text/XML/Stream/Parse.hs new/xml-conduit-1.5.1/Text/XML/Stream/Parse.hs
--- old/xml-conduit-1.4.0.4/Text/XML/Stream/Parse.hs 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/Text/XML/Stream/Parse.hs 2017-05-21 00:05:14.000000000 +0200
@@ -1,11 +1,16 @@
-{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE PatternGuards #-}
-{-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE TypeFamilies #-}
-- | This module provides both a native Haskell solution for parsing XML
-- documents into a stream of events, and a set of parser combinators for
-- dealing with a stream of events.
@@ -29,10 +34,12 @@
-- > data Person = Person Int Text
-- > deriving Show
-- >
--- > parsePerson = tagName "person" (requireAttr "age") $ \age -> do
+-- > parsePerson :: MonadThrow m => Consumer Event m (Maybe Person)
+-- > parsePerson = tag' "person" (requireAttr "age") $ \age -> do
-- > name <- content
-- > return $ Person (read $ unpack age) name
-- >
+-- > parsePeople :: MonadThrow m => Sink Event m (Maybe [Person])
-- > parsePeople = tagNoAttr "people" $ many parsePerson
-- >
-- > main = do
@@ -42,7 +49,7 @@
--
-- will produce:
--
--- > [Person {age = 25, name = "Michael"},Person {age = 2, name = "Eliezer"}]
+-- > [Person 25 "Michael",Person 2 "Eliezer"]
--
-- This module also supports streaming results using 'yield'.
-- This allows parser results to be processed using conduits
@@ -53,21 +60,23 @@
-- See http://stackoverflow.com/q/21367423/2597135 for a related discussion.
--
-- > {-# LANGUAGE OverloadedStrings #-}
+-- > import Control.Monad (void)
+-- > import Control.Monad.Trans.Class (lift)
-- > import Control.Monad.Trans.Resource
-- > import Data.Conduit
+-- > import qualified Data.Conduit.List as CL
-- > import Data.Text (Text, unpack)
+-- > import Data.XML.Types (Event)
-- > import Text.XML.Stream.Parse
--- > import Text.XML (Name)
--- > import Control.Monad.Trans.Class (lift)
--- > import Control.Monad (void)
--- > import qualified Data.Conduit.List as CL
-- >
-- > data Person = Person Int Text deriving Show
-- >
--- > parsePerson = tagName "person" (requireAttr "age") $ \age -> do
+-- > parsePerson :: MonadThrow m => Consumer Event m (Maybe Person)
+-- > parsePerson = tag' "person" (requireAttr "age") $ \age -> do
-- > name <- content
-- > return $ Person (read $ unpack age) name
-- >
+-- > parsePeople :: MonadThrow m => Conduit Event m Person
-- > parsePeople = void $ tagNoAttr "people" $ manyYield parsePerson
-- >
-- > main = runResourceT $
@@ -98,23 +107,29 @@
, decodeHtmlEntities
-- * Event parsing
, tag
- , tagPredicate
- , tagName
+ , tag'
, tagNoAttr
, tagIgnoreAttrs
- , tagPredicateIgnoreAttrs
, content
, contentMaybe
-- * Ignoring tags/trees
, ignoreTag
- , ignoreTagName
- , ignoreAnyTagName
- , ignoreAllTags
+ , ignoreEmptyTag
, ignoreTree
- , ignoreTreeName
- , ignoreAnyTreeName
- , ignoreAllTrees
+ , ignoreTreeContent
+ , ignoreAnyTreeContent
, ignoreAllTreesContent
+ -- * Streaming events
+ , takeContent
+ , takeTree
+ , takeTreeContent
+ , takeAnyTreeContent
+ , takeAllTreesContent
+ -- * Tag name matching
+ , NameMatcher(..)
+ , matching
+ , anyOf
+ , anyName
-- * Attribute parsing
, AttrParser
, attr
@@ -127,70 +142,69 @@
, orE
, choose
, many
+ , many_
, manyIgnore
, many'
, force
-- * Streaming combinators
, manyYield
- , manyIgnoreYield
, manyYield'
- , takeAllTreesContent
+ , manyIgnoreYield
-- * Exceptions
, XmlException (..)
-- * Other types
, PositionRange
, EventPos
) where
-import qualified Control.Applicative as A
+import Blaze.ByteString.Builder (fromWord32be, toByteString)
import Control.Applicative ((<$>))
+import Control.Applicative (Alternative (empty, (<|>)),
+ Applicative (..), (<$>))
+import qualified Control.Applicative as A
+import Control.Arrow ((***))
+import Control.Exception (Exception (..), SomeException)
+import Control.Monad (ap, guard, liftM, void)
import Control.Monad.Fix (fix)
+import Control.Monad.Trans.Class (lift)
+import Control.Monad.Trans.Maybe (MaybeT (..))
import Control.Monad.Trans.Resource (MonadResource, MonadThrow (..),
monadThrow)
import Data.Attoparsec.Text (Parser, anyChar, char, manyTill,
skipWhile, string, takeWhile,
takeWhile1, try)
import qualified Data.Attoparsec.Text as AT
-import Data.Conduit.Attoparsec (PositionRange, conduitParser)
-import Data.List (intercalate)
-import Data.XML.Types (Content (..), Event (..),
- ExternalID (..),
- Instruction (..), Name (..))
-
-import Blaze.ByteString.Builder (fromWord32be, toByteString)
-import Control.Applicative (Alternative (empty, (<|>)),
- Applicative (..), (<$>))
-import Control.Arrow ((***))
-import Control.Exception (Exception (..), SomeException)
-import Control.Monad (ap, guard, liftM, void)
-import Control.Monad.Trans.Class (lift)
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.Char (isSpace)
import Data.Conduit
+import Data.Conduit.Attoparsec (PositionRange, conduitParser)
import Data.Conduit.Binary (sourceFile)
-import qualified Data.Conduit.Internal as CI
import qualified Data.Conduit.List as CL
import qualified Data.Conduit.Text as CT
import Data.Default (Default (..))
+import Data.List (intercalate)
import Data.List (foldl')
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, isNothing)
+import Data.String (IsString (..))
import Data.Text (Text, pack)
import qualified Data.Text as T
-import qualified Data.Text as TS
import Data.Text.Encoding (decodeUtf32BEWith,
decodeUtf8With)
import Data.Text.Encoding.Error (ignore, lenientDecode)
import Data.Text.Read (Reader, decimal, hexadecimal)
import Data.Typeable (Typeable)
import Data.Word (Word32)
+import Data.XML.Types (Content (..), Event (..),
+ ExternalID (..),
+ Instruction (..), Name (..))
import Prelude hiding (takeWhile)
import Text.XML.Stream.Token
type Ents = [(Text, Text)]
tokenToEvent :: ParseSettings -> Ents -> [NSLevel] -> Token -> (Ents, [NSLevel], [Event])
-tokenToEvent _ es n (TokenBeginDocument _) = (es, n, [])
+tokenToEvent _ es n (TokenXMLDeclaration _) = (es, n, [])
tokenToEvent _ es n (TokenInstruction i) = (es, n, [EventInstruction i])
tokenToEvent ps es n (TokenBeginElement name as isClosed _) =
(es, n', if isClosed then [begin, end] else [begin])
@@ -259,7 +273,7 @@
-- first checks for BOMs, removing them as necessary, and then check for the
-- equivalent of <?xml for each of UTF-8, UTF-16LE/BE, and UTF-32LE/BE. It
-- defaults to assuming UTF-8.
-detectUtf :: MonadThrow m => Conduit S.ByteString m TS.Text
+detectUtf :: MonadThrow m => Conduit S.ByteString m T.Text
detectUtf =
conduit id
where
@@ -295,7 +309,7 @@
checkXMLDecl :: MonadThrow m
=> S.ByteString
-> Maybe CT.Codec
- -> Conduit S.ByteString m TS.Text
+ -> Conduit S.ByteString m T.Text
checkXMLDecl bs (Just codec) = leftover bs >> CT.decode codec
checkXMLDecl bs0 Nothing =
loop [] (AT.parse (parseToken decodeXmlEntities)) bs0
@@ -304,7 +318,7 @@
case parser $ decodeUtf8With lenientDecode nextChunk of
AT.Fail{} -> fallback
AT.Partial f -> await >>= maybe fallback (loop chunks f)
- AT.Done _ (TokenBeginDocument attrs) -> findEncoding attrs
+ AT.Done _ (TokenXMLDeclaration attrs) -> findEncoding attrs
AT.Done{} -> fallback
where
chunks = nextChunk : chunks0
@@ -313,7 +327,7 @@
findEncoding [] = fallback
findEncoding ((TName _ "encoding", [ContentText enc]):_) =
- case TS.toLower enc of
+ case T.toLower enc of
"iso-8859-1" -> complete CT.iso8859_1
"utf-8" -> complete CT.utf8
_ -> complete CT.utf8
@@ -339,7 +353,7 @@
-> Conduit S.ByteString m EventPos
parseBytesPos ps = detectUtf =$= parseTextPos ps
-dropBOM :: Monad m => Conduit TS.Text m TS.Text
+dropBOM :: Monad m => Conduit T.Text m T.Text
dropBOM =
await >>= maybe (return ()) push
where
@@ -362,13 +376,13 @@
-- Since 1.2.4
parseText' :: MonadThrow m
=> ParseSettings
- -> Conduit TS.Text m Event
+ -> Conduit T.Text m Event
parseText' = mapOutput snd . parseTextPos
{-# DEPRECATED parseText "Please use 'parseText'' or 'parseTextPos'." #-}
parseText :: MonadThrow m
=> ParseSettings
- -> Conduit TS.Text m EventPos
+ -> Conduit T.Text m EventPos
parseText = parseTextPos
-- | Same as 'parseText'', but includes the position of each event.
@@ -376,7 +390,7 @@
-- Since 1.2.4
parseTextPos :: MonadThrow m
=> ParseSettings
- -> Conduit TS.Text m EventPos
+ -> Conduit T.Text m EventPos
parseTextPos de =
dropBOM
=$= tokenize
@@ -420,7 +434,7 @@
, psRetainNamespaces = False
}
-conduitToken :: MonadThrow m => ParseSettings -> Conduit TS.Text m (PositionRange, Token)
+conduitToken :: MonadThrow m => ParseSettings -> Conduit T.Text m (PositionRange, Token)
conduitToken = conduitParser . parseToken . psDecodeEntities
parseToken :: DecodeEntities -> Parser Token
@@ -440,7 +454,7 @@
char' '?'
char' '>'
newline <|> return ()
- return $ TokenBeginDocument as
+ return $ TokenXMLDeclaration as
else do
skipSpace
x <- T.pack <$> manyTill anyChar (try $ string "?>")
@@ -559,22 +573,18 @@
-> Bool -- break on double quote
-> Bool -- break on single quote
-> Parser Content
-parseContent de breakDouble breakSingle =
- parseEntity <|> parseText'
- where
- parseEntity = do
- char' '&'
- t <- takeWhile1 (/= ';')
- char' ';'
- return $ de t
- parseText' = do
- bs <- takeWhile1 valid
- return $ ContentText bs
- valid '"' = not breakDouble
- valid '\'' = not breakSingle
- valid '&' = False -- amp
- valid '<' = False -- lt
- valid _ = True
+parseContent de breakDouble breakSingle = parseEntity <|> parseTextContent where
+ parseEntity = do
+ char' '&'
+ t <- takeWhile1 (/= ';')
+ char' ';'
+ return $ de t
+ parseTextContent = ContentText <$> takeWhile1 valid
+ valid '"' = not breakDouble
+ valid '\'' = not breakSingle
+ valid '&' = False -- amp
+ valid '<' = False -- lt
+ valid _ = True
skipSpace :: Parser ()
skipSpace = skipWhile isXMLSpace
@@ -598,8 +608,7 @@
char' :: Char -> Parser ()
char' = void . char
-data ContentType =
- Ignore | IsContent Text | IsError String | NotContent
+data ContentType = Ignore | IsContent Text | IsError String | NotContent
-- | Grabs the next piece of content if available. This function skips over any
-- comments and instructions and concatenates all content until the next start
@@ -639,64 +648,66 @@
content :: MonadThrow m => Consumer Event m Text
content = fromMaybe T.empty <$> contentMaybe
--- | The most generic way to parse a tag. It takes a predicate for checking if
--- this is the correct tag name, an 'AttrParser' for handling attributes, and
--- then a parser for dealing with content.
+
+isWhitespace :: Event -> Bool
+isWhitespace EventBeginDocument = True
+isWhitespace EventEndDocument = True
+isWhitespace EventBeginDoctype{} = True
+isWhitespace EventEndDoctype = True
+isWhitespace EventInstruction{} = True
+isWhitespace (EventContent (ContentText t)) = T.all isSpace t
+isWhitespace EventComment{} = True
+isWhitespace (EventCDATA t) = T.all isSpace t
+isWhitespace _ = False
+
+
+-- | The most generic way to parse a tag. It takes a 'NameMatcher' to check whether
+-- this is a correct tag name, an 'AttrParser' to handle attributes, and
+-- then a parser to deal with content.
--
--- 'Events' are consumed if and only if the predicate holds.
+-- 'Events' are consumed if and only if the tag name and its attributes match.
--
-- This function automatically absorbs its balancing closing tag, and will
-- throw an exception if not all of the attributes or child elements are
-- consumed. If you want to allow extra attributes, see 'ignoreAttrs'.
--
-- This function automatically ignores comments, instructions and whitespace.
-{-# DEPRECATED tag "The signature of this function will change in next release." #-}
tag :: MonadThrow m
- => (Name -> Maybe a) -- ^ Check if this is a correct tag name
- -- and return a value that can be used to get an @AttrParser@.
- -- If this returns @Nothing@, the function will also return @Nothing@
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -- and return a value that can be used to get an @AttrParser@.
+ -- If this fails, the function will return @Nothing@
-> (a -> AttrParser b) -- ^ Given the value returned by the name checker, this function will
-- be used to get an @AttrParser@ appropriate for the specific tag.
- -> (b -> CI.ConduitM Event o m c) -- ^ Handler function to handle the attributes and children
- -- of a tag, given the value return from the @AttrParser@
- -> CI.ConduitM Event o m (Maybe c)
-tag checkName attrParser f = do
- (x, leftovers) <- dropWS []
- res <- case x of
- Just (EventBeginElement name as) ->
- case checkName name of
- Just y ->
- case runAttrParser' (attrParser y) as of
- Left e -> lift $ monadThrow e
- Right z -> do
- z' <- f z
- (a, _leftovers') <- dropWS []
- case a of
- Just (EventEndElement name')
- | name == name' -> return (Just z')
- _ -> lift $ monadThrow $ InvalidEndElement name a
- Nothing -> return Nothing
- _ -> return Nothing
-
- case res of
- -- Did not parse, put back all of the leading whitespace events and the
- -- final observed event generated by dropWS
- Nothing -> mapM_ leftover leftovers
- -- Parse succeeded, discard all of those whitespace events and the
- -- first parsed event
- Just _ -> return ()
+ -- If the @AttrParser@ fails, the function will also return @Nothing@
+ -> (b -> ConduitM Event o m c) -- ^ Handler function to handle the attributes and children
+ -- of a tag, given the value return from the @AttrParser@
+ -> ConduitM Event o m (Maybe c)
+tag nameMatcher attrParser f = do
+ (x, leftovers) <- dropWS []
+ res <- case x of
+ Just (EventBeginElement name as) -> case runNameMatcher nameMatcher name of
+ Just y -> case runAttrParser' (attrParser y) as of
+ Left _ -> return Nothing
+ Right z -> do
+ z' <- f z
+ (a, _leftovers') <- dropWS []
+ case a of
+ Just (EventEndElement name')
+ | name == name' -> return (Just z')
+ _ -> lift $ monadThrow $ InvalidEndElement name a
+ Nothing -> return Nothing
+ _ -> return Nothing
+
+ case res of
+ -- Did not parse, put back all of the leading whitespace events and the
+ -- final observed event generated by dropWS
+ Nothing -> mapM_ leftover leftovers
+ -- Parse succeeded, discard all of those whitespace events and the
+ -- first parsed event
+ Just _ -> return ()
- return res
+ return res
where
- isWhitespace EventBeginDocument = True
- isWhitespace EventEndDocument = True
- isWhitespace EventBeginDoctype{} = True
- isWhitespace EventEndDoctype = True
- isWhitespace EventInstruction{} = True
- isWhitespace (EventContent (ContentText t)) = T.all isSpace t
- isWhitespace EventComment{} = True
- isWhitespace _ = False
-
-- Drop Events until we encounter a non-whitespace element. Return all of
-- the events consumed here (including the first non-whitespace event) so
-- that the calling function can treat them as leftovers if the parse fails
@@ -713,125 +724,72 @@
Right ([], x) -> Right x
Right (attr, _) -> Left $ toException $ UnparsedAttributes attr
--- | A simplified version of 'tag' which matches against boolean predicates.
-{-# DEPRECATED tagPredicate "This function will be removed in next release." #-}
-tagPredicate :: MonadThrow m
- => (Name -> Bool) -- ^ Name predicate that returns @True@ if the name matches the parser
- -> AttrParser a -- ^ The attribute parser to be used for tags matching the predicate
- -> (a -> CI.ConduitM Event o m b) -- ^ Handler function to handle the attributes and children
- -- of a tag, given the value return from the @AttrParser@
- -> CI.ConduitM Event o m (Maybe b)
-tagPredicate p attrParser = tag (guard . p) (const attrParser)
-
--- | A simplified version of 'tag' which matches for specific tag names instead
--- of taking a predicate function. This is often sufficient, and when combined
--- with OverloadedStrings and the IsString instance of 'Name', can prove to be
--- very concise.
--- .
--- Note that @Name@ is namespace sensitive. When using the @IsString@ instance of name,
--- use
--- > "{http://a/b}c" :: Name
--- to match the tag @c@ in the XML namespace @http://a/b@
-{-# DEPRECATED tagName "This function will be removed in next release." #-}
-tagName :: MonadThrow m
- => Name -- ^ The tag name this parser matches to (includes namespaces)
- -> AttrParser a -- ^ The attribute parser to be used for tags matching the predicate
- -> (a -> CI.ConduitM Event o m b) -- ^ Handler function to handle the attributes and children
- -- of a tag, given the value return from the @AttrParser@
- -> CI.ConduitM Event o m (Maybe b)
-tagName name = tagPredicate (== name)
+-- | A simplified version of 'tag' where the 'NameMatcher' result isn't forwarded to the attributes parser.
+--
+-- Since 1.5.0
+tag' :: MonadThrow m
+ => NameMatcher a -> AttrParser b -> (b -> ConduitM Event o m c)
+ -> ConduitM Event o m (Maybe c)
+tag' a b = tag a (const b)
-- | A further simplified tag parser, which requires that no attributes exist.
-{-# DEPRECATED tagNoAttr "The signature of this function will change in next release." #-}
tagNoAttr :: MonadThrow m
- => Name -- ^ The name this parser matches to
- -> CI.ConduitM Event o m a -- ^ Handler function to handle the children of the matched tag
- -> CI.ConduitM Event o m (Maybe a)
-tagNoAttr name f = tagName name (return ()) $ const f
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -> ConduitM Event o m b -- ^ Handler function to handle the children of the matched tag
+ -> ConduitM Event o m (Maybe b)
+tagNoAttr name f = tag' name (return ()) $ const f
-- | A further simplified tag parser, which ignores all attributes, if any exist
-{-# DEPRECATED tagIgnoreAttrs "The signature of this function will change in next release." #-}
tagIgnoreAttrs :: MonadThrow m
- => Name -- ^ The name this parser matches to
- -> CI.ConduitM Event o m a -- ^ Handler function to handle the children of the matched tag
- -> CI.ConduitM Event o m (Maybe a)
-tagIgnoreAttrs name f = tagName name ignoreAttrs $ const f
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -> ConduitM Event o m b -- ^ Handler function to handle the children of the matched tag
+ -> ConduitM Event o m (Maybe b)
+tagIgnoreAttrs name f = tag' name ignoreAttrs $ const f
--- | A further simplified tag parser, which ignores all attributes, if any exist
-{-# DEPRECATED tagPredicateIgnoreAttrs "This function will be removed in next release." #-}
-tagPredicateIgnoreAttrs :: MonadThrow m
- => (Name -> Bool) -- ^ The name predicate this parser matches to
- -> CI.ConduitM Event o m a -- ^ Handler function to handle the children of the matched tag
- -> CI.ConduitM Event o m (Maybe a)
-tagPredicateIgnoreAttrs namePred f = tagPredicate namePred ignoreAttrs $ const f
--- | Ignore an empty tag and all of its attributes by predicate.
+-- | Ignore an empty tag and all of its attributes.
-- This does not ignore the tag recursively
-- (i.e. it assumes there are no child elements).
--- This functions returns 'Just' if the tag matched.
-{-# DEPRECATED ignoreTag "The signature of this function will change in next release." #-}
+-- This function returns @Just ()@ if the tag matched.
+--
+-- Since 1.5.0
+ignoreEmptyTag :: MonadThrow m
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -> ConduitM Event o m (Maybe ())
+ignoreEmptyTag nameMatcher = tagIgnoreAttrs nameMatcher (return ())
+
+
+{-# DEPRECATED ignoreTag "Please use 'ignoreEmptyTag'." #-}
ignoreTag :: MonadThrow m
- => (Name -> Bool) -- ^ The predicate name to match to
+ => NameMatcher a -- ^ Check if this is a correct tag name
-> ConduitM Event o m (Maybe ())
-ignoreTag namePred = tagPredicateIgnoreAttrs namePred (return ())
+ignoreTag = ignoreEmptyTag
--- | Like 'ignoreTag', but matches an exact name
-{-# DEPRECATED ignoreTagName "This function will be removed in next release." #-}
-ignoreTagName :: MonadThrow m
- => Name -- ^ The name to match to
- -> ConduitM Event o m (Maybe ())
-ignoreTagName name = ignoreTag (== name)
-
--- | Like 'ignoreTagName', but matches any name from a list of names.
-{-# DEPRECATED ignoreAnyTagName "This function will be removed in next release." #-}
-ignoreAnyTagName :: MonadThrow m
- => [Name] -- ^ The name to match to
- -> ConduitM Event o m (Maybe ())
-ignoreAnyTagName names = ignoreTag (`elem` names)
-
--- | Like 'ignoreTag', but matches all tag name.
---
--- > ignoreAllTags = ignoreTag (const True)
-{-# DEPRECATED ignoreAllTags "This function will be removed in next release." #-}
-ignoreAllTags :: MonadThrow m => ConduitM Event o m (Maybe ())
-ignoreAllTags = ignoreTag $ const True
--- | Ignore an empty tag, its attributes and its children subtree recursively.
+-- | Ignore a tag, its attributes and its children subtrees recursively.
-- Both content and text events are ignored.
--- This functions returns 'Just' if the tag matched.
-{-# DEPRECATED ignoreTree "The signature of this function will change in next release." #-}
-ignoreTree :: MonadThrow m
- => (Name -> Bool) -- ^ The predicate name to match to
- -> ConduitM Event o m (Maybe ())
-ignoreTree namePred =
- tagPredicateIgnoreAttrs namePred (void $ many ignoreAllTreesContent)
+-- This function returns @Just ()@ if the tag matched.
+--
+-- Since 1.5.0
+ignoreTreeContent :: MonadThrow m
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -> ConduitM Event o m (Maybe ())
+ignoreTreeContent namePred = tagIgnoreAttrs namePred (void $ many ignoreAnyTreeContent)
--- | Like 'ignoreTagName', but also ignores non-empty tabs
-{-# DEPRECATED ignoreTreeName "This function will be removed in next release." #-}
-ignoreTreeName :: MonadThrow m
- => Name
- -> ConduitM Event o m (Maybe ())
-ignoreTreeName name = ignoreTree (== name)
-
--- | Like 'ignoreTagName', but matches any name from a list of names.
-{-# DEPRECATED ignoreAnyTreeName "This function will be removed in next release." #-}
-ignoreAnyTreeName :: MonadThrow m
- => [Name] -- ^ The name to match to
- -> ConduitM Event o m (Maybe ())
-ignoreAnyTreeName names = ignoreTree (`elem` names)
-
--- | Like 'ignoreAllTags', but ignores entire subtrees.
---
--- > ignoreAllTrees = ignoreTree (const True)
-{-# DEPRECATED ignoreAllTrees "This function will be removed in next release." #-}
-ignoreAllTrees :: MonadThrow m => ConduitM Event o m (Maybe ())
-ignoreAllTrees = ignoreTree $ const True
+{-# DEPRECATED ignoreTree "Please use 'ignoreTreeContent'." #-}
+ignoreTree :: MonadThrow m
+ => NameMatcher a -- ^ Check if this is a correct tag name
+ -> ConduitM Event o m (Maybe ())
+ignoreTree = ignoreTreeContent
+
+-- | Like 'ignoreTreeContent', but matches any name and also ignores content events.
+ignoreAnyTreeContent :: MonadThrow m => ConduitM Event o m (Maybe ())
+ignoreAnyTreeContent = (void <$> contentMaybe) `orE` ignoreTreeContent anyName
--- | Like 'ignoreAllTrees', but also ignores all content events
-{-# DEPRECATED ignoreAllTreesContent "This function will be renamed into @ignoreAnyTreeContent@ in next release." #-}
+{-# DEPRECATED ignoreAllTreesContent "Please use 'ignoreAnyTreeContent'." #-}
ignoreAllTreesContent :: MonadThrow m => ConduitM Event o m (Maybe ())
-ignoreAllTreesContent = (void <$> contentMaybe) `orE` ignoreAllTrees
+ignoreAllTreesContent = ignoreAnyTreeContent
-- | Get the value of the first parser which returns 'Just'. If no parsers
-- succeed (i.e., return @Just@), this function returns 'Nothing'.
@@ -891,7 +849,7 @@
#if MIN_VERSION_base(4, 8, 0)
displayException (XmlException msg (Just event)) = "Error while parsing XML event " ++ show event ++ ": " ++ msg
displayException (XmlException msg _) = "Error while parsing XML: " ++ msg
- displayException (InvalidEndElement name (Just event)) = "Error while parsing XML event: expected </" ++ TS.unpack (nameLocalName name) ++ ">, got " ++ show event
+ displayException (InvalidEndElement name (Just event)) = "Error while parsing XML event: expected </" ++ T.unpack (nameLocalName name) ++ ">, got " ++ show event
displayException (InvalidEndElement name _) = "Error while parsing XML event: expected </" ++ show name ++ ">, got nothing"
displayException (InvalidEntity msg (Just event)) = "Error while parsing XML entity " ++ show event ++ ": " ++ msg
displayException (InvalidEntity msg _) = "Error while parsing XML entity: " ++ msg
@@ -899,6 +857,48 @@
displayException (UnparsedAttributes attrs) = show (length attrs) ++ " remaining unparsed attributes: \n" ++ intercalate "\n" (show <$> attrs)
#endif
+
+-- | A @NameMatcher@ describes which names a tag parser is allowed to match.
+--
+-- Since 1.5.0
+newtype NameMatcher a = NameMatcher { runNameMatcher :: Name -> Maybe a }
+
+deriving instance Functor NameMatcher
+
+instance Applicative NameMatcher where
+ pure a = NameMatcher $ const $ pure a
+ NameMatcher f <*> NameMatcher a = NameMatcher $ \name -> f name <*> a name
+
+-- | 'NameMatcher's can be combined with @\<|\>@
+instance Alternative NameMatcher where
+ empty = NameMatcher $ const Nothing
+ NameMatcher f <|> NameMatcher g = NameMatcher (\a -> f a <|> g a)
+
+-- | Match a single 'Name' in a concise way.
+-- Note that 'Name' is namespace sensitive: when using the 'IsString' instance,
+-- use @"{http:\/\/a\/b}c"@ to match the tag @c@ in the XML namespace @http://a/b@
+instance (a ~ Name) => IsString (NameMatcher a) where
+ fromString s = matching (== fromString s)
+
+-- | @matching f@ matches @name@ iff @f name@ is true. Returns the matched 'Name'.
+--
+-- Since 1.5.0
+matching :: (Name -> Bool) -> NameMatcher Name
+matching f = NameMatcher $ \name -> if f name then Just name else Nothing
+
+-- | Matches any 'Name'. Returns the matched 'Name'.
+--
+-- Since 1.5.0
+anyName :: NameMatcher Name
+anyName = matching (const True)
+
+-- | Matches any 'Name' from the given list. Returns the matched 'Name'.
+--
+-- Since 1.5.0
+anyOf :: [Name] -> NameMatcher Name
+anyOf values = matching (`elem` values)
+
+
-- | A monad for parsing attributes. By default, it requires you to deal with
-- all attributes present on an element, and will throw an exception if there
-- are unhandled attributes. Use the 'requireAttr', 'attr' et al
@@ -967,32 +967,37 @@
-- | Keep parsing elements as long as the parser returns 'Just'.
many :: Monad m
- => Consumer Event m (Maybe a)
- -> Consumer Event m [a]
+ => ConduitM Event o m (Maybe a)
+ -> ConduitM Event o m [a]
many i = manyIgnore i $ return Nothing
+-- | Like 'many' but discards the results without building an intermediate list.
+--
+-- Since 1.5.0
+many_ :: MonadThrow m
+ => ConduitM Event o m (Maybe a)
+ -> ConduitM Event o m ()
+many_ consumer = manyIgnoreYield (return Nothing) (void <$> consumer)
+
-- | Keep parsing elements as long as the parser returns 'Just'
-- or the ignore parser returns 'Just'.
manyIgnore :: Monad m
- => Consumer Event m (Maybe a)
- -> Consumer Event m (Maybe ())
- -> Consumer Event m [a]
-manyIgnore i ignored =
- go id
- where
- go front = i >>=
- maybe (onFail front) (\y -> go $ front . (:) y)
- -- onFail is called if the main parser fails
- onFail front =
- ignored >>= maybe (return $ front []) (const $ go front)
+ => ConduitM Event o m (Maybe a)
+ -> ConduitM Event o m (Maybe b)
+ -> ConduitM Event o m [a]
+manyIgnore i ignored = go id where
+ go front = i >>= maybe (onFail front) (\y -> go $ front . (:) y)
+ -- onFail is called if the main parser fails
+ onFail front = ignored >>= maybe (return $ front []) (const $ go front)
-- | Like @many@, but any tags and content the consumer doesn't match on
-- are silently ignored.
many' :: MonadThrow m
- => Consumer Event m (Maybe a)
- -> Consumer Event m [a]
+ => ConduitM Event o m (Maybe a)
+ -> ConduitM Event o m [a]
many' consumer = manyIgnore consumer ignoreAllTreesContent
+
-- | Like 'many', but uses 'yield' so the result list can be streamed
-- to downstream conduits without waiting for 'manyYield' to finish
manyYield :: Monad m
@@ -1001,70 +1006,98 @@
manyYield consumer = fix $ \loop ->
consumer >>= maybe (return ()) (\x -> yield x >> loop)
--- | Like @manyIgnore@, but uses 'yield' so the result list can be streamed
--- to downstream conduits without waiting for 'manyYield' to finish
+-- | Like 'manyIgnore', but uses 'yield' so the result list can be streamed
+-- to downstream conduits without waiting for 'manyIgnoreYield' to finish
manyIgnoreYield :: MonadThrow m
=> ConduitM Event b m (Maybe b) -- ^ Consuming parser that generates the result stream
- -> Consumer Event m (Maybe ()) -- ^ Ignore parser that consumes elements to be ignored
+ -> ConduitM Event b m (Maybe ()) -- ^ Ignore parser that consumes elements to be ignored
-> Conduit Event m b
manyIgnoreYield consumer ignoreParser = fix $ \loop ->
consumer >>= maybe (onFail loop) (\x -> yield x >> loop)
where onFail loop = ignoreParser >>= maybe (return ()) (const loop)
--- | Like @many'@, but uses 'yield' so the result list can be streamed
--- to downstream conduits without waiting for 'manyYield' to finish
+-- | Like 'many'', but uses 'yield' so the result list can be streamed
+-- to downstream conduits without waiting for 'manyYield'' to finish
manyYield' :: MonadThrow m
=> ConduitM Event b m (Maybe b)
-> Conduit Event m b
manyYield' consumer = manyIgnoreYield consumer ignoreAllTreesContent
--- | Like 'ignoreAllTreesContent', but stream the corresponding 'Event's rather than ignoring them.
--- Incomplete elements (without a closing-tag) will trigger an 'XmlException'.
+-- | Stream a content 'Event'. If next event isn't a content, nothing is consumed.
--
--- >>> runResourceT $ parseLBS def "text<a></a>" $$ takeAllTreesContent =$= consume
--- Just [ EventContent (ContentText "text"), EventBeginElement "a" [], EventEndElement "a"]
+-- Returns @Just ()@ if a content 'Event' was consumed, @Nothing@ otherwise.
--
--- >>> runResourceT $ parseLBS def "</a><b></b>" $$ takeAllTreesContent =$= consume
--- Just [ ]
+-- Since 1.5.0
+takeContent :: MonadThrow m => ConduitM Event Event m (Maybe ())
+takeContent = do
+ event <- await
+ case event of
+ Just e@(EventContent ContentText{}) -> yield e >> return (Just ())
+ Just e@EventCDATA{} -> yield e >> return (Just ())
+ Just e -> if isWhitespace e then yield e >> takeContent else leftover e >> return Nothing
+ _ -> return Nothing
+
+-- | Stream 'Event's corresponding to a single element that matches given 'NameMatcher' and 'AttrParser', from the opening- to the closing-tag.
--
--- >>> runResourceT $ parseLBS def "<b><c></c></b></a>text" $$ takeAllTreesContent =$= consume
--- Just [ EventBeginElement "b" [], EventBeginElement "c" [], EventEndElement "c", EventEndElement "b" ]
+-- If next 'Event' isn't an element, nothing is consumed.
+--
+-- If an opening-tag is consumed but no matching closing-tag is found, an 'XmlException' is thrown.
+--
+-- This function automatically ignores comments, instructions and whitespace.
--
--- Since 1.4.0
-{-# DEPRECATED takeAllTreesContent "This function will be removed in next release." #-}
-takeAllTreesContent :: MonadThrow m => Conduit Event m Event
-takeAllTreesContent = do
+-- Returns @Just ()@ if an element was consumed, 'Nothing' otherwise.
+--
+-- Since 1.5.0
+takeTree :: MonadThrow m => NameMatcher a -> AttrParser b -> ConduitM Event Event m (Maybe ())
+takeTree nameMatcher attrParser = do
event <- await
case event of
- Just e@EventBeginDoctype{} -> do
- yield e
- takeAllTreesContent
- endEvent <- await
- case endEvent of
- Just e@EventEndDoctype -> yield e >> takeAllTreesContent
- _ -> lift $ monadThrow $ XmlException "Expected end of doctype" endEvent
- Just e@EventBeginDocument -> do
- yield e
- takeAllTreesContent
- endEvent <- await
- case endEvent of
- Just e@EventEndDocument -> yield e >> takeAllTreesContent
- _ -> lift $ monadThrow $ XmlException "Expected end of document" endEvent
- Just e@(EventBeginElement name _) -> do
- yield e
- takeAllTreesContent
- endEvent <- await
- case endEvent of
- Just e@(EventEndElement name') | name == name' -> yield e >> takeAllTreesContent
- _ -> lift $ monadThrow $ InvalidEndElement name endEvent
- Just e@EventComment{} -> yield e >> takeAllTreesContent
- Just e@EventContent{} -> yield e >> takeAllTreesContent
- Just e@EventInstruction{} -> yield e >> takeAllTreesContent
- Just e@EventCDATA{} -> yield e >> takeAllTreesContent
- Just e -> leftover e
- _ -> return ()
+ Just e@(EventBeginElement name as) -> case runNameMatcher nameMatcher name of
+ Just _ -> case runAttrParser attrParser as of
+ Right _ -> do
+ yield e
+ whileJust takeAnyTreeContent
+ endEvent <- await
+ case endEvent of
+ Just e'@(EventEndElement name') | name == name' -> yield e' >> return (Just ())
+ _ -> lift $ monadThrow $ InvalidEndElement name endEvent
+ _ -> leftover e >> return Nothing
+ _ -> leftover e >> return Nothing
+
+ Just e -> if isWhitespace e then yield e >> takeTree nameMatcher attrParser else leftover e >> return Nothing
+ _ -> return Nothing
+ where
+ whileJust f = fix $ \loop -> f >>= maybe (return ()) (const loop)
+-- | Like 'takeTree', but can also stream a content 'Event'.
+--
+-- Since 1.5.0
+takeTreeContent :: MonadThrow m
+ => NameMatcher a
+ -> AttrParser b
+ -> ConduitM Event Event m (Maybe ())
+takeTreeContent nameMatcher attrParser = runMaybeT $ MaybeT (takeTree nameMatcher attrParser) <|> MaybeT takeContent
+
+-- | Like 'takeTreeContent', without checking for tag name or attributes.
+--
+-- >>> runResourceT $ parseLBS def "text<a></a>" $$ takeAnyTreeContent =$= consume
+-- Just [ EventContent (ContentText "text") ]
+--
+-- >>> runResourceT $ parseLBS def "</a><b></b>" $$ takeAnyTreeContent =$= consume
+-- Just [ ]
+--
+-- >>> runResourceT $ parseLBS def "<b><c></c></b></a>text" $$ takeAnyTreeContent =$= consume
+-- Just [ EventBeginElement "b" [], EventBeginElement "c" [], EventEndElement "c", EventEndElement "b" ]
+--
+-- Since 1.5.0
+takeAnyTreeContent :: MonadThrow m
+ => ConduitM Event Event m (Maybe ())
+takeAnyTreeContent = takeTreeContent anyName ignoreAttrs
+
+{-# DEPRECATED takeAllTreesContent "Please use 'takeAnyTreeContent'." #-}
+takeAllTreesContent :: MonadThrow m => ConduitM Event Event m (Maybe ())
+takeAllTreesContent = takeAnyTreeContent
type DecodeEntities = Text -> Content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/Text/XML/Stream/Render.hs new/xml-conduit-1.5.1/Text/XML/Stream/Render.hs
--- old/xml-conduit-1.4.0.4/Text/XML/Stream/Render.hs 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/Text/XML/Stream/Render.hs 2017-05-21 00:05:14.000000000 +0200
@@ -18,6 +18,7 @@
, rsNamespaces
, rsAttrOrder
, rsUseCDATA
+ , rsXMLDeclaration
, orderAttrs
-- * Event rendering
, tag
@@ -83,6 +84,12 @@
-- Default: @False@
--
-- @since 1.3.3
+ , rsXMLDeclaration :: Bool
+ -- ^ Determines whether the XML declaration will be output.
+ --
+ -- Default: @True@
+ --
+ -- @since 1.5.1
}
instance Default RenderSettings where
@@ -91,6 +98,7 @@
, rsNamespaces = []
, rsAttrOrder = const Map.toList
, rsUseCDATA = const False
+ , rsXMLDeclaration = True
}
-- | Convenience function to create an ordering function suitable for
@@ -139,7 +147,7 @@
renderEvent' = renderEvent yield' settings
renderEvent :: Monad m => (Flush Builder -> Producer m o) -> RenderSettings -> Conduit (Flush Event) m o
-renderEvent yield' RenderSettings { rsPretty = isPretty, rsNamespaces = namespaces0, rsUseCDATA = useCDATA } =
+renderEvent yield' RenderSettings { rsPretty = isPretty, rsNamespaces = namespaces0, rsUseCDATA = useCDATA, rsXMLDeclaration = useXMLDecl } =
loop []
where
loop nslevels = await >>= maybe (return ()) (go nslevels)
@@ -159,34 +167,35 @@
yield' $ Chunk token
loop nslevels'
_ -> do
- let (token, nslevels') = eventToToken nslevels useCDATA e
+ let (token, nslevels') = eventToToken nslevels useCDATA useXMLDecl e
yield' $ Chunk token
loop nslevels'
-eventToToken :: Stack -> (Content -> Bool) -> Event -> (Builder, [NSLevel])
-eventToToken s _ EventBeginDocument =
- (tokenToBuilder $ TokenBeginDocument
+eventToToken :: Stack -> (Content -> Bool) -> Bool -> Event -> (Builder, [NSLevel])
+eventToToken s _ True EventBeginDocument =
+ (tokenToBuilder $ TokenXMLDeclaration
[ ("version", [ContentText "1.0"])
, ("encoding", [ContentText "UTF-8"])
]
, s)
-eventToToken s _ EventEndDocument = (mempty, s)
-eventToToken s _ (EventInstruction i) = (tokenToBuilder $ TokenInstruction i, s)
-eventToToken s _ (EventBeginDoctype n meid) = (tokenToBuilder $ TokenDoctype n meid [], s)
-eventToToken s _ EventEndDoctype = (mempty, s)
-eventToToken s _ (EventCDATA t) = (tokenToBuilder $ TokenCDATA t, s)
-eventToToken s _ (EventEndElement name) =
+eventToToken s _ False EventBeginDocument = (mempty, s)
+eventToToken s _ _ EventEndDocument = (mempty, s)
+eventToToken s _ _ (EventInstruction i) = (tokenToBuilder $ TokenInstruction i, s)
+eventToToken s _ _ (EventBeginDoctype n meid) = (tokenToBuilder $ TokenDoctype n meid [], s)
+eventToToken s _ _ EventEndDoctype = (mempty, s)
+eventToToken s _ _ (EventCDATA t) = (tokenToBuilder $ TokenCDATA t, s)
+eventToToken s _ _ (EventEndElement name) =
(tokenToBuilder $ TokenEndElement $ nameToTName sl name, s')
where
(sl:s') = s
-eventToToken s useCDATA (EventContent c)
+eventToToken s useCDATA _ (EventContent c)
| useCDATA c =
case c of
ContentText txt -> (tokenToBuilder $ TokenCDATA txt, s)
ContentEntity txt -> (tokenToBuilder $ TokenCDATA txt, s)
| otherwise = (tokenToBuilder $ TokenContent c, s)
-eventToToken s _ (EventComment t) = (tokenToBuilder $ TokenComment t, s)
-eventToToken _ _ EventBeginElement{} = error "eventToToken on EventBeginElement" -- mkBeginToken False s name attrs
+eventToToken s _ _ (EventComment t) = (tokenToBuilder $ TokenComment t, s)
+eventToToken _ _ _ EventBeginElement{} = error "eventToToken on EventBeginElement" -- mkBeginToken False s name attrs
type Stack = [NSLevel]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/Text/XML/Stream/Token.hs new/xml-conduit-1.5.1/Text/XML/Stream/Token.hs
--- old/xml-conduit-1.4.0.4/Text/XML/Stream/Token.hs 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/Text/XML/Stream/Token.hs 2017-05-21 00:05:14.000000000 +0200
@@ -27,7 +27,7 @@
oneSpace :: Builder
oneSpace = copyByteString " "
-data Token = TokenBeginDocument [TAttribute]
+data Token = TokenXMLDeclaration [TAttribute]
| TokenInstruction Instruction
| TokenBeginElement TName [TAttribute] Bool Int -- ^ indent
| TokenEndElement TName
@@ -37,7 +37,7 @@
| TokenCDATA Text
deriving Show
tokenToBuilder :: Token -> Builder
-tokenToBuilder (TokenBeginDocument attrs) =
+tokenToBuilder (TokenXMLDeclaration attrs) =
fromByteString "<?xml"
`mappend` foldAttrs oneSpace attrs (fromByteString "?>")
tokenToBuilder (TokenInstruction (Instruction target data_)) = mconcat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/Text/XML.hs new/xml-conduit-1.5.1/Text/XML.hs
--- old/xml-conduit-1.4.0.4/Text/XML.hs 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/Text/XML.hs 2017-05-21 00:05:14.000000000 +0200
@@ -63,6 +63,7 @@
, R.rsNamespaces
, R.rsAttrOrder
, R.rsUseCDATA
+ , R.rsXMLDeclaration
, R.orderAttrs
-- * Conversion
, toXMLDocument
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/test/main.hs new/xml-conduit-1.5.1/test/main.hs
--- old/xml-conduit-1.4.0.4/test/main.hs 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/test/main.hs 2017-05-21 00:05:14.000000000 +0200
@@ -1,36 +1,37 @@
{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings #-}
import Control.Exception (Exception, toException)
import Control.Monad.IO.Class (liftIO)
+import qualified Data.ByteString.Char8 as S
+import qualified Data.ByteString.Lazy.Char8 as L
import Data.Typeable (Typeable)
import Data.XML.Types
-import Test.HUnit hiding (Test)
import Test.Hspec
-import qualified Data.ByteString.Char8 as S
-import qualified Data.ByteString.Lazy.Char8 as L
-import qualified Text.XML.Unresolved as D
-import qualified Text.XML.Stream.Parse as P
+import Test.HUnit hiding (Test)
import qualified Text.XML as Res
import qualified Text.XML.Cursor as Cu
import Text.XML.Stream.Parse (def)
+import qualified Text.XML.Stream.Parse as P
+import qualified Text.XML.Unresolved as D
+
+import Control.Applicative ((<$>))
+import Control.Monad
+import Control.Monad.Trans.Class (lift)
+import qualified Data.Set as Set
+import Data.Text (Text)
+import qualified Data.Text as T
+import Text.XML.Cursor (($.//), ($/), ($//), ($|),
+ (&.//), (&/), (&//))
-import Text.XML.Cursor ((&/), (&//), (&.//), ($|), ($/), ($//), ($.//))
-import Data.Text(Text)
-import Control.Monad
-import Control.Applicative ((<$>))
-import Control.Monad.Trans.Class (lift)
-import qualified Data.Text as T
-import qualified Data.Set as Set
-
-import Data.Conduit ((=$=))
-import qualified Data.Conduit as C
-import Control.Monad.Trans.Resource (runResourceT)
+import Control.Monad.Trans.Resource (runResourceT)
import qualified Control.Monad.Trans.Resource as C
-import qualified Data.Conduit.List as CL
-import qualified Data.Map as Map
-import Text.Blaze (toMarkup)
-import Text.Blaze.Renderer.String (renderMarkup)
+import Data.Conduit ((=$=))
+import qualified Data.Conduit as C
+import qualified Data.Conduit.List as CL
+import qualified Data.Map as Map
+import Text.Blaze (toMarkup)
+import Text.Blaze.Renderer.String (renderMarkup)
main :: IO ()
main = hspec $ do
@@ -41,13 +42,16 @@
it "has working many function" testMany
it "has working many' function" testMany'
it "has working manyYield function" testManyYield
- it "has working takeAllTreesContent function" testTakeAllTreesContent
+ it "has working takeContent function" testTakeContent
+ it "has working takeTree function" testTakeTree
+ it "has working takeAnyTreeContent function" testTakeAnyTreeContent
it "has working orE" testOrE
it "is idempotent to parse and pretty render a document" documentParsePrettyRender
it "ignores the BOM" parseIgnoreBOM
it "strips duplicated attributes" stripDuplicateAttributes
it "displays comments" testRenderComments
it "conduit parser" testConduitParser
+ it "can omit the XML declaration" omitXMLDeclaration
describe "XML Cursors" $ do
it "has correct parent" cursorParent
it "has correct ancestor" cursorAncestor
@@ -135,7 +139,7 @@
combinators :: Assertion
combinators = runResourceT $ P.parseLBS def input C.$$ do
- P.force "need hello" $ P.tagName "hello" (P.requireAttr "world") $ \world -> do
+ P.force "need hello" $ P.tag' "hello" (P.requireAttr "world") $ \world -> do
liftIO $ world @?= "true"
P.force "need child1" $ P.tagNoAttr "{mynamespace}child1" $ return ()
P.force "need child2" $ P.tagNoAttr "child2" $ return ()
@@ -382,8 +386,49 @@
, "</hello>"
]
-testTakeAllTreesContent :: Assertion
-testTakeAllTreesContent = do
+testTakeContent :: Assertion
+testTakeContent = do
+ result <- runResourceT $ P.parseLBS def input C.$$ rootParser
+ result @?= Just
+ [ EventContent (ContentText "Hello world !")
+ ]
+ where
+ rootParser = P.tagNoAttr "root" $ void (P.takeContent >> P.takeContent) =$= CL.consume
+ input = L.concat
+ [ "<?xml version='1.0'?>"
+ , "<!DOCTYPE foo []>\n"
+ , "<root>"
+ , "Hello world !"
+ , "</root>"
+ ]
+
+testTakeTree :: Assertion
+testTakeTree = do
+ result <- runResourceT $ P.parseLBS def input C.$$ rootParser
+ result @?=
+ [ EventBeginDocument
+ , EventBeginDoctype "foo" Nothing
+ , EventEndDoctype
+ , EventBeginElement "a" []
+ , EventBeginElement "em" []
+ , EventContent (ContentText "Hello world !")
+ , EventEndElement "em"
+ , EventEndElement "a"
+ ]
+ where
+ rootParser = void (P.takeTree "a" P.ignoreAttrs) =$= CL.consume
+ input = L.concat
+ [ "<?xml version='1.0'?>"
+ , "<!DOCTYPE foo []>\n"
+ , "<a>"
+ , "<em>Hello world !</em>"
+ , "</a>"
+ , "<b>"
+ , "</b>"
+ ]
+
+testTakeAnyTreeContent :: Assertion
+testTakeAnyTreeContent = do
result <- runResourceT $ P.parseLBS def input C.$$ rootParser
result @?= Just
[ EventBeginElement "b" []
@@ -393,10 +438,9 @@
, EventEndElement "em"
, EventContent (ContentText " !")
, EventEndElement "b"
- , EventContent (ContentText " Welcome !")
]
where
- rootParser = P.tagNoAttr "root" $ P.takeAllTreesContent =$= CL.consume
+ rootParser = P.tagNoAttr "root" $ (P.takeAnyTreeContent >> void P.ignoreAnyTreeContent) =$= CL.consume
input = L.concat
[ "<?xml version='1.0'?>"
, "<!DOCTYPE foo []>\n"
@@ -449,13 +493,17 @@
P.force "need hello" $ P.tagNoAttr "hello" $ do
x <- P.tagNoAttr "failure" (return 1) `P.orE`
P.tagNoAttr "success" (return 2)
+ y <- P.tag' "success" (P.requireAttr "failure") (const $ return 1) `P.orE`
+ P.tag' "success" (P.requireAttr "success") (const $ return 2)
liftIO $ x @?= Just (2 :: Int)
+ liftIO $ y @?= Just (2 :: Int)
where
input = L.concat
[ "<?xml version='1.0'?>"
, "<!DOCTYPE foo []>\n"
, "<hello>"
, "<success/>"
+ , "<success success=\"0\"/>"
, "</hello>"
]
@@ -480,6 +528,14 @@
ma <- P.tagNoAttr "item" (return 1)
maybe (return ()) (\a -> C.yield a >> f) ma
+omitXMLDeclaration :: Assertion
+omitXMLDeclaration = Res.renderLBS settings input @?= spec
+ where
+ settings = def { Res.rsXMLDeclaration = False }
+ input = Res.Document (Prologue [] Nothing [])
+ (Res.Element "foo" Map.empty [Res.NodeContent "bar"])
+ []
+ spec = "<foo>bar</foo>"
name :: [Cu.Cursor] -> [Text]
name [] = []
@@ -760,7 +816,7 @@
rs = def { Res.rsAttrOrder = \name m ->
case name of
"foo" -> reverse $ Map.toAscList m
- _ -> Map.toAscList m
+ _ -> Map.toAscList m
}
attrs = Map.fromList [("a", "a"), ("b", "b"), ("c", "c")]
doc = Res.Document (Res.Prologue [] Nothing [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xml-conduit-1.4.0.4/xml-conduit.cabal new/xml-conduit-1.5.1/xml-conduit.cabal
--- old/xml-conduit-1.4.0.4/xml-conduit.cabal 2017-02-13 20:32:23.000000000 +0100
+++ new/xml-conduit-1.5.1/xml-conduit.cabal 2017-05-21 00:05:14.000000000 +0200
@@ -1,5 +1,5 @@
name: xml-conduit
-version: 1.4.0.4
+version: 1.5.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>, Aristid Breitkreuz <aristidb(a)googlemail.com>
1
0
Hello community,
here is the log from the commit of package ghc-xlsx for openSUSE:Factory checked in at 2017-08-31 21:01:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-xlsx (Old)
and /work/SRC/openSUSE:Factory/.ghc-xlsx.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-xlsx"
Thu Aug 31 21:01:57 2017 rev:4 rq:513544 version:0.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-xlsx/ghc-xlsx.changes 2017-03-03 17:52:36.200744528 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-xlsx.new/ghc-xlsx.changes 2017-08-31 21:01:59.840765268 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:01 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.6.0.
+
+-------------------------------------------------------------------
Old:
----
xlsx-0.4.3.tar.gz
New:
----
xlsx-0.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-xlsx.spec ++++++
--- /var/tmp/diff_new_pack.dLjsyg/_old 2017-08-31 21:02:00.808629281 +0200
+++ /var/tmp/diff_new_pack.dLjsyg/_new 2017-08-31 21:02:00.808629281 +0200
@@ -19,7 +19,7 @@
%global pkg_name xlsx
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.4.3
+Version: 0.6.0
Release: 0
Summary: Simple and incomplete Excel file parser/writer
License: MIT
++++++ xlsx-0.4.3.tar.gz -> xlsx-0.6.0.tar.gz ++++++
++++ 5956 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-x509-validation for openSUSE:Factory checked in at 2017-08-31 21:01:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-x509-validation (Old)
and /work/SRC/openSUSE:Factory/.ghc-x509-validation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-x509-validation"
Thu Aug 31 21:01:54 2017 rev:8 rq:513543 version:1.6.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-x509-validation/ghc-x509-validation.changes 2016-11-05 21:27:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-x509-validation.new/ghc-x509-validation.changes 2017-08-31 21:01:55.537369905 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:04:39 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.6.8.
+
+-------------------------------------------------------------------
Old:
----
x509-validation-1.6.5.tar.gz
New:
----
x509-validation-1.6.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-x509-validation.spec ++++++
--- /var/tmp/diff_new_pack.UMiqgi/_old 2017-08-31 21:01:56.873182220 +0200
+++ /var/tmp/diff_new_pack.UMiqgi/_new 2017-08-31 21:01:56.897178848 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-x509-validation
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,9 @@
%global pkg_name x509-validation
+%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.6.5
+Version: 1.6.8
Release: 0
Summary: X.509 Certificate and CRL validation
License: BSD-3-Clause
@@ -41,6 +42,10 @@
BuildRequires: ghc-x509-devel
BuildRequires: ghc-x509-store-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{with tests}
+BuildRequires: ghc-tasty-devel
+BuildRequires: ghc-tasty-hunit-devel
+%endif
%description
X.509 Certificate and CRL validation.
@@ -66,6 +71,9 @@
%install
%ghc_lib_install
+%check
+%cabal_test
+
%post devel
%ghc_pkg_recache
++++++ x509-validation-1.6.5.tar.gz -> x509-validation-1.6.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-validation-1.6.5/Data/X509/Validation/Signature.hs new/x509-validation-1.6.8/Data/X509/Validation/Signature.hs
--- old/x509-validation-1.6.5/Data/X509/Validation/Signature.hs 2016-09-15 22:15:59.000000000 +0200
+++ new/x509-validation-1.6.8/Data/X509/Validation/Signature.hs 2017-06-26 18:12:09.000000000 +0200
@@ -15,12 +15,12 @@
) where
import qualified Crypto.PubKey.RSA.PKCS15 as RSA
+import qualified Crypto.PubKey.RSA.PSS as PSS
import qualified Crypto.PubKey.DSA as DSA
import qualified Crypto.PubKey.ECC.Types as ECC
import qualified Crypto.PubKey.ECC.Prim as ECC
import qualified Crypto.PubKey.ECC.ECDSA as ECDSA
import Crypto.Hash
-import Crypto.Number.Basic (numBits)
import Crypto.Number.Serialize (os2ip)
import Data.ByteString (ByteString)
@@ -70,6 +70,19 @@
-> ByteString -- ^ Signature to verify
-> SignatureVerification
verifySignature (SignatureALG_Unknown _) _ _ _ = SignatureFailed SignatureUnimplemented
+verifySignature (SignatureALG hashALG PubKeyALG_RSAPSS) pubkey cdata signature = case verifyF pubkey of
+ Nothing -> SignatureFailed SignatureUnimplemented
+ Just f -> if f cdata signature
+ then SignaturePass
+ else SignatureFailed SignatureInvalid
+ where
+ verifyF (PubKeyRSA key)
+ | hashALG == HashSHA256 = Just $ PSS.verify (PSS.defaultPSSParams SHA256) key
+ | hashALG == HashSHA384 = Just $ PSS.verify (PSS.defaultPSSParams SHA384) key
+ | hashALG == HashSHA512 = Just $ PSS.verify (PSS.defaultPSSParams SHA512) key
+ | hashALG == HashSHA224 = Just $ PSS.verify (PSS.defaultPSSParams SHA224) key
+ | otherwise = Nothing
+ verifyF _ = Nothing
verifySignature (SignatureALG hashALG pubkeyALG) pubkey cdata signature
| pubkeyToAlg pubkey == pubkeyALG = case verifyF pubkey of
Nothing -> SignatureFailed SignatureUnimplemented
@@ -80,9 +93,9 @@
where
verifyF (PubKeyRSA key) = Just $ rsaVerify hashALG key
verifyF (PubKeyDSA key)
- | hashALG == HashSHA1 = Just $ \a b -> case dsaToSignature a of
- Nothing -> False
- Just dsaSig -> DSA.verify SHA1 key dsaSig b
+ | hashALG == HashSHA1 = Just $ dsaVerify SHA1 key
+ | hashALG == HashSHA224 = Just $ dsaVerify SHA224 key
+ | hashALG == HashSHA256 = Just $ dsaVerify SHA256 key
| otherwise = Nothing
verifyF (PubKeyEC key) = verifyECDSA hashALG key
verifyF _ = Nothing
@@ -98,6 +111,11 @@
_ ->
Nothing
+ dsaVerify hsh key b a =
+ case dsaToSignature a of
+ Nothing -> False
+ Just dsaSig -> DSA.verify hsh key dsaSig b
+
rsaVerify HashMD2 = RSA.verify (Just MD2)
rsaVerify HashMD5 = RSA.verify (Just MD5)
rsaVerify HashSHA1 = RSA.verify (Just SHA1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-validation-1.6.5/Data/X509/Validation.hs new/x509-validation-1.6.8/Data/X509/Validation.hs
--- old/x509-validation-1.6.5/Data/X509/Validation.hs 2016-10-03 09:36:01.000000000 +0200
+++ new/x509-validation-1.6.8/Data/X509/Validation.hs 2017-06-26 18:12:09.000000000 +0200
@@ -45,7 +45,11 @@
import Data.Maybe
import Data.List
--- | Possible reason of certificate and chain failure
+-- | Possible reason of certificate and chain failure.
+--
+-- The values 'InvalidName' and 'InvalidWildcard' are internal-only and are
+-- never returned by the validation functions. 'NameMismatch' is returned
+-- instead.
data FailedReason =
UnknownCriticalExtension -- ^ certificate contains an unknown critical extension
| Expired -- ^ validity ends before checking time
@@ -118,10 +122,12 @@
-- BEWARE, it's easy to change behavior leading to compromised security.
data ValidationHooks = ValidationHooks
{
- -- | check the the issuer 'DistinguishedName' match the subject 'DistinguishedName'
- -- of a certificate.
+ -- | check whether a given issuer 'DistinguishedName' matches the subject
+ -- 'DistinguishedName' of a candidate issuer certificate.
hookMatchSubjectIssuer :: DistinguishedName -> Certificate -> Bool
- -- | validate that the parametrized time valide with the certificate in argument
+ -- | check whether the certificate in the second argument is valid at the
+ -- time provided in the first argument. Return an empty list for success
+ -- or else one or more failure reasons.
, hookValidateTime :: DateTime -> Certificate -> [FailedReason]
-- | validate the certificate leaf name with the DNS named used to connect
, hookValidateName :: HostName -> Certificate -> [FailedReason]
@@ -326,8 +332,13 @@
unAltName _ = Nothing
-- | Validate that the fqhn is matched by at least one name in the certificate.
--- The name can be either one of the alternative names if the SubjectAltName
--- extension is present or the common name.
+-- If the subjectAltname extension is present, then the certificate commonName
+-- is ignored, and only the DNS names, if any, in the subjectAltName are
+-- considered. Otherwise, the commonName from the subjectDN is used.
+--
+-- Note that DNS names in the subjectAltName are in IDNA A-label form. If the
+-- destination hostname is a UTF-8 name, it must be provided to the TLS context
+-- in (non-transitional) IDNA2008 A-label form.
validateCertificateName :: HostName -> Certificate -> [FailedReason]
validateCertificateName fqhn cert
| not $ null altNames =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-validation-1.6.5/Tests/Certificate.hs new/x509-validation-1.6.8/Tests/Certificate.hs
--- old/x509-validation-1.6.5/Tests/Certificate.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/x509-validation-1.6.8/Tests/Certificate.hs 2017-07-22 08:57:25.000000000 +0200
@@ -0,0 +1,304 @@
+{-# LANGUAGE GADTs #-}
+-- | Types and functions used to build test certificates.
+module Certificate
+ (
+ -- * Hash algorithms
+ hashMD2
+ , hashMD5
+ , hashSHA1
+ , hashSHA224
+ , hashSHA256
+ , hashSHA384
+ , hashSHA512
+ -- * Key and signature utilities
+ , Alg(..)
+ , Keys
+ , generateKeys
+ -- * Certificate utilities
+ , Pair(..)
+ , mkDn
+ , mkExtension
+ , leafStdExts
+ -- * Certificate creation functions
+ , Auth(..)
+ , mkCertificate
+ , mkCA
+ , mkLeaf
+ ) where
+
+import Control.Applicative
+
+import Crypto.Hash.Algorithms
+import Crypto.Number.Generate
+import Crypto.Number.Serialize
+
+import qualified Crypto.PubKey.DSA as DSA
+import qualified Crypto.PubKey.ECC.ECDSA as ECDSA
+import qualified Crypto.PubKey.ECC.Prim as ECC
+import qualified Crypto.PubKey.ECC.Types as ECC
+import qualified Crypto.PubKey.RSA as RSA
+import qualified Crypto.PubKey.RSA.PKCS15 as RSA
+import qualified Crypto.PubKey.RSA.PSS as PSS
+
+import qualified Data.ByteString as B
+
+import Data.ASN1.BinaryEncoding (DER(..))
+import Data.ASN1.Encoding
+import Data.ASN1.Types
+import Data.Maybe (catMaybes)
+import Data.String (fromString)
+import Data.X509
+
+import Data.Hourglass
+
+
+-- Crypto utilities --
+
+-- | Hash algorithms supported in certificates.
+--
+-- This relates the typed hash algorithm @hash@ to the 'HashALG' value.
+data GHash hash = GHash { getHashALG :: HashALG, getHashAlgorithm :: hash }
+
+hashMD2 :: GHash MD2
+hashMD5 :: GHash MD5
+hashSHA1 :: GHash SHA1
+hashSHA224 :: GHash SHA224
+hashSHA256 :: GHash SHA256
+hashSHA384 :: GHash SHA384
+hashSHA512 :: GHash SHA512
+
+hashMD2 = GHash HashMD2 MD2
+hashMD5 = GHash HashMD5 MD5
+hashSHA1 = GHash HashSHA1 SHA1
+hashSHA224 = GHash HashSHA224 SHA224
+hashSHA256 = GHash HashSHA256 SHA256
+hashSHA384 = GHash HashSHA384 SHA384
+hashSHA512 = GHash HashSHA512 SHA512
+
+-- | Signature and hash algorithms instantiated with parameters.
+data Alg pub priv where
+ AlgRSA :: (HashAlgorithm hash, RSA.HashAlgorithmASN1 hash)
+ => Int
+ -> GHash hash
+ -> Alg RSA.PublicKey RSA.PrivateKey
+
+ AlgRSAPSS :: HashAlgorithm hash
+ => Int
+ -> PSS.PSSParams hash B.ByteString B.ByteString
+ -> GHash hash
+ -> Alg RSA.PublicKey RSA.PrivateKey
+
+ AlgDSA :: HashAlgorithm hash
+ => DSA.Params
+ -> GHash hash
+ -> Alg DSA.PublicKey DSA.PrivateKey
+
+ AlgEC :: HashAlgorithm hash
+ => ECC.CurveName
+ -> GHash hash
+ -> Alg ECDSA.PublicKey ECDSA.PrivateKey
+
+-- | Types of public and private keys used by a signature algorithm.
+type Keys pub priv = (Alg pub priv, pub, priv)
+
+-- | Generates random keys for a signature algorithm.
+generateKeys :: Alg pub priv -> IO (Keys pub priv)
+generateKeys alg@(AlgRSA bits _) = generateRSAKeys alg bits
+generateKeys alg@(AlgRSAPSS bits _ _) = generateRSAKeys alg bits
+generateKeys alg@(AlgDSA params _) = do
+ x <- DSA.generatePrivate params
+ let y = DSA.calculatePublic params x
+ return (alg, DSA.PublicKey params y, DSA.PrivateKey params x)
+generateKeys alg@(AlgEC name _) = do
+ d <- generateBetween 1 (n - 1)
+ let p = ECC.pointBaseMul curve d
+ return (alg, ECDSA.PublicKey curve p, ECDSA.PrivateKey curve d)
+ where
+ curve = ECC.getCurveByName name
+ n = ECC.ecc_n . ECC.common_curve $ curve
+
+generateRSAKeys :: Alg RSA.PublicKey RSA.PrivateKey
+ -> Int
+ -> IO (Alg RSA.PublicKey RSA.PrivateKey, RSA.PublicKey, RSA.PrivateKey)
+generateRSAKeys alg bits = addAlg <$> RSA.generate size e
+ where
+ addAlg (pub, priv) = (alg, pub, priv)
+ size = bits `div` 8
+ e = 3
+
+getPubKey :: Alg pub priv -> pub -> PubKey
+getPubKey (AlgRSA _ _) key = PubKeyRSA key
+getPubKey (AlgRSAPSS _ _ _) key = PubKeyRSA key
+getPubKey (AlgDSA _ _) key = PubKeyDSA key
+getPubKey (AlgEC name _) key = PubKeyEC (PubKeyEC_Named name pub)
+ where
+ ECC.Point x y = ECDSA.public_q key
+ pub = SerializedPoint bs
+ bs = B.cons 4 (i2ospOf_ bytes x `B.append` i2ospOf_ bytes y)
+ bits = ECC.curveSizeBits (ECC.getCurveByName name)
+ bytes = (bits + 7) `div` 8
+
+getSignatureALG :: Alg pub priv -> SignatureALG
+getSignatureALG (AlgRSA _ hash) = SignatureALG (getHashALG hash) PubKeyALG_RSA
+getSignatureALG (AlgRSAPSS _ _ hash) = SignatureALG (getHashALG hash) PubKeyALG_RSAPSS
+getSignatureALG (AlgDSA _ hash) = SignatureALG (getHashALG hash) PubKeyALG_DSA
+getSignatureALG (AlgEC _ hash) = SignatureALG (getHashALG hash) PubKeyALG_EC
+
+doSign :: Alg pub priv -> priv -> B.ByteString -> IO B.ByteString
+doSign (AlgRSA _ hash) key msg = do
+ result <- RSA.signSafer (Just $ getHashAlgorithm hash) key msg
+ case result of
+ Left err -> error ("doSign(AlgRSA): " ++ show err)
+ Right sigBits -> return sigBits
+doSign (AlgRSAPSS _ params _) key msg = do
+ result <- PSS.signSafer params key msg
+ case result of
+ Left err -> error ("doSign(AlgRSAPSS): " ++ show err)
+ Right sigBits -> return sigBits
+doSign (AlgDSA _ hash) key msg = do
+ sig <- DSA.sign key (getHashAlgorithm hash) msg
+ return $ encodeASN1' DER
+ [ Start Sequence
+ , IntVal (DSA.sign_r sig)
+ , IntVal (DSA.sign_s sig)
+ , End Sequence
+ ]
+doSign (AlgEC _ hash) key msg = do
+ sig <- ECDSA.sign key (getHashAlgorithm hash) msg
+ return $ encodeASN1' DER
+ [ Start Sequence
+ , IntVal (ECDSA.sign_r sig)
+ , IntVal (ECDSA.sign_s sig)
+ , End Sequence
+ ]
+
+
+-- Certificate utilities --
+
+-- | Holds together a certificate and its private key for convenience.
+--
+-- Contains also the crypto algorithm that both are issued from. This is
+-- useful when signing another certificate.
+data Pair pub priv = Pair
+ { pairAlg :: Alg pub priv
+ , pairSignedCert :: SignedCertificate
+ , pairKey :: priv
+ }
+
+-- | Builds a DN with a single component.
+mkDn :: String -> DistinguishedName
+mkDn cn = DistinguishedName [(getObjectID DnCommonName, fromString cn)]
+
+-- | Used to build a certificate extension.
+mkExtension :: Extension a => Bool -> a -> ExtensionRaw
+mkExtension crit ext = ExtensionRaw (extOID ext) crit (extEncodeBs ext)
+
+-- | Default extensions in leaf certificates.
+leafStdExts :: [ExtensionRaw]
+leafStdExts = [ku, eku]
+ where
+ ku = mkExtension False $ ExtKeyUsage
+ [ KeyUsage_digitalSignature , KeyUsage_keyEncipherment ]
+ eku = mkExtension False $ ExtExtendedKeyUsage
+ [ KeyUsagePurpose_ServerAuth , KeyUsagePurpose_ClientAuth ]
+
+
+-- Authority signing a certificate --
+--
+-- When the certificate is self-signed, issuer and subject are the same. So
+-- they have identical signature algorithms. The purpose of the GADT is to
+-- hold this constraint only in the self-signed case.
+
+-- | Authority signing a certificate, itself or another certificate.
+data Auth pubI privI pubS privS where
+ Self :: (pubI ~ pubS, privI ~ privS) => Auth pubI privI pubS privS
+ CA :: Pair pubI privI -> Auth pubI privI pubS privS
+
+foldAuth :: a
+ -> (Pair pubI privI -> a)
+ -> Auth pubI privI pubS privS
+ -> a
+foldAuth x _ Self = x -- no constraint used
+foldAuth _ f (CA p) = f p
+
+foldAuthPriv :: privS
+ -> (Pair pubI privI -> privI)
+ -> Auth pubI privI pubS privS
+ -> privI
+foldAuthPriv x _ Self = x -- uses constraint privI ~ privS
+foldAuthPriv _ f (CA p) = f p
+
+foldAuthPubPriv :: k pubS privS
+ -> (Pair pubI privI -> k pubI privI)
+ -> Auth pubI privI pubS privS
+ -> k pubI privI
+foldAuthPubPriv x _ Self = x -- uses both constraints
+foldAuthPubPriv _ f (CA p) = f p
+
+
+-- Certificate creation functions --
+
+-- | Builds a certificate using the supplied keys and signs it with an
+-- authority (itself or another certificate).
+mkCertificate :: Int -- ^ Certificate version
+ -> Integer -- ^ Serial number
+ -> DistinguishedName -- ^ Subject DN
+ -> (DateTime, DateTime) -- ^ Certificate validity period
+ -> [ExtensionRaw] -- ^ Extensions to include
+ -> Auth pubI privI pubS privS -- ^ Authority signing the new certificate
+ -> Keys pubS privS -- ^ Keys for the new certificate
+ -> IO (Pair pubS privS) -- ^ The new certificate/key pair
+mkCertificate version serial dn validity exts auth (algS, pubKey, privKey) = do
+ signedCert <- objectToSignedExactF signatureFunction cert
+ return Pair { pairAlg = algS
+ , pairSignedCert = signedCert
+ , pairKey = privKey
+ }
+
+ where
+ pairCert = signedObject . getSigned . pairSignedCert
+
+ cert = Certificate
+ { certVersion = version
+ , certSerial = serial
+ , certSignatureAlg = signAlgI
+ , certIssuerDN = issuerDN
+ , certValidity = validity
+ , certSubjectDN = dn
+ , certPubKey = getPubKey algS pubKey
+ , certExtensions = extensions
+ }
+
+ signingKey = foldAuthPriv privKey pairKey auth
+ algI = foldAuthPubPriv algS pairAlg auth
+
+ signAlgI = getSignatureALG algI
+ issuerDN = foldAuth dn (certSubjectDN . pairCert) auth
+ extensions = Extensions (if null exts then Nothing else Just exts)
+
+ signatureFunction objRaw = do
+ sigBits <- doSign algI signingKey objRaw
+ return (sigBits, signAlgI)
+
+-- | Builds a CA certificate using the supplied keys and signs it with an
+-- authority (itself or another certificate).
+mkCA :: Integer -- ^ Serial number
+ -> String -- ^ Common name
+ -> (DateTime, DateTime) -- ^ CA validity period
+ -> Maybe ExtBasicConstraints -- ^ CA basic constraints
+ -> Maybe ExtKeyUsage -- ^ CA key usage
+ -> Auth pubI privI pubS privS -- ^ Authority signing the new certificate
+ -> Keys pubS privS -- ^ Keys for the new certificate
+ -> IO (Pair pubS privS) -- ^ The new CA certificate/key pair
+mkCA serial cn validity bc ku =
+ let exts = catMaybes [ mkExtension True <$> bc, mkExtension False <$> ku ]
+ in mkCertificate 2 serial (mkDn cn) validity exts
+
+-- | Builds a leaf certificate using the supplied keys and signs it with an
+-- authority (itself or another certificate).
+mkLeaf :: String -- ^ Common name
+ -> (DateTime, DateTime) -- ^ Certificate validity period
+ -> Auth pubI privI pubS privS -- ^ Authority signing the new certificate
+ -> Keys pubS privS -- ^ Keys for the new certificate
+ -> IO (Pair pubS privS) -- ^ The new leaf certificate/key pair
+mkLeaf cn validity = mkCertificate 2 100 (mkDn cn) validity leafStdExts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-validation-1.6.5/Tests/Tests.hs new/x509-validation-1.6.8/Tests/Tests.hs
--- old/x509-validation-1.6.5/Tests/Tests.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/x509-validation-1.6.8/Tests/Tests.hs 2017-06-26 18:12:09.000000000 +0200
@@ -0,0 +1,595 @@
+-- | Validation test suite.
+module Main (main) where
+
+import Control.Applicative
+import Control.Monad (unless)
+
+import Crypto.Hash.Algorithms
+
+import qualified Crypto.PubKey.DSA as DSA
+import qualified Crypto.PubKey.ECC.Types as ECC
+import qualified Crypto.PubKey.RSA.PSS as PSS
+
+import Data.Default.Class
+import Data.Monoid
+import Data.String (fromString)
+import Data.X509
+import Data.X509.CertificateStore
+import Data.X509.Validation
+
+import Data.Hourglass
+import System.Hourglass
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Certificate
+
+
+-- Runtime data, dynamically generated and shared by all test cases --
+
+data RData pub priv = RData
+ { rootStore :: CertificateStore
+ , past :: (DateTime, DateTime)
+ , present :: (DateTime, DateTime)
+ , future :: (DateTime, DateTime)
+ , pastDate :: DateTime
+ , presentDate :: DateTime
+ , futureDate :: DateTime
+ , root :: Pair pub priv
+ , intermediate :: Pair pub priv
+ , intermediate0 :: Pair pub priv
+ , intermediatePast :: Pair pub priv
+ , intermediateFuture :: Pair pub priv
+ , keys1 :: Keys pub priv
+ , keys2 :: Keys pub priv
+ , keys3 :: Keys pub priv
+ }
+
+mkDateTime :: Date -> DateTime
+mkDateTime d = DateTime d (TimeOfDay 0 0 0 0)
+
+mkStore :: [Pair pub priv] -> CertificateStore
+mkStore ps = makeCertificateStore (map pairSignedCert ps)
+
+initData :: Alg pub priv -> IO (RData pub priv)
+initData alg = do
+ today <- timeGetDate <$> timeCurrent
+
+ let m3 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = -3 }
+ let m2 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = -2 }
+ let m1 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = -1 }
+ let n1 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = 1 }
+ let n2 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = 2 }
+ let n3 = mkDateTime $ today `dateAddPeriod` mempty { periodYears = 3 }
+
+ -- two-year validity periods in past, present and future
+ let vPast = (m3, m1) -- Year-3 .. Year-1
+ let vPresent = (m1, n1) -- Year-1 .. Year+1
+ let vFuture = (n1, n3) -- Year+1 .. Year+3
+
+ -- CA basic constraints and key usage extensions
+ let bc = Just $ ExtBasicConstraints True Nothing
+ let bc0 = Just $ ExtBasicConstraints True (Just 0)
+ let ku = Nothing
+
+ -- Root CAs in past, present and future. Need distinct DNs because the
+ -- certificate store contains all 3 simultaneously.
+ rootPast <- generateKeys alg >>= mkCA 1 "RootCA - R1" vPast bc ku Self
+ rootPresent <- generateKeys alg >>= mkCA 2 "RootCA - R2" vPresent bc ku Self
+ rootFuture <- generateKeys alg >>= mkCA 3 "RootCA - R3" vFuture bc ku Self
+
+ -- Intermediate CAs in past, present and future. Also includes a CA with
+ -- a depth constraint.
+ pIntermediateP <- generateKeys alg >>= mkCA 11 "IntermediateCA" vPast bc ku (CA rootPast)
+ pIntermediate <- generateKeys alg >>= mkCA 12 "IntermediateCA" vPresent bc ku (CA rootPresent)
+ pIntermediate0 <- generateKeys alg >>= mkCA 12 "IntermediateCA" vPresent bc0 ku (CA rootPresent)
+ pIntermediateF <- generateKeys alg >>= mkCA 13 "IntermediateCA" vFuture bc ku (CA rootFuture)
+
+ -- Additional keys to be reused in test cases. This removes the cost of
+ -- generating individual keys. A key should be used only once per case.
+ k1 <- generateKeys alg
+ k2 <- generateKeys alg
+ k3 <- generateKeys alg
+
+ return RData
+ { rootStore = mkStore [ rootPast, rootPresent, rootFuture ]
+ , past = vPast
+ , present = vPresent
+ , future = vFuture
+ , pastDate = m2 -- Year-2
+ , presentDate = mkDateTime today
+ , futureDate = n2 -- Year+2
+ , root = rootPresent
+ , intermediate = pIntermediate
+ , intermediate0 = pIntermediate0
+ , intermediatePast = pIntermediateP
+ , intermediateFuture = pIntermediateF
+ , keys1 = k1
+ , keys2 = k2
+ , keys3 = k3
+ }
+
+freeData :: RData pub priv -> IO ()
+freeData _ = return ()
+
+
+-- Test utilities --
+
+-- | Asserts order-insensitive equality for lists. This also ignores
+-- duplicate elements.
+assertEqualList :: (Eq a, Show a) => String -- ^ The message prefix
+ -> [a] -- ^ The expected value
+ -> [a] -- ^ The actual value
+ -> Assertion
+assertEqualList preface expected actual =
+ unless (actual `same` expected) (assertFailure msg)
+ where
+ a `same` b = all (`elem` b) a && all (`elem` a) b
+ msg = (if null preface then "" else preface ++ "\n") ++
+ " expected: " ++ show expected ++ "\n but got: " ++ show actual
+
+-- | Asserts the validation result of a certificate chain.
+assertValidationResult :: RData pub priv -- ^ Common test resources (CA store)
+ -> ValidationChecks -- ^ Checks to do
+ -> HostName -- ^ Connection identification
+ -> [Pair pub priv] -- ^ Certificate chain to validate
+ -> [FailedReason] -- ^ Expected validation result
+ -> Assertion
+assertValidationResult rd checks hostname ps expected = do
+ actual <- validate HashSHA256 defaultHooks checks store def ident chain
+ assertEqualList "Unexpected validation result" expected actual
+ where
+ store = rootStore rd
+ ident = (hostname, fromString ":443")
+ chain = CertificateChain (map pairSignedCert ps)
+
+-- | Simplified access to test resource from 'withResource'.
+testWithRes :: IO r -> TestName -> (r -> Assertion) -> TestTree
+testWithRes res caseName f = testCase caseName (res >>= f)
+
+
+-- Test cases --
+
+-- | Tests a leaf certificate signed by an intermediate CA, but using a chain
+-- where the intermediate CA may use a different key. This tests the signature
+-- of the leaf certificate provided both CAs have the same subject DN.
+testSignature :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> (RData pub priv -> Pair pub priv) -- ^ CA to use for signature
+ -> (RData pub priv -> Pair pub priv) -- ^ CA to use for validation
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testSignature res caseName f g expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf "signature" (present rd) (CA $ f rd) (keys1 rd)
+ assertValidationResult rd defaultChecks "signature" [pair, g rd] expected
+
+-- | Tests an empty certificate chain.
+testEmpty :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testEmpty res caseName expected = testWithRes res caseName $ \rd ->
+ assertValidationResult rd defaultChecks "empty" [] expected
+
+-- | Tests a certificate chain where the intermediate CA is missing.
+testIncompleteChain :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testIncompleteChain res caseName expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf "incomplete" (present rd) (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd defaultChecks "incomplete" [pair] expected
+
+-- | Tests a self-signed certificate.
+testSelfSigned :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testSelfSigned res caseName expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf "self-signed" (present rd) Self (keys1 rd)
+ assertValidationResult rd defaultChecks "self-signed" [pair] expected
+
+-- | Tests key usage of intermediate CA, with or without 'checkCAConstraints'.
+testCAKeyUsage :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkCAConstraints'
+ -> ExtKeyUsageFlag -- ^ Intermediate CA key usage
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testCAKeyUsage res caseName check flag expected = testWithRes res caseName $ \rd -> do
+ ca <- mkCA 20 "KeyUsageCA" (present rd) bc ku (CA $ root rd) (keys1 rd)
+ pair <- mkLeaf "ca-key-usage" (present rd) (CA ca) (keys2 rd)
+ assertValidationResult rd checks "ca-key-usage" [pair, ca] expected
+ where
+ checks = defaultChecks { checkCAConstraints = check }
+ bc = Just (ExtBasicConstraints True Nothing)
+ ku = Just (ExtKeyUsage [flag])
+
+-- | Tests CA flag of intermediate CA, with or without 'checkCAConstraints'.
+testNotCA :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkCAConstraints'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testNotCA res caseName check expected = testWithRes res caseName $ \rd -> do
+ ca <- mkCA 20 "NotCA" (present rd) bc Nothing (CA $ root rd) (keys1 rd)
+ pair <- mkLeaf "not-ca" (present rd) (CA ca) (keys2 rd)
+ assertValidationResult rd checks "not-ca" [pair, ca] expected
+ where
+ checks = defaultChecks { checkCAConstraints = check }
+ bc = Just (ExtBasicConstraints False Nothing)
+
+-- | Tests an intermediate CA without basic constraints, with or without
+-- 'checkCAConstraints'.
+testNoBasic :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkCAConstraints'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testNoBasic res caseName check expected = testWithRes res caseName $ \rd -> do
+ ca <- mkCA 20 "NoBC" (present rd) bc Nothing (CA $ root rd) (keys1 rd)
+ pair <- mkLeaf "no-bc" (present rd) (CA ca) (keys2 rd)
+ assertValidationResult rd checks "no-bc" [pair, ca] expected
+ where
+ checks = defaultChecks { checkCAConstraints = check }
+ bc = Nothing
+
+-- | Tests basic constraints depth, with or without 'checkCAConstraints'.
+testBadDepth :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkCAConstraints'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testBadDepth res caseName check expected = testWithRes res caseName $ \rd -> do
+ -- a new CA signed by intermediate0 should fail because of the depth limit
+ ca <- mkCA 20 "TooDeep" (present rd) bc Nothing (CA $ intermediate0 rd) (keys1 rd)
+ pair <- mkLeaf "bad-depth" (present rd) (CA ca) (keys2 rd)
+ assertValidationResult rd checks "bad-depth" [pair, ca, intermediate0 rd] expected
+ where
+ checks = defaultChecks { checkCAConstraints = check }
+ bc = Just (ExtBasicConstraints True Nothing)
+
+-- | Tests a non-V3 leaf certificate, with or without 'checkLeafV3'.
+testLeafNotV3 :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkLeafV3'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testLeafNotV3 res caseName check expected = testWithRes res caseName $ \rd -> do
+ pair <- mkCertificate 1 100 dn (present rd) leafStdExts (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks "leaf-not-v3" [pair, intermediate rd] expected
+ where
+ checks = defaultChecks { checkLeafV3 = check }
+ dn = mkDn "leaf-not-v3"
+
+-- | Tests a certificate chain containing a non-related certificate, with or
+-- without 'checkStrictOrdering'.
+testStrictOrdering :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkStrictOrdering'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testStrictOrdering res caseName check expected = testWithRes res caseName $ \rd -> do
+ ca <- mkCA 20 "CA" (present rd) bc Nothing (CA $ intermediate rd) (keys1 rd)
+ extra <- mkCA 21 "Extra" (present rd) bc Nothing (CA $ intermediate rd) (keys2 rd)
+ pair <- mkLeaf "strict-ordering" (present rd) (CA ca) (keys3 rd)
+ assertValidationResult rd checks "strict-ordering" [pair, ca, extra, intermediate rd] expected
+ where
+ checks = defaultChecks { checkStrictOrdering = check }
+ bc = Just (ExtBasicConstraints True Nothing)
+
+-- | Tests validity of leaf certificate.
+testLeafDates :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkTimeValidity'
+ -> (RData pub priv -> (DateTime, DateTime)) -- ^ Validity period to use
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testLeafDates res caseName check f expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf "leaf-dates" (f rd) (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks "leaf-dates" [pair, intermediate rd] expected
+ where
+ checks = defaultChecks { checkTimeValidity = check }
+
+-- | Tests validity of intermediate CA.
+testIntermediateDates :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> Bool -- ^ Value for 'checkTimeValidity'
+ -> (RData pub priv -> Pair pub priv) -- ^ Intermediate CA to use
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testIntermediateDates res caseName check f expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf "intermediate-dates" (present rd) (CA $ f rd) (keys1 rd)
+ assertValidationResult rd checks "intermediate-dates" [pair, f rd] expected
+ where
+ checks = defaultChecks { checkTimeValidity = check }
+
+-- | Tests validity of leaf certificate and intermediate CA,
+-- using 'checkAtTime'.
+testTimeshift :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> (RData pub priv -> (DateTime, DateTime)) -- ^ Leaf validity period
+ -> (RData pub priv -> Pair pub priv) -- ^ Intermediate CA to use
+ -> (RData pub priv -> DateTime) -- ^ Value for 'checkAtTime'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testTimeshift res caseName f g h expected = testWithRes res caseName $ \rd -> do
+ let checks = defaultChecks { checkAtTime = Just $ h rd }
+ pair <- mkLeaf "timeshift" (f rd) (CA $ g rd) (keys1 rd)
+ assertValidationResult rd checks "timeshift" [pair, g rd] expected
+
+-- | Tests an empty DistinguishedName.
+testNoCommonName :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testNoCommonName res caseName expected = testWithRes res caseName $ \rd -> do
+ pair <- mkCertificate 2 100 dn (present rd) leafStdExts (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd defaultChecks "no-cn" [pair, intermediate rd] expected
+ where
+ dn = DistinguishedName []
+
+-- | Tests certificate CommonName against expected hostname, with or without
+-- 'checkFQHN'.
+testCommonName :: IO (RData pub priv) -- ^ Common test resources
+ -> String -- ^ Certificate CommonName
+ -> HostName -- ^ Connection identification
+ -> Bool -- ^ Value for 'checkFQHN'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testCommonName res cn hostname check expected = testWithRes res caseName $ \rd -> do
+ pair <- mkLeaf cn (present rd) (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks hostname [pair, intermediate rd] expected
+ where
+ caseName = if null hostname then "empty" else hostname
+ checks = defaultChecks { checkFQHN = check }
+
+-- | Tests certificate SubjectAltName against expected hostname, with or
+-- without 'checkFQHN'.
+testSubjectAltName :: IO (RData pub priv) -- ^ Common test resources
+ -> String -- ^ Certificate SubjectAltName
+ -> HostName -- ^ Connection identification
+ -> Bool -- ^ Value for 'checkFQHN'
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testSubjectAltName res san hostname check expected = testWithRes res caseName $ \rd -> do
+ pair <- mkCertificate 2 100 dn (present rd) (ext:leafStdExts) (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks hostname [pair, intermediate rd] expected
+ where
+ caseName = if null hostname then "empty" else hostname
+ checks = defaultChecks { checkFQHN = check }
+ dn = mkDn "cn-not-used" -- this CN value is to be tested too
+ -- (to make sure CN is *not* considered when a
+ -- SubjectAltName exists)
+ ext = mkExtension False $
+ -- wraps test value with other values
+ ExtSubjectAltName [ AltNameDNS "dummy1"
+ , AltNameRFC822 "test(a)example.com"
+ , AltNameDNS san
+ , AltNameDNS "dummy2"
+ ]
+
+-- | Tests 'checkLeafKeyUsage'.
+testLeafKeyUsage :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [ExtKeyUsageFlag] -- ^ Certificate flags
+ -> [ExtKeyUsageFlag] -- ^ Flags required for validation
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testLeafKeyUsage res caseName cFlags vFlags expected = testWithRes res caseName $ \rd -> do
+ pair <- mkCertificate 2 100 dn (present rd) exts (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks "key-usage" [pair, intermediate rd] expected
+ where
+ checks = defaultChecks { checkLeafKeyUsage = vFlags }
+ dn = mkDn "key-usage"
+ exts = if null cFlags then [] else [mkExtension False (ExtKeyUsage cFlags)]
+
+-- | Tests 'checkLeafKeyPurpose'.
+testLeafKeyPurpose :: IO (RData pub priv) -- ^ Common test resources
+ -> TestName -- ^ Case name
+ -> [ExtKeyUsagePurpose] -- ^ Certificate flags
+ -> [ExtKeyUsagePurpose] -- ^ Flags required for validation
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testLeafKeyPurpose res caseName cFlags vFlags expected = testWithRes res caseName $ \rd -> do
+ pair <- mkCertificate 2 100 dn (present rd) exts (CA $ intermediate rd) (keys1 rd)
+ assertValidationResult rd checks "key-purpose" [pair, intermediate rd] expected
+ where
+ checks = defaultChecks { checkLeafKeyPurpose = vFlags }
+ dn = mkDn "key-purpose"
+ exts = if null cFlags then [] else [mkExtension False (ExtExtendedKeyUsage cFlags)]
+
+-- | Tests validation with multiple failure reasons in exhaustive mode.
+testExhaustive :: IO (RData pub priv) -- ^ Common test resources
+ -> String -- ^ Certificate CommonName
+ -> HostName -- ^ Connection identification
+ -> [FailedReason] -- ^ Expected validation result
+ -> TestTree
+testExhaustive res cn hostname expected = testWithRes res caseName $ \rd -> do
+ -- build an expired self-signed certificate with an invalid signature:
+ -- the certificate is actually signed by a clone using a different key
+ p1 <- mkLeaf cn (past rd) Self (keys1 rd)
+ p2 <- mkLeaf cn (past rd) (CA p1) (keys2 rd)
+ assertValidationResult rd checks hostname [p2] expected
+ where
+ caseName = if null hostname then "empty" else hostname
+ checks = defaultChecks { checkExhaustive = True }
+
+
+-- | All validation test cases.
+treeWithAlg :: TestName -> Alg pub priv -> TestTree
+treeWithAlg groupName alg = withResource (initData alg) freeData $ \res ->
+ testGroup groupName
+ [ testGroup "signature"
+ [ testSignature res "valid" intermediate intermediate []
+ , testSignature res "invalid" intermediate intermediate0 [InvalidSignature SignatureInvalid]
+ ]
+ , testGroup "chain"
+ [ testEmpty res "empty" [EmptyChain]
+ , testIncompleteChain res "incomplete" [UnknownCA]
+ , testSelfSigned res "self-signed" [SelfSigned]
+ , testGroup "leaf-not-v3"
+ [ testLeafNotV3 res "v3-disallowed" True [LeafNotV3]
+ , testLeafNotV3 res "v3-allowed" False []
+ ]
+ , testGroup "strict-ordering"
+ [ testStrictOrdering res "enabled" True [UnknownCA]
+ , testStrictOrdering res "disabled" False []
+ ]
+ ]
+ , testGroup "ca-constraints"
+ [ testGroup "enabled"
+ [ testCAKeyUsage res "cert-sign" True KeyUsage_keyCertSign []
+ , testCAKeyUsage res "crl-sign" True KeyUsage_cRLSign [NotAllowedToSign]
+ , testNotCA res "not-ca" True [NotAnAuthority]
+ , testNoBasic res "no-basic" True [NotAnAuthority]
+ , testBadDepth res "bad-depth" True [AuthorityTooDeep]
+ ]
+ , testGroup "disabled"
+ [ testCAKeyUsage res "cert-sign" False KeyUsage_keyCertSign []
+ , testCAKeyUsage res "crl-sign" False KeyUsage_cRLSign []
+ , testNotCA res "not-ca" False []
+ , testNoBasic res "no-basic" False []
+ , testBadDepth res "bad-depth" False []
+ ]
+ ]
+ , testGroup "dates"
+ [ testGroup "leaf"
+ [ testGroup "enabled"
+ [ testLeafDates res "past" True past [Expired]
+ , testLeafDates res "present" True present []
+ , testLeafDates res "future" True future [InFuture]
+ ]
+ , testGroup "disabled"
+ [ testLeafDates res "past" False past []
+ , testLeafDates res "present" False present []
+ , testLeafDates res "future" False future []
+ ]
+ ]
+ , testGroup "intermediate"
+ [ testGroup "enabled"
+ [ testIntermediateDates res "past" True intermediatePast [Expired]
+ , testIntermediateDates res "present" True intermediate []
+ , testIntermediateDates res "future" True intermediateFuture [InFuture]
+ ]
+ , testGroup "disabled"
+ [ testIntermediateDates res "past" False intermediatePast []
+ , testIntermediateDates res "present" False intermediate []
+ , testIntermediateDates res "future" False intermediateFuture []
+ ]
+ ]
+ , testGroup "timeshift"
+ [ testGroup "at-past"
+ [ testTimeshift res "past" past intermediatePast pastDate []
+ , testTimeshift res "present" present intermediate pastDate [InFuture]
+ , testTimeshift res "future" future intermediateFuture pastDate [InFuture]
+ ]
+ , testGroup "at-present"
+ [ testTimeshift res "past" past intermediatePast presentDate [Expired]
+ , testTimeshift res "present" present intermediate presentDate []
+ , testTimeshift res "future" future intermediateFuture presentDate [InFuture]
+ ]
+ , testGroup "in-future"
+ [ testTimeshift res "past" past intermediatePast futureDate [Expired]
+ , testTimeshift res "present" present intermediate futureDate [Expired]
+ , testTimeshift res "future" future intermediateFuture futureDate []
+ ]
+ ]
+ ]
+ , testGroup "CommonName"
+ [ testNoCommonName res "no-common-name" [NoCommonName]
+ , testGroup "simple"
+ [ testCommonName res "www.example.com" "www.example.com" True []
+ , testCommonName res "www.example.com" "www2.example.com" True [NameMismatch "www2.example.com"]
+ , testCommonName res "www.example.com" "WWW.EXAMPLE.COM" True []
+ , testCommonName res "www.example.com" "www.EXAMPLE.COM" True []
+ , testCommonName res "www.example.com" "WWW.example.com" True []
+ , testCommonName res "www..example.com" "www..example.com" True [NameMismatch "www..example.com"] -- InvalidName "www..example.com"
+ , testCommonName res "" "" True [NameMismatch ""] -- InvalidName ""
+ ]
+ , testGroup "wildcard"
+ [ testCommonName res "*.example.com" "example.com" True [NameMismatch "example.com"]
+ , testCommonName res "*.example.com" "www.example.com" True []
+ , testCommonName res "*.example.com" "www.EXAMPLE.com" True []
+ , testCommonName res "*.example.com" "www2.example.com" True []
+ , testCommonName res "*.example.com" "www.m.example.com" True [NameMismatch "www.m.example.com"]
+ , testCommonName res "*" "single" True [NameMismatch "single"] -- InvalidWildcard
+ ]
+ , testGroup "disabled"
+ [ testCommonName res "www.example.com" "www.example.com" False []
+ , testCommonName res "www.example.com" "www2.example.com" False []
+ , testCommonName res "www.example.com" "WWW.EXAMPLE.COM" False []
+ , testCommonName res "www.example.com" "www.EXAMPLE.COM" False []
+ , testCommonName res "www.example.com" "WWW.example.com" False []
+ , testCommonName res "www..example.com" "www..example.com" False []
+ , testCommonName res "" "" False []
+ ]
+ ]
+ , testGroup "SubjectAltName"
+ [ testGroup "simple"
+ [ testSubjectAltName res "www.example.com" "www.example.com" True []
+ , testSubjectAltName res "www.example.com" "www2.example.com" True [NameMismatch "www2.example.com"]
+ , testSubjectAltName res "www.example.com" "WWW.EXAMPLE.COM" True []
+ , testSubjectAltName res "www.example.com" "www.EXAMPLE.COM" True []
+ , testSubjectAltName res "www.example.com" "WWW.example.com" True []
+ , testSubjectAltName res "www..example.com" "www..example.com" True [NameMismatch "www..example.com"] -- InvalidName "www..example.com"
+ , testSubjectAltName res "" "" True [NameMismatch ""] -- InvalidName ""
+ ]
+ , testGroup "wildcard"
+ [ testSubjectAltName res "*.example.com" "example.com" True [NameMismatch "example.com"]
+ , testSubjectAltName res "*.example.com" "www.example.com" True []
+ , testSubjectAltName res "*.example.com" "www.EXAMPLE.com" True []
+ , testSubjectAltName res "*.example.com" "www2.example.com" True []
+ , testSubjectAltName res "*.example.com" "www.m.example.com" True [NameMismatch "www.m.example.com"]
+ , testSubjectAltName res "*" "single" True [NameMismatch "single"] -- InvalidWildcard
+ ]
+ , testSubjectAltName res "www.example.com" "cn-not-used" True [NameMismatch "cn-not-used"]
+ , testGroup "disabled"
+ [ testSubjectAltName res "www.example.com" "www.example.com" False []
+ , testSubjectAltName res "www.example.com" "www2.example.com" False []
+ , testSubjectAltName res "www.example.com" "WWW.EXAMPLE.COM" False []
+ , testSubjectAltName res "www.example.com" "www.EXAMPLE.COM" False []
+ , testSubjectAltName res "www.example.com" "WWW.example.com" False []
+ , testSubjectAltName res "www..example.com" "www..example.com" False []
+ , testSubjectAltName res "" "" False []
+ ]
+ ]
+ , testGroup "key-usage"
+ [ testLeafKeyUsage res "none" [] [u2, u3] []
+ , testLeafKeyUsage res "valid" [u1, u2, u3] [u2, u3] []
+ , testLeafKeyUsage res "invalid" [u1, u3] [u2, u3] [LeafKeyUsageNotAllowed]
+ ]
+ , testGroup "key-purpose"
+ [ testLeafKeyPurpose res "none" [] [p2, p3] []
+ , testLeafKeyPurpose res "valid" [p1, p2, p3] [p2, p3] []
+ , testLeafKeyPurpose res "invalid" [p1, p3] [p2, p3] [LeafKeyPurposeNotAllowed]
+ ]
+ , testExhaustive res "exhaustive2" "exhaustive"
+ [ SelfSigned
+ , Expired
+ , InvalidSignature SignatureInvalid
+ , NameMismatch "exhaustive"
+ ]
+ ]
+ where
+ (u1, u2, u3) = (KeyUsage_keyEncipherment, KeyUsage_dataEncipherment, KeyUsage_keyAgreement)
+ (p1, p2, p3) = (KeyUsagePurpose_ClientAuth, KeyUsagePurpose_CodeSigning, KeyUsagePurpose_EmailProtection)
+
+-- | Runs the test suite.
+main :: IO ()
+main = defaultMain $ testGroup "Validation"
+ [ treeWithAlg "RSA" (AlgRSA 2048 hashSHA256)
+ , treeWithAlg "RSAPSS" (AlgRSAPSS 2048 pssParams hashSHA224)
+ , treeWithAlg "DSA" (AlgDSA dsaParams hashSHA1)
+ , treeWithAlg "ECDSA" (AlgEC curveName hashSHA512)
+ ]
+ where
+ pssParams = PSS.defaultPSSParams SHA224
+ -- DSA parameters were generated using 'openssl dsaparam -C 2048'
+ dsaParams = DSA.Params
+ { DSA.params_p = 0x9994B9B1FC22EC3A5F607B5130D314F35FC8D387015A6D8FA2B56D3CC1F13FE330A631DBC765CEFFD6986BDEB8512580BBAD93D56EE7A8997DB9C65C29313FBC5077DB6F1E9D9E6D3499F997F09C8CF8ECC9E5F38DC34C3D656CFDF463893DDF9E246E223D7E5C4E86F54426DDA5DE112FCEDBFB5B6D6F7C76ED190EA1A7761CA561E8E5803F9D616DAFF25E2CCD4011A6D78D5CE8ED28CC2D865C7EC01508BA96FBD1F8BB5E517B6A5208A90AC2D3DCAE50281C02510B86C16D449465CD4B3754FD91AA19031282122A25C68292F033091FCB9DEBDE0D220F81F7EE4AB6581D24BE48204AF3DA52BDB944DA53B76148055395B30954735DC911574D360C953B
+ , DSA.params_g = 0x10E51AEA37880C5E52DD477ED599D55050C47012D038B9E4B3199C9DE9A5B873B1ABC8B954F26AFEA6C028BCE1783CFE19A88C64E4ED6BFD638802A78457A5C25ABEA98BE9C6EF18A95504C324315EABE7C1EA50E754591E3EFD3D33D4AE47F82F8978ABC871C135133767ACC60683F065430C749C43893D73596B12D5835A78778D0140B2F63B32A5658308DD5BA6BBC49CF6692929FA6A966419404F9A2C216860E3F339EDDB49AD32C294BDB4C9C6BB0D1CC7B691C65968C3A0A5106291CD3810147C8A16B4BFE22968AD9D3890733F4AA9ACD8687A5B981653A4B1824004639956E8C1EDAF31A8224191E8ABD645D2901F5B164B4B93F98039A6EAEC6088
+ , DSA.params_q = 0xE1FDFADD32F46B5035EEB3DB81F9974FBCA69BE2223E62FCA8C77989B2AACDF7
+ }
+ curveName = ECC.SEC_p384r1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-validation-1.6.5/x509-validation.cabal new/x509-validation-1.6.8/x509-validation.cabal
--- old/x509-validation-1.6.5/x509-validation.cabal 2016-10-03 09:47:58.000000000 +0200
+++ new/x509-validation-1.6.8/x509-validation.cabal 2017-07-22 08:58:06.000000000 +0200
@@ -1,5 +1,5 @@
Name: x509-validation
-Version: 1.6.5
+version: 1.6.8
Description: X.509 Certificate and CRL validation
License: BSD3
License-file: LICENSE
@@ -11,9 +11,10 @@
Category: Data
stability: experimental
Homepage: http://github.com/vincenthz/hs-certificate
-Cabal-Version: >=1.6
+Cabal-Version: >= 1.10
Library
+ Default-Language: Haskell2010
Build-Depends: base >= 3 && < 5
, bytestring
, memory
@@ -25,8 +26,8 @@
, pem >= 0.1 && < 0.3
, asn1-types >= 0.3 && < 0.4
, asn1-encoding >= 0.9 && < 0.10
- , x509 >= 1.6.2 && < 1.7
- , x509-store >= 1.6 && < 1.7
+ , x509 >= 1.6.5
+ , x509-store >= 1.6
, cryptonite >= 0.8
Exposed-modules: Data.X509.Validation
Other-modules: Data.X509.Validation.Signature
@@ -35,6 +36,26 @@
Data.X509.Validation.Types
ghc-options: -Wall
+Test-Suite test-x509-validation
+ Default-Language: Haskell2010
+ type: exitcode-stdio-1.0
+ hs-source-dirs: Tests
+ Main-is: Tests.hs
+ Other-modules: Certificate
+ Build-Depends: base >= 3 && < 5
+ , bytestring
+ , data-default-class
+ , tasty
+ , tasty-hunit
+ , hourglass
+ , asn1-types
+ , asn1-encoding
+ , x509 >= 1.7.1
+ , x509-store
+ , x509-validation
+ , cryptonite
+ ghc-options: -Wall
+
source-repository head
type: git
location: git://github.com/vincenthz/hs-certificate
1
0
Hello community,
here is the log from the commit of package ghc-x509-system for openSUSE:Factory checked in at 2017-08-31 21:01:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-x509-system (Old)
and /work/SRC/openSUSE:Factory/.ghc-x509-system.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-x509-system"
Thu Aug 31 21:01:52 2017 rev:7 rq:513542 version:1.6.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-x509-system/ghc-x509-system.changes 2016-11-05 21:27:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-x509-system.new/ghc-x509-system.changes 2017-08-31 21:01:52.405809896 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:15 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.6.5.
+
+-------------------------------------------------------------------
Old:
----
x509-system-1.6.4.tar.gz
New:
----
x509-system-1.6.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-x509-system.spec ++++++
--- /var/tmp/diff_new_pack.i3zrRO/_old 2017-08-31 21:01:53.925596362 +0200
+++ /var/tmp/diff_new_pack.i3zrRO/_new 2017-08-31 21:01:53.949592991 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-x509-system
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%global pkg_name x509-system
Name: ghc-%{pkg_name}
-Version: 1.6.4
+Version: 1.6.5
Release: 0
Summary: Handle per-operating-system X.509 accessors and storage
License: BSD-3-Clause
++++++ x509-system-1.6.4.tar.gz -> x509-system-1.6.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-system-1.6.4/x509-system.cabal new/x509-system-1.6.5/x509-system.cabal
--- old/x509-system-1.6.4/x509-system.cabal 2016-10-03 09:47:13.000000000 +0200
+++ new/x509-system-1.6.5/x509-system.cabal 2017-07-21 19:18:45.000000000 +0200
@@ -1,5 +1,5 @@
Name: x509-system
-Version: 1.6.4
+version: 1.6.5
Description: System X.509 handling
License: BSD3
License-file: LICENSE
@@ -11,9 +11,10 @@
Category: Data
stability: experimental
Homepage: http://github.com/vincenthz/hs-certificate
-Cabal-Version: >=1.8
+Cabal-Version: >= 1.10
Library
+ Default-Language: Haskell2010
Build-Depends: base >= 3 && < 5
, bytestring
, mtl
@@ -22,8 +23,8 @@
, filepath
, process
, pem >= 0.1 && < 0.3
- , x509 >= 1.6 && < 1.7
- , x509-store >= 1.6.2 && < 1.7
+ , x509 >= 1.6
+ , x509-store >= 1.6.2
Exposed-modules: System.X509
System.X509.Unix
System.X509.MacOS
1
0
Hello community,
here is the log from the commit of package ghc-x509-store for openSUSE:Factory checked in at 2017-08-31 21:01:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-x509-store (Old)
and /work/SRC/openSUSE:Factory/.ghc-x509-store.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-x509-store"
Thu Aug 31 21:01:49 2017 rev:6 rq:513541 version:1.6.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-x509-store/ghc-x509-store.changes 2016-11-05 21:26:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-x509-store.new/ghc-x509-store.changes 2017-08-31 21:01:50.186121767 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:37 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.6.3.
+
+-------------------------------------------------------------------
Old:
----
x509-store-1.6.2.tar.gz
New:
----
x509-store-1.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-x509-store.spec ++++++
--- /var/tmp/diff_new_pack.QRLE1d/_old 2017-08-31 21:01:51.873884632 +0200
+++ /var/tmp/diff_new_pack.QRLE1d/_new 2017-08-31 21:01:51.897881260 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-x509-store
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%global pkg_name x509-store
Name: ghc-%{pkg_name}
-Version: 1.6.2
+Version: 1.6.3
Release: 0
Summary: X.509 collection accessing and storing methods
License: BSD-3-Clause
++++++ x509-store-1.6.2.tar.gz -> x509-store-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/x509-store-1.6.2/x509-store.cabal new/x509-store-1.6.3/x509-store.cabal
--- old/x509-store-1.6.2/x509-store.cabal 2016-10-03 09:36:19.000000000 +0200
+++ new/x509-store-1.6.3/x509-store.cabal 2017-07-21 19:18:36.000000000 +0200
@@ -1,5 +1,5 @@
Name: x509-store
-Version: 1.6.2
+version: 1.6.3
Description: X.509 collection accessing and storing methods for certificate, crl, exception list
License: BSD3
License-file: LICENSE
@@ -11,9 +11,10 @@
Category: Data
stability: experimental
Homepage: http://github.com/vincenthz/hs-certificate
-Cabal-Version: >=1.8
+Cabal-Version: >= 1.10
Library
+ Default-Language: Haskell2010
Build-Depends: base >= 3 && < 5
, bytestring
, mtl
@@ -24,7 +25,7 @@
, asn1-types >= 0.3 && < 0.4
, asn1-encoding >= 0.9 && < 0.10
, cryptonite
- , x509 >= 1.6 && < 1.7
+ , x509 >= 1.6
Exposed-modules: Data.X509.CertificateStore
Data.X509.File
Data.X509.Memory
1
0