openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 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 ghc-text-latin1 for openSUSE:Factory checked in at 2017-08-31 20:49:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-text-latin1 (Old)
and /work/SRC/openSUSE:Factory/.ghc-text-latin1.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-text-latin1"
Thu Aug 31 20:49:41 2017 rev:1 rq:513680 version:0.3
Changes:
--------
New Changes file:
--- /dev/null 2017-07-20 07:30:00.335470106 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-text-latin1.new/ghc-text-latin1.changes 2017-08-31 20:49:41.896426226 +0200
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Wed Apr 19 13:32:39 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.3 with cabal2obs.
+
New:
----
ghc-text-latin1.changes
ghc-text-latin1.spec
text-latin1-0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-text-latin1.spec ++++++
#
# spec file for package ghc-text-latin1
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global pkg_name text-latin1
Name: ghc-%{pkg_name}
Version: 0.3
Release: 0
Summary: Latin-1 (including ASCII) utility functions
License: BSD-3-Clause
Group: Development/Languages/Other
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-bytestring-devel
BuildRequires: ghc-case-insensitive-devel
BuildRequires: ghc-data-checked-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-text-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides various functions over the ASCII ang Latin-1 portions of
the 'Char' and 'Word8' data types.
%package devel
Summary: Haskell %{pkg_name} library development files
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
%description devel
This package provides the Haskell %{pkg_name} library development files.
%prep
%setup -q -n %{pkg_name}-%{version}
%build
%ghc_lib_build
%install
%ghc_lib_install
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%files -f %{name}.files
%defattr(-,root,root,-)
%doc LICENSE
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
%changelog
1
0
Hello community,
here is the log from the commit of package hledger-web for openSUSE:Factory checked in at 2017-08-31 20:48:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hledger-web (Old)
and /work/SRC/openSUSE:Factory/.hledger-web.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hledger-web"
Thu Aug 31 20:48:56 2017 rev:2 rq:513569 version:1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hledger-web/hledger-web.changes 2017-04-18 13:51:34.300506048 +0200
+++ /work/SRC/openSUSE:Factory/.hledger-web.new/hledger-web.changes 2017-08-31 20:48:57.522654904 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:53 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.2 revision 1.
+
+-------------------------------------------------------------------
Old:
----
hledger-web-1.1.tar.gz
New:
----
hledger-web-1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hledger-web.spec ++++++
--- /var/tmp/diff_new_pack.r0rnvq/_old 2017-08-31 20:48:58.386533643 +0200
+++ /var/tmp/diff_new_pack.r0rnvq/_new 2017-08-31 20:48:58.390533082 +0200
@@ -19,7 +19,7 @@
%global pkg_name hledger-web
%bcond_with tests
Name: %{pkg_name}
-Version: 1.1
+Version: 1.2
Release: 0
Summary: Web interface for the hledger accounting tool
License: GPL-3.0+
++++++ hledger-web-1.1.tar.gz -> hledger-web-1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/CHANGES new/hledger-web-1.2/CHANGES
--- old/hledger-web-1.1/CHANGES 2016-12-31 20:22:01.000000000 +0100
+++ new/hledger-web-1.2/CHANGES 2017-04-01 03:07:39.000000000 +0200
@@ -2,6 +2,13 @@
See also the hledger and the project change logs.
+# 1.2 (2016/3/31)
+
+Accounts with ? in name had empty registers (fixes #498) (Bryan Richter)
+
+Allow megaparsec 5.2 (fixes #503)
+
+
# 1.1 (2016/12/31)
- add --host option (#429)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/Hledger/Web/WebOptions.hs new/hledger-web-1.2/Hledger/Web/WebOptions.hs
--- old/hledger-web-1.1/Hledger/Web/WebOptions.hs 2016-12-31 16:46:45.000000000 +0100
+++ new/hledger-web-1.2/Hledger/Web/WebOptions.hs 2017-03-29 17:00:51.000000000 +0200
@@ -85,7 +85,7 @@
checkWebOpts :: WebOpts -> WebOpts
checkWebOpts wopts =
- either optserror (const wopts) $ do
+ either usageError (const wopts) $ do
let h = host_ wopts
if any (not . (`elem` ".0123456789")) h
then Left $ "--host requires an IP address, not "++show h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/doc/hledger-web.1 new/hledger-web-1.2/doc/hledger-web.1
--- old/hledger-web-1.1/doc/hledger-web.1 2016-12-31 20:22:38.000000000 +0100
+++ new/hledger-web-1.2/doc/hledger-web.1 2017-04-01 02:53:13.000000000 +0200
@@ -1,5 +1,5 @@
-.TH "hledger\-web" "1" "December 2016" "hledger\-web 1.1" "hledger User Manuals"
+.TH "hledger\-web" "1" "March 2017" "hledger\-web 1.2" "hledger User Manuals"
@@ -13,8 +13,6 @@
.P
.PD
\f[C]hledger\ web\ \-\-\ [OPTIONS]\f[]
-.PP
-.PP
.SH DESCRIPTION
.PP
hledger is a cross\-platform program for tracking money, time, or any
@@ -49,18 +47,8 @@
In this mode the web app will keep running for as long as you have it
open in a browser window, and will exit after two minutes of inactivity
(no requests and no browser windows viewing it).
-.IP
-.nf
-\f[C]
-$\ hledger\ web
-Starting\ web\ app\ on\ port\ 5000\ with\ base\ url\ http://localhost:5000
-Starting\ web\ browser\ if\ possible
-Web\ app\ will\ auto\-exit\ after\ a\ few\ minutes\ with\ no\ browsers\ (or\ press\ ctrl\-c)
-\f[]
-.fi
-.PP
-With \f[C]\-\-serve\f[], it starts the web app in non\-transient mode
-and logs requests to the console.
+With \f[C]\-\-serve\f[], it just runs the web app without exiting, and
+logs requests to the console.
.PP
By default the server listens on IP address 127.0.0.1, accessible only
to local requests.
@@ -102,19 +90,23 @@
Note: if invoking hledger\-web as a hledger subcommand, write
\f[C]\-\-\f[] before options as shown above.
.TP
-.B \f[C]\-\-server\f[]
-disable browser\-opening and auto\-exit\-on\-idle, and log all requests
-to stdout
+.B \f[C]\-\-serve\f[]
+serve and log requests, don\[aq]t browse or auto\-exit
+.RS
+.RE
+.TP
+.B \f[C]\-\-host=IPADDR\f[]
+listen on this IP address (default: 127.0.0.1)
.RS
.RE
.TP
.B \f[C]\-\-port=PORT\f[]
-set the TCP port to listen on (default: 5000)
+listen on this TCP port (default: 5000)
.RS
.RE
.TP
.B \f[C]\-\-base\-url=URL\f[]
-set the base url (default: http://localhost:PORT)
+set the base url (default: http://IPADDR:PORT)
You would change this when sharing over the network, or integrating
within a larger website.
.RS
@@ -128,57 +120,37 @@
.RS
.RE
.PP
-hledger general options:
-.TP
-.B \f[C]\-h\f[]
-show general usage (or after COMMAND, the command\[aq]s usage)
-.RS
-.RE
-.TP
-.B \f[C]\-\-help\f[]
-show the current program\[aq]s manual as plain text (or after an add\-on
-COMMAND, the add\-on\[aq]s manual)
-.RS
-.RE
-.TP
-.B \f[C]\-\-man\f[]
-show the current program\[aq]s manual with man
-.RS
-.RE
-.TP
-.B \f[C]\-\-info\f[]
-show the current program\[aq]s manual with info
-.RS
-.RE
+hledger input options:
.TP
-.B \f[C]\-\-version\f[]
-show version
+.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
+use a different input file.
+For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or
+\f[C]$HOME/.hledger.journal\f[])
.RS
.RE
.TP
-.B \f[C]\-\-debug[=N]\f[]
-show debug output (levels 1\-9, default: 1)
+.B \f[C]\-\-rules\-file=RULESFILE\f[]
+Conversion rules file to use when reading CSV (default: FILE.rules)
.RS
.RE
.TP
-.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
-use a different input file.
-For stdin, use \-
+.B \f[C]\-\-alias=OLD=NEW\f[]
+rename accounts named OLD to NEW
.RS
.RE
.TP
-.B \f[C]\-\-rules\-file=RULESFILE\f[]
-Conversion rules file to use when reading CSV (default: FILE.rules)
+.B \f[C]\-\-anon\f[]
+anonymize accounts and payees
.RS
.RE
.TP
-.B \f[C]\-\-alias=OLD=NEW\f[]
-display accounts named OLD as NEW
+.B \f[C]\-\-pivot\ TAGNAME\f[]
+use some other field/tag for account names
.RS
.RE
.TP
.B \f[C]\-I\ \-\-ignore\-assertions\f[]
-ignore any failing balance assertions in the journal
+ignore any failing balance assertions
.RS
.RE
.PP
@@ -266,20 +238,42 @@
.RS
.RE
.TP
-.B \f[C]\-\-pivot\ TAG\f[]
-will transform the journal before any other processing by replacing the
-account name of every posting having the tag TAG with content VALUE by
-the account name "TAG:VALUE".
-The TAG will only match if it is a full\-length match.
-The pivot will only happen if the TAG is on a posting, not if it is on
-the transaction.
-If the tag value is a multi:level:account:name the new account name will
-be "TAG:multi:level:account:name".
+.B \f[C]\-V\ \-\-value\f[]
+convert amounts to their market value on the report end date (using the
+most recent applicable market price, if any)
.RS
.RE
+.PP
+hledger help options:
.TP
-.B \f[C]\-\-anon\f[]
-show anonymized accounts and payees
+.B \f[C]\-h\f[]
+show general usage (or after COMMAND, command usage)
+.RS
+.RE
+.TP
+.B \f[C]\-\-help\f[]
+show this program\[aq]s manual as plain text (or after an add\-on
+COMMAND, the add\-on\[aq]s manual)
+.RS
+.RE
+.TP
+.B \f[C]\-\-man\f[]
+show this program\[aq]s manual with man
+.RS
+.RE
+.TP
+.B \f[C]\-\-info\f[]
+show this program\[aq]s manual with info
+.RS
+.RE
+.TP
+.B \f[C]\-\-version\f[]
+show version
+.RS
+.RE
+.TP
+.B \f[C]\-\-debug[=N]\f[]
+show debug output (levels 1\-9, default: 1)
.RS
.RE
.SH ENVIRONMENT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/doc/hledger-web.1.info new/hledger-web-1.2/doc/hledger-web.1.info
--- old/hledger-web-1.1/doc/hledger-web.1.info 2016-12-31 20:22:35.000000000 +0100
+++ new/hledger-web-1.2/doc/hledger-web.1.info 2017-04-01 02:53:10.000000000 +0200
@@ -1,77 +1,68 @@
-This is hledger-web/doc/hledger-web.1.info, produced by makeinfo
-version 4.8 from stdin.
+This is hledger-web.1.info, produced by makeinfo version 6.0 from stdin.
-File: hledger-web.1.info, Node: Top, Up: (dir)
+File: hledger-web.1.info, Node: Top, Next: OPTIONS, Up: (dir)
-hledger-web(1) hledger-web 1.1
+hledger-web(1) hledger-web 1.2
******************************
-hledger-web is hledger's web interface. It starts a simple web
+hledger-web is hledger's web interface. It starts a simple web
application for browsing and adding transactions, and optionally opens
-it in a web browser window if possible. It provides a more user-friendly
-UI than the hledger CLI or hledger-ui interface, showing more at once
-(accounts, the current account register, balance charts) and allowing
-history-aware data entry, interactive searching, and bookmarking.
+it in a web browser window if possible. It provides a more
+user-friendly UI than the hledger CLI or hledger-ui interface, showing
+more at once (accounts, the current account register, balance charts)
+and allowing history-aware data entry, interactive searching, and
+bookmarking.
hledger-web also lets you share a ledger with multiple users, or even
-the public web. There is no access control, so if you need that you
-should put it behind a suitable web proxy. As a small protection against
-data loss when running an unprotected instance, it writes a numbered
-backup of the main journal file (only ?) on every edit.
+the public web. There is no access control, so if you need that you
+should put it behind a suitable web proxy. As a small protection
+against data loss when running an unprotected instance, it writes a
+numbered backup of the main journal file (only ?) on every edit.
Like hledger, it reads data from one or more files in hledger
-journal, timeclock, timedot, or CSV format specified with `-f', or
-`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps
-`C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
+journal, timeclock, timedot, or CSV format specified with '-f', or
+'$LEDGER_FILE', or '$HOME/.hledger.journal' (on windows, perhaps
+'C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
hledger_journal(5) etc.
By default, hledger-web starts the web app in "transient mode" and
-also opens it in your default web browser if possible. In this mode the
+also opens it in your default web browser if possible. In this mode the
web app will keep running for as long as you have it open in a browser
window, and will exit after two minutes of inactivity (no requests and
-no browser windows viewing it).
-
-
-$ hledger web
-Starting web app on port 5000 with base url http://localhost:5000
-Starting web browser if possible
-Web app will auto-exit after a few minutes with no browsers (or press ctrl-c)
-
- With `--serve', it starts the web app in non-transient mode and logs
-requests to the console.
+no browser windows viewing it). With '--serve', it just runs the web
+app without exiting, and logs requests to the console.
By default the server listens on IP address 127.0.0.1, accessible
-only to local requests. You can use `--host' to change this, eg `--host
+only to local requests. You can use '--host' to change this, eg '--host
0.0.0.0' to listen on all configured addresses.
- Similarly, use `--port' to set a TCP port other than 5000, eg if you
+ Similarly, use '--port' to set a TCP port other than 5000, eg if you
are running multiple hledger-web instances.
- You can use `--base-url' to change the protocol, hostname, port and
+ You can use '--base-url' to change the protocol, hostname, port and
path that appear in hyperlinks, useful eg for integrating hledger-web
-within a larger website. The default is `http://HOST:PORT/' using the
-server's configured host address and TCP port (or `http://HOST' if PORT
+within a larger website. The default is 'http://HOST:PORT/' using the
+server's configured host address and TCP port (or 'http://HOST' if PORT
is 80).
- With `--file-url' you can set a different base url for static files,
+ With '--file-url' you can set a different base url for static files,
eg for better caching or cookie-less serving on high performance
websites.
Note there is no built-in access control (aside from listening on
-127.0.0.1 by default). So you will need to hide hledger-web behind an
+127.0.0.1 by default). So you will need to hide hledger-web behind an
authenticating proxy (such as apache or nginx) if you want to restrict
who can see and add entries to your journal.
Command-line options and arguments may be used to set an initial
-filter on the data. This is not shown in the web UI, but it will be
+filter on the data. This is not shown in the web UI, but it will be
applied in addition to any search query entered there.
With journal and timeclock files (but not CSV files, currently) the
web app detects changes made by other means and will show the new data
-on the next request. If a change makes the file unparseable, hledger-web
-will show an error until the file has been fixed.
-
+on the next request. If a change makes the file unparseable,
+hledger-web will show an error until the file has been fixed.
* Menu:
* OPTIONS::
@@ -82,129 +73,135 @@
1 OPTIONS
*********
-Note: if invoking hledger-web as a hledger subcommand, write `--'
-before options as shown above.
+Note: if invoking hledger-web as a hledger subcommand, write '--' before
+options as shown above.
-`--server'
- disable browser-opening and auto-exit-on-idle, and log all
- requests to stdout
-
-`--port=PORT'
- set the TCP port to listen on (default: 5000)
-
-`--base-url=URL'
- set the base url (default: http://localhost:PORT) You would
- change this when sharing over the network, or integrating within a
- larger website.
+'--serve'
-`--file-url=URL'
- set the static files url (default: BASEURL/static). hledger-web
- normally serves static files itself, but if you wanted to serve
- them from another server for efficiency, you would set the url
- with this.
+ serve and log requests, don't browse or auto-exit
+'--host=IPADDR'
- hledger general options:
+ listen on this IP address (default: 127.0.0.1)
+'--port=PORT'
-`-h'
- show general usage (or after COMMAND, the command's usage)
+ listen on this TCP port (default: 5000)
+'--base-url=URL'
-`--help'
- show the current program's manual as plain text (or after an add-on
- COMMAND, the add-on's manual)
+ set the base url (default: http://IPADDR:PORT) You would change
+ this when sharing over the network, or integrating within a larger
+ website.
+'--file-url=URL'
-`--man'
- show the current program's manual with man
+ set the static files url (default: BASEURL/static). hledger-web
+ normally serves static files itself, but if you wanted to serve
+ them from another server for efficiency, you would set the url with
+ this.
-`--info'
- show the current program's manual with info
+ hledger input options:
-`--version'
- show version
+'-f FILE --file=FILE'
-`--debug[=N]'
- show debug output (levels 1-9, default: 1)
+ use a different input file. For stdin, use - (default:
+ '$LEDGER_FILE' or '$HOME/.hledger.journal')
+'--rules-file=RULESFILE'
-`-f FILE --file=FILE'
- use a different input file. For stdin, use -
-
-`--rules-file=RULESFILE'
Conversion rules file to use when reading CSV (default: FILE.rules)
+'--alias=OLD=NEW'
+
+ rename accounts named OLD to NEW
+'--anon'
-`--alias=OLD=NEW'
- display accounts named OLD as NEW
+ anonymize accounts and payees
+'--pivot TAGNAME'
-`-I --ignore-assertions'
- ignore any failing balance assertions in the journal
+ use some other field/tag for account names
+'-I --ignore-assertions'
+
+ ignore any failing balance assertions
hledger reporting options:
-`-b --begin=DATE'
+'-b --begin=DATE'
+
include postings/txns on or after this date
+'-e --end=DATE'
-`-e --end=DATE'
include postings/txns before this date
+'-D --daily'
-`-D --daily'
multiperiod/multicolumn report by day
+'-W --weekly'
-`-W --weekly'
multiperiod/multicolumn report by week
+'-M --monthly'
-`-M --monthly'
multiperiod/multicolumn report by month
+'-Q --quarterly'
-`-Q --quarterly'
multiperiod/multicolumn report by quarter
+'-Y --yearly'
-`-Y --yearly'
multiperiod/multicolumn report by year
+'-p --period=PERIODEXP'
-`-p --period=PERIODEXP'
set start date, end date, and/or reporting interval all at once
(overrides the flags above)
+'--date2'
-`--date2'
show, and match with -b/-e/-p/date:, secondary dates instead
+'-C --cleared'
-`-C --cleared'
include only cleared postings/txns
+'--pending'
-`--pending'
include only pending postings/txns
+'-U --uncleared'
-`-U --uncleared'
include only uncleared (and pending) postings/txns
+'-R --real'
-`-R --real'
include only non-virtual postings
+'--depth=N'
-`--depth=N'
hide accounts/postings deeper than N
+'-E --empty'
-`-E --empty'
show items with zero amount, normally hidden
+'-B --cost'
-`-B --cost'
convert amounts to their cost at transaction time (using the
transaction price, if any)
+'-V --value'
+
+ convert amounts to their market value on the report end date (using
+ the most recent applicable market price, if any)
-`--pivot TAG'
- will transform the journal before any other processing by
- replacing the account name of every posting having the tag TAG
- with content VALUE by the account name "TAG:VALUE". The TAG will
- only match if it is a full-length match. The pivot will only
- happen if the TAG is on a posting, not if it is on the
- transaction. If the tag value is a multi:level:account:name the
- new account name will be "TAG:multi:level:account:name".
+ hledger help options:
-`--anon'
- show anonymized accounts and payees
+'-h'
+
+ show general usage (or after COMMAND, command usage)
+'--help'
+
+ show this program's manual as plain text (or after an add-on
+ COMMAND, the add-on's manual)
+'--man'
+ show this program's manual with man
+'--info'
+
+ show this program's manual with info
+'--version'
+
+ show version
+'--debug[=N]'
+
+ show debug output (levels 1-9, default: 1)
Tag Table:
-Node: Top90
-Node: OPTIONS3343
-Ref: #options3430
+Node: Top74
+Node: OPTIONS3156
+Ref: #options3243
End Tag Table
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/doc/hledger-web.1.txt new/hledger-web-1.2/doc/hledger-web.1.txt
--- old/hledger-web-1.1/doc/hledger-web.1.txt 2016-12-31 20:22:38.000000000 +0100
+++ new/hledger-web-1.2/doc/hledger-web.1.txt 2017-04-01 02:53:13.000000000 +0200
@@ -10,8 +10,6 @@
hledger-web [OPTIONS]
hledger web -- [OPTIONS]
-
-
DESCRIPTION
hledger is a cross-platform program for tracking money, time, or any
other commodity, using double-entry accounting and a simple, editable
@@ -41,15 +39,8 @@
opens it in your default web browser if possible. In this mode the web
app will keep running for as long as you have it open in a browser win-
dow, and will exit after two minutes of inactivity (no requests and no
- browser windows viewing it).
-
- $ hledger web
- Starting web app on port 5000 with base url http://localhost:5000
- Starting web browser if possible
- Web app will auto-exit after a few minutes with no browsers (or press ctrl-c)
-
- With --serve, it starts the web app in non-transient mode and logs
- requests to the console.
+ browser windows viewing it). With --serve, it just runs the web app
+ without exiting, and logs requests to the console.
By default the server listens on IP address 127.0.0.1, accessible only
to local requests. You can use --host to change this, eg
@@ -84,53 +75,46 @@
Note: if invoking hledger-web as a hledger subcommand, write -- before
options as shown above.
- --server
- disable browser-opening and auto-exit-on-idle, and log all
- requests to stdout
+ --serve
+ serve and log requests, don't browse or auto-exit
+
+ --host=IPADDR
+ listen on this IP address (default: 127.0.0.1)
--port=PORT
- set the TCP port to listen on (default: 5000)
+ listen on this TCP port (default: 5000)
--base-url=URL
- set the base url (default: http://localhost:PORT) You would
+ set the base url (default: http://IPADDR:PORT) You would
change this when sharing over the network, or integrating within
a larger website.
--file-url=URL
set the static files url (default: BASEURL/static). hledger-web
- normally serves static files itself, but if you wanted to serve
- them from another server for efficiency, you would set the url
+ normally serves static files itself, but if you wanted to serve
+ them from another server for efficiency, you would set the url
with this.
- hledger general options:
-
- -h show general usage (or after COMMAND, the command's usage)
-
- --help show the current program's manual as plain text (or after an
- add-on COMMAND, the add-on's manual)
-
- --man show the current program's manual with man
-
- --info show the current program's manual with info
-
- --version
- show version
-
- --debug[=N]
- show debug output (levels 1-9, default: 1)
+ hledger input options:
-f FILE --file=FILE
- use a different input file. For stdin, use -
+ use a different input file. For stdin, use - (default:
+ $LEDGER_FILE or $HOME/.hledger.journal)
--rules-file=RULESFILE
- Conversion rules file to use when reading CSV (default:
+ Conversion rules file to use when reading CSV (default:
FILE.rules)
--alias=OLD=NEW
- display accounts named OLD as NEW
+ rename accounts named OLD to NEW
+
+ --anon anonymize accounts and payees
+
+ --pivot TAGNAME
+ use some other field/tag for account names
-I --ignore-assertions
- ignore any failing balance assertions in the journal
+ ignore any failing balance assertions
hledger reporting options:
@@ -156,7 +140,7 @@
multiperiod/multicolumn report by year
-p --period=PERIODEXP
- set start date, end date, and/or reporting interval all at once
+ set start date, end date, and/or reporting interval all at once
(overrides the flags above)
--date2
@@ -181,33 +165,43 @@
show items with zero amount, normally hidden
-B --cost
- convert amounts to their cost at transaction time (using the
+ convert amounts to their cost at transaction time (using the
transaction price, if any)
- --pivot TAG
- will transform the journal before any other processing by
- replacing the account name of every posting having the tag TAG
- with content VALUE by the account name "TAG:VALUE". The TAG
- will only match if it is a full-length match. The pivot will
- only happen if the TAG is on a posting, not if it is on the
- transaction. If the tag value is a multi:level:account:name the
- new account name will be "TAG:multi:level:account:name".
+ -V --value
+ convert amounts to their market value on the report end date
+ (using the most recent applicable market price, if any)
+
+ hledger help options:
+
+ -h show general usage (or after COMMAND, command usage)
+
+ --help show this program's manual as plain text (or after an add-on
+ COMMAND, the add-on's manual)
+
+ --man show this program's manual with man
- --anon show anonymized accounts and payees
+ --info show this program's manual with info
+
+ --version
+ show version
+
+ --debug[=N]
+ show debug output (levels 1-9, default: 1)
ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default:
- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
FILES
- Reads data from one or more files in hledger journal, timeclock, time-
- dot, or CSV format specified with -f, or $LEDGER_FILE, or
- $HOME/.hledger.journal (on windows, perhaps
+ Reads data from one or more files in hledger journal, timeclock, time-
+ dot, or CSV format specified with -f, or $LEDGER_FILE, or
+ $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
- The need to precede options with -- when invoked from hledger is awk-
+ The need to precede options with -- when invoked from hledger is awk-
ward.
-f- doesn't work (hledger-web can't read from stdin).
@@ -221,7 +215,7 @@
REPORTING BUGS
- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@@ -235,7 +229,7 @@
SEE ALSO
- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@@ -243,4 +237,4 @@
-hledger-web 1.1 December 2016 hledger-web(1)
+hledger-web 1.2 March 2017 hledger-web(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-web-1.1/hledger-web.cabal new/hledger-web-1.2/hledger-web.cabal
--- old/hledger-web-1.1/hledger-web.cabal 2016-12-31 16:54:47.000000000 +0100
+++ new/hledger-web-1.2/hledger-web.cabal 2017-04-01 02:56:37.000000000 +0200
@@ -1,11 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger-web
-version: 1.1
-stability: stable
-category: Finance
+version: 1.2
synopsis: Web interface for the hledger accounting tool
description: This is hledger's web interface.
It provides a more user-friendly and collaborative UI than the
@@ -17,298 +15,300 @@
with ledger(1). hledger provides command-line, curses and web
interfaces, and aims to be a reliable, practical tool for daily
use.
-license: GPL
-license-file: LICENSE
-author: Simon Michael <simon(a)joyful.com>
-maintainer: Simon Michael <simon(a)joyful.com>
+category: Finance
+stability: stable
homepage: http://hledger.org
bug-reports: http://bugs.hledger.org
-cabal-version: >= 1.10
-build-type: Simple
+author: Simon Michael <simon(a)joyful.com>
+maintainer: Simon Michael <simon(a)joyful.com>
+license: GPL-3
+license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
- CHANGES
- config/favicon.ico
- config/keter.yaml
- config/robots.txt
- config/routes
- config/settings.yml
- messages/en.msg
- README
- static/css/bootstrap-theme.css
- static/css/bootstrap-theme.css.map
- static/css/bootstrap-theme.min.css
- static/css/bootstrap.css
- static/css/bootstrap.css.map
- static/css/bootstrap.min.css
- static/fonts/glyphicons-halflings-regular.eot
- static/fonts/glyphicons-halflings-regular.svg
- static/fonts/glyphicons-halflings-regular.ttf
- static/fonts/glyphicons-halflings-regular.woff
- static/hledger.css
- static/hledger.js
- static/js/bootstrap.js
- static/js/bootstrap.min.js
- static/js/excanvas.js
- static/js/excanvas.min.js
- static/js/jquery.cookie.js
- static/js/jquery.flot.canvas.js
- static/js/jquery.flot.canvas.min.js
- static/js/jquery.flot.categories.js
- static/js/jquery.flot.categories.min.js
- static/js/jquery.flot.crosshair.js
- static/js/jquery.flot.crosshair.min.js
- static/js/jquery.flot.errorbars.js
- static/js/jquery.flot.errorbars.min.js
- static/js/jquery.flot.fillbetween.js
- static/js/jquery.flot.fillbetween.min.js
- static/js/jquery.flot.image.js
- static/js/jquery.flot.image.min.js
- static/js/jquery.flot.js
- static/js/jquery.flot.min.js
- static/js/jquery.flot.navigate.js
- static/js/jquery.flot.navigate.min.js
- static/js/jquery.flot.pie.js
- static/js/jquery.flot.pie.min.js
- static/js/jquery.flot.resize.js
- static/js/jquery.flot.resize.min.js
- static/js/jquery.flot.selection.js
- static/js/jquery.flot.selection.min.js
- static/js/jquery.flot.stack.js
- static/js/jquery.flot.stack.min.js
- static/js/jquery.flot.symbol.js
- static/js/jquery.flot.symbol.min.js
- static/js/jquery.flot.threshold.js
- static/js/jquery.flot.threshold.min.js
- static/js/jquery.flot.time.js
- static/js/jquery.flot.time.min.js
- static/js/jquery.flot.tooltip.js
- static/js/jquery.flot.tooltip.min.js
- static/js/jquery.hotkeys.js
- static/js/jquery.js
- static/js/jquery.min.js
- static/js/jquery.url.js
- static/js/typeahead.bundle.js
- static/js/typeahead.bundle.min.js
- templates/default-layout-wrapper.hamlet
- templates/default-layout.hamlet
+ CHANGES
+ config/favicon.ico
+ config/keter.yaml
+ config/robots.txt
+ config/routes
+ config/settings.yml
+ messages/en.msg
+ README
+ static/css/bootstrap-theme.css
+ static/css/bootstrap-theme.css.map
+ static/css/bootstrap-theme.min.css
+ static/css/bootstrap.css
+ static/css/bootstrap.css.map
+ static/css/bootstrap.min.css
+ static/fonts/glyphicons-halflings-regular.eot
+ static/fonts/glyphicons-halflings-regular.svg
+ static/fonts/glyphicons-halflings-regular.ttf
+ static/fonts/glyphicons-halflings-regular.woff
+ static/hledger.css
+ static/hledger.js
+ static/js/bootstrap.js
+ static/js/bootstrap.min.js
+ static/js/excanvas.js
+ static/js/excanvas.min.js
+ static/js/jquery.cookie.js
+ static/js/jquery.flot.canvas.js
+ static/js/jquery.flot.canvas.min.js
+ static/js/jquery.flot.categories.js
+ static/js/jquery.flot.categories.min.js
+ static/js/jquery.flot.crosshair.js
+ static/js/jquery.flot.crosshair.min.js
+ static/js/jquery.flot.errorbars.js
+ static/js/jquery.flot.errorbars.min.js
+ static/js/jquery.flot.fillbetween.js
+ static/js/jquery.flot.fillbetween.min.js
+ static/js/jquery.flot.image.js
+ static/js/jquery.flot.image.min.js
+ static/js/jquery.flot.js
+ static/js/jquery.flot.min.js
+ static/js/jquery.flot.navigate.js
+ static/js/jquery.flot.navigate.min.js
+ static/js/jquery.flot.pie.js
+ static/js/jquery.flot.pie.min.js
+ static/js/jquery.flot.resize.js
+ static/js/jquery.flot.resize.min.js
+ static/js/jquery.flot.selection.js
+ static/js/jquery.flot.selection.min.js
+ static/js/jquery.flot.stack.js
+ static/js/jquery.flot.stack.min.js
+ static/js/jquery.flot.symbol.js
+ static/js/jquery.flot.symbol.min.js
+ static/js/jquery.flot.threshold.js
+ static/js/jquery.flot.threshold.min.js
+ static/js/jquery.flot.time.js
+ static/js/jquery.flot.time.min.js
+ static/js/jquery.flot.tooltip.js
+ static/js/jquery.flot.tooltip.min.js
+ static/js/jquery.hotkeys.js
+ static/js/jquery.js
+ static/js/jquery.min.js
+ static/js/jquery.url.js
+ static/js/typeahead.bundle.js
+ static/js/typeahead.bundle.min.js
+ templates/default-layout-wrapper.hamlet
+ templates/default-layout.hamlet
data-files:
- doc/hledger-web.1
- doc/hledger-web.1.info
- doc/hledger-web.1.txt
+ doc/hledger-web.1
+ doc/hledger-web.1.info
+ doc/hledger-web.1.txt
source-repository head
- type: git
- location: https://github.com/simonmichael/hledger
+ type: git
+ location: https://github.com/simonmichael/hledger
flag dev
- default: False
- description: Turn on development settings, like auto-reload templates.
- manual: False
+ description: Turn on development settings, like auto-reload templates.
+ manual: False
+ default: False
flag library-only
- default: False
- description: Build for use with "yesod devel"
- manual: False
+ description: Build for use with "yesod devel"
+ manual: False
+ default: False
flag oldtime
- description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
- manual: False
- default: False
+ description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
+ manual: False
+ default: False
flag threaded
- default: True
- description: Build with support for multithreaded execution.
- manual: False
+ description: Build with support for multithreaded execution.
+ manual: False
+ default: True
library
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , megaparsec >=5.0 && < 5.3
+ , mtl
+ if (flag(dev)) || (flag(library-only))
+ cpp-options: -DDEVELOPMENT
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , megaparsec >=5.0 && < 5.2
- , mtl
- if (flag(dev)) || (flag(library-only))
- cpp-options: -DDEVELOPMENT
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- exposed-modules:
- Application
- Foundation
- Handler.AddForm
- Handler.Common
- Handler.JournalR
- Handler.RegisterR
- Handler.RootR
- Handler.SidebarR
- Handler.Utils
- Hledger.Web
- Hledger.Web.Main
- Hledger.Web.WebOptions
- Import
- Settings
- Settings.Development
- Settings.StaticFiles
- other-modules:
- Paths_hledger_web
- default-language: Haskell2010
+ time >=1.5
+ if impl(ghc <7.6)
+ build-depends:
+ ghc-prim
+ exposed-modules:
+ Application
+ Foundation
+ Handler.AddForm
+ Handler.Common
+ Handler.JournalR
+ Handler.RegisterR
+ Handler.RootR
+ Handler.SidebarR
+ Handler.Utils
+ Hledger.Web
+ Hledger.Web.Main
+ Hledger.Web.WebOptions
+ Import
+ Settings
+ Settings.Development
+ Settings.StaticFiles
+ other-modules:
+ Paths_hledger_web
+ default-language: Haskell2010
executable hledger-web
- main-is: main.hs
- hs-source-dirs:
- app
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ main-is: main.hs
+ hs-source-dirs:
+ app
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , parsec >=3
+ , hledger-web == 1.2
+ if flag(library-only)
+ buildable: False
+ if flag(threaded)
+ ghc-options: -threaded
+ if flag(dev)
+ ghc-options: -O0
+ if flag(dev)
+ cpp-options: -DDEVELOPMENT
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
+ build-depends:
+ time >=1.5
+ if impl(ghc <7.6)
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , parsec >=3
- , hledger-web == 1.1
- if flag(library-only)
- buildable: False
- if flag(threaded)
- ghc-options: -threaded
- if flag(dev)
- ghc-options: -O0
- if flag(dev)
- cpp-options: -DDEVELOPMENT
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- default-language: Haskell2010
+ ghc-prim
+ default-language: Haskell2010
test-suite test
- type: exitcode-stdio-1.0
- main-is: main.hs
- other-modules:
- HomeTest
- TestImport
- hs-source-dirs:
- tests
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ type: exitcode-stdio-1.0
+ main-is: main.hs
+ hs-source-dirs:
+ tests
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , hledger-web == 1.2
+ , hspec
+ , yesod-test
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
+ build-depends:
+ time >=1.5
+ if impl(ghc <7.6)
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , hledger-web == 1.1
- , hspec
- , yesod-test
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- default-language: Haskell2010
+ ghc-prim
+ other-modules:
+ HomeTest
+ TestImport
+ default-language: Haskell2010
++++++ hledger-web.cabal ++++++
--- /var/tmp/diff_new_pack.r0rnvq/_old 2017-08-31 20:48:58.642497714 +0200
+++ /var/tmp/diff_new_pack.r0rnvq/_new 2017-08-31 20:48:58.646497153 +0200
@@ -1,12 +1,10 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger-web
-version: 1.1
+version: 1.2
x-revision: 1
-stability: stable
-category: Finance
synopsis: Web interface for the hledger accounting tool
description: This is hledger's web interface.
It provides a more user-friendly and collaborative UI than the
@@ -18,298 +16,300 @@
with ledger(1). hledger provides command-line, curses and web
interfaces, and aims to be a reliable, practical tool for daily
use.
-license: GPL
-license-file: LICENSE
-author: Simon Michael <simon(a)joyful.com>
-maintainer: Simon Michael <simon(a)joyful.com>
+category: Finance
+stability: stable
homepage: http://hledger.org
bug-reports: http://bugs.hledger.org
-cabal-version: >= 1.10
-build-type: Simple
+author: Simon Michael <simon(a)joyful.com>
+maintainer: Simon Michael <simon(a)joyful.com>
+license: GPL-3
+license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
- CHANGES
- config/favicon.ico
- config/keter.yaml
- config/robots.txt
- config/routes
- config/settings.yml
- messages/en.msg
- README
- static/css/bootstrap-theme.css
- static/css/bootstrap-theme.css.map
- static/css/bootstrap-theme.min.css
- static/css/bootstrap.css
- static/css/bootstrap.css.map
- static/css/bootstrap.min.css
- static/fonts/glyphicons-halflings-regular.eot
- static/fonts/glyphicons-halflings-regular.svg
- static/fonts/glyphicons-halflings-regular.ttf
- static/fonts/glyphicons-halflings-regular.woff
- static/hledger.css
- static/hledger.js
- static/js/bootstrap.js
- static/js/bootstrap.min.js
- static/js/excanvas.js
- static/js/excanvas.min.js
- static/js/jquery.cookie.js
- static/js/jquery.flot.canvas.js
- static/js/jquery.flot.canvas.min.js
- static/js/jquery.flot.categories.js
- static/js/jquery.flot.categories.min.js
- static/js/jquery.flot.crosshair.js
- static/js/jquery.flot.crosshair.min.js
- static/js/jquery.flot.errorbars.js
- static/js/jquery.flot.errorbars.min.js
- static/js/jquery.flot.fillbetween.js
- static/js/jquery.flot.fillbetween.min.js
- static/js/jquery.flot.image.js
- static/js/jquery.flot.image.min.js
- static/js/jquery.flot.js
- static/js/jquery.flot.min.js
- static/js/jquery.flot.navigate.js
- static/js/jquery.flot.navigate.min.js
- static/js/jquery.flot.pie.js
- static/js/jquery.flot.pie.min.js
- static/js/jquery.flot.resize.js
- static/js/jquery.flot.resize.min.js
- static/js/jquery.flot.selection.js
- static/js/jquery.flot.selection.min.js
- static/js/jquery.flot.stack.js
- static/js/jquery.flot.stack.min.js
- static/js/jquery.flot.symbol.js
- static/js/jquery.flot.symbol.min.js
- static/js/jquery.flot.threshold.js
- static/js/jquery.flot.threshold.min.js
- static/js/jquery.flot.time.js
- static/js/jquery.flot.time.min.js
- static/js/jquery.flot.tooltip.js
- static/js/jquery.flot.tooltip.min.js
- static/js/jquery.hotkeys.js
- static/js/jquery.js
- static/js/jquery.min.js
- static/js/jquery.url.js
- static/js/typeahead.bundle.js
- static/js/typeahead.bundle.min.js
- templates/default-layout-wrapper.hamlet
- templates/default-layout.hamlet
+ CHANGES
+ config/favicon.ico
+ config/keter.yaml
+ config/robots.txt
+ config/routes
+ config/settings.yml
+ messages/en.msg
+ README
+ static/css/bootstrap-theme.css
+ static/css/bootstrap-theme.css.map
+ static/css/bootstrap-theme.min.css
+ static/css/bootstrap.css
+ static/css/bootstrap.css.map
+ static/css/bootstrap.min.css
+ static/fonts/glyphicons-halflings-regular.eot
+ static/fonts/glyphicons-halflings-regular.svg
+ static/fonts/glyphicons-halflings-regular.ttf
+ static/fonts/glyphicons-halflings-regular.woff
+ static/hledger.css
+ static/hledger.js
+ static/js/bootstrap.js
+ static/js/bootstrap.min.js
+ static/js/excanvas.js
+ static/js/excanvas.min.js
+ static/js/jquery.cookie.js
+ static/js/jquery.flot.canvas.js
+ static/js/jquery.flot.canvas.min.js
+ static/js/jquery.flot.categories.js
+ static/js/jquery.flot.categories.min.js
+ static/js/jquery.flot.crosshair.js
+ static/js/jquery.flot.crosshair.min.js
+ static/js/jquery.flot.errorbars.js
+ static/js/jquery.flot.errorbars.min.js
+ static/js/jquery.flot.fillbetween.js
+ static/js/jquery.flot.fillbetween.min.js
+ static/js/jquery.flot.image.js
+ static/js/jquery.flot.image.min.js
+ static/js/jquery.flot.js
+ static/js/jquery.flot.min.js
+ static/js/jquery.flot.navigate.js
+ static/js/jquery.flot.navigate.min.js
+ static/js/jquery.flot.pie.js
+ static/js/jquery.flot.pie.min.js
+ static/js/jquery.flot.resize.js
+ static/js/jquery.flot.resize.min.js
+ static/js/jquery.flot.selection.js
+ static/js/jquery.flot.selection.min.js
+ static/js/jquery.flot.stack.js
+ static/js/jquery.flot.stack.min.js
+ static/js/jquery.flot.symbol.js
+ static/js/jquery.flot.symbol.min.js
+ static/js/jquery.flot.threshold.js
+ static/js/jquery.flot.threshold.min.js
+ static/js/jquery.flot.time.js
+ static/js/jquery.flot.time.min.js
+ static/js/jquery.flot.tooltip.js
+ static/js/jquery.flot.tooltip.min.js
+ static/js/jquery.hotkeys.js
+ static/js/jquery.js
+ static/js/jquery.min.js
+ static/js/jquery.url.js
+ static/js/typeahead.bundle.js
+ static/js/typeahead.bundle.min.js
+ templates/default-layout-wrapper.hamlet
+ templates/default-layout.hamlet
data-files:
- doc/hledger-web.1
- doc/hledger-web.1.info
- doc/hledger-web.1.txt
+ doc/hledger-web.1
+ doc/hledger-web.1.info
+ doc/hledger-web.1.txt
source-repository head
- type: git
- location: https://github.com/simonmichael/hledger
+ type: git
+ location: https://github.com/simonmichael/hledger
flag dev
- default: False
- description: Turn on development settings, like auto-reload templates.
- manual: False
+ description: Turn on development settings, like auto-reload templates.
+ manual: False
+ default: False
flag library-only
- default: False
- description: Build for use with "yesod devel"
- manual: False
+ description: Build for use with "yesod devel"
+ manual: False
+ default: False
flag oldtime
- description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
- manual: False
- default: False
+ description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
+ manual: False
+ default: False
flag threaded
- default: True
- description: Build with support for multithreaded execution.
- manual: False
+ description: Build with support for multithreaded execution.
+ manual: False
+ default: True
library
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , megaparsec >=5.0 && < 5.4
+ , mtl
+ if (flag(dev)) || (flag(library-only))
+ cpp-options: -DDEVELOPMENT
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , megaparsec >=5.0 && < 5.3
- , mtl
- if (flag(dev)) || (flag(library-only))
- cpp-options: -DDEVELOPMENT
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- exposed-modules:
- Application
- Foundation
- Handler.AddForm
- Handler.Common
- Handler.JournalR
- Handler.RegisterR
- Handler.RootR
- Handler.SidebarR
- Handler.Utils
- Hledger.Web
- Hledger.Web.Main
- Hledger.Web.WebOptions
- Import
- Settings
- Settings.Development
- Settings.StaticFiles
- other-modules:
- Paths_hledger_web
- default-language: Haskell2010
+ time >=1.5
+ if impl(ghc <7.6)
+ build-depends:
+ ghc-prim
+ exposed-modules:
+ Application
+ Foundation
+ Handler.AddForm
+ Handler.Common
+ Handler.JournalR
+ Handler.RegisterR
+ Handler.RootR
+ Handler.SidebarR
+ Handler.Utils
+ Hledger.Web
+ Hledger.Web.Main
+ Hledger.Web.WebOptions
+ Import
+ Settings
+ Settings.Development
+ Settings.StaticFiles
+ other-modules:
+ Paths_hledger_web
+ default-language: Haskell2010
executable hledger-web
- main-is: main.hs
- hs-source-dirs:
- app
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ main-is: main.hs
+ hs-source-dirs:
+ app
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , parsec >=3
+ , hledger-web == 1.2
+ if flag(library-only)
+ buildable: False
+ if flag(threaded)
+ ghc-options: -threaded
+ if flag(dev)
+ ghc-options: -O0
+ if flag(dev)
+ cpp-options: -DDEVELOPMENT
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
+ build-depends:
+ time >=1.5
+ if impl(ghc <7.6)
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , parsec >=3
- , hledger-web == 1.1
- if flag(library-only)
- buildable: False
- if flag(threaded)
- ghc-options: -threaded
- if flag(dev)
- ghc-options: -O0
- if flag(dev)
- cpp-options: -DDEVELOPMENT
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- default-language: Haskell2010
+ ghc-prim
+ default-language: Haskell2010
test-suite test
- type: exitcode-stdio-1.0
- main-is: main.hs
- other-modules:
- HomeTest
- TestImport
- hs-source-dirs:
- tests
- ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ type: exitcode-stdio-1.0
+ main-is: main.hs
+ hs-source-dirs:
+ tests
+ ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
+ cpp-options: -DVERSION="1.2"
+ build-depends:
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
+ , base >=4.8 && <5
+ , base-compat >=0.8.1
+ , blaze-html
+ , blaze-markup
+ , bytestring
+ , clientsession
+ , cmdargs >=0.10 && <0.11
+ , data-default
+ , directory
+ , filepath
+ , hjsmin
+ , http-conduit
+ , http-client
+ , HUnit
+ , conduit-extra >=1.1
+ , safe >=0.2
+ , shakespeare >=2.0
+ , template-haskell
+ , text >=1.2 && <1.3
+ , transformers
+ , wai
+ , wai-extra
+ , wai-handler-launch >=1.3
+ , warp
+ , yaml
+ , yesod >=1.4 && <1.5
+ , yesod-core
+ , yesod-form
+ , yesod-static
+ , json
+ , hledger-web == 1.2
+ , hspec
+ , yesod-test
+ if flag(oldtime)
+ build-depends:
+ time <1.5
+ , old-locale
+ else
+ build-depends:
+ time >=1.5
+ if impl(ghc <7.6)
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
- , base >=4.8 && <5
- , base-compat >=0.8.1
- , blaze-html
- , blaze-markup
- , bytestring
- , clientsession
- , cmdargs >=0.10 && <0.11
- , data-default
- , directory
- , filepath
- , hjsmin
- , http-conduit
- , http-client
- , HUnit
- , conduit-extra >=1.1
- , safe >=0.2
- , shakespeare >=2.0
- , template-haskell
- , text >=1.2 && <1.3
- , transformers
- , wai
- , wai-extra
- , wai-handler-launch >=1.3
- , warp
- , yaml
- , yesod >=1.4 && <1.5
- , yesod-core
- , yesod-form
- , yesod-static
- , json
- , hledger-web == 1.1
- , hspec
- , yesod-test
- if flag(oldtime)
- build-depends:
- time <1.5
- , old-locale
- else
- build-depends:
- time >=1.5
- if impl(ghc <7.6)
- build-depends:
- ghc-prim
- default-language: Haskell2010
+ ghc-prim
+ other-modules:
+ HomeTest
+ TestImport
+ default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package hledger-ui for openSUSE:Factory checked in at 2017-08-31 20:48:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hledger-ui (Old)
and /work/SRC/openSUSE:Factory/.hledger-ui.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hledger-ui"
Thu Aug 31 20:48:54 2017 rev:2 rq:513568 version:1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hledger-ui/hledger-ui.changes 2017-04-18 13:51:30.449051163 +0200
+++ /work/SRC/openSUSE:Factory/.hledger-ui.new/hledger-ui.changes 2017-08-31 20:48:55.798896864 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:44 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.2 revision 3.
+
+-------------------------------------------------------------------
Old:
----
hledger-ui-1.1.2.tar.gz
New:
----
hledger-ui-1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hledger-ui.spec ++++++
--- /var/tmp/diff_new_pack.rjL3sQ/_old 2017-08-31 20:48:56.478801428 +0200
+++ /var/tmp/diff_new_pack.rjL3sQ/_new 2017-08-31 20:48:56.482800866 +0200
@@ -17,14 +17,14 @@
Name: hledger-ui
-Version: 1.1.2
+Version: 1.2
Release: 0
Summary: Curses-style user interface for the hledger accounting tool
License: GPL-3.0+
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.t…
-Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/2.cabal#/%{…
+Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/3.cabal#/%{…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-ansi-terminal-devel
++++++ hledger-ui-1.1.2.tar.gz -> hledger-ui-1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/CHANGES new/hledger-ui-1.2/CHANGES
--- old/hledger-ui-1.1.2/CHANGES 2017-01-25 20:16:23.000000000 +0100
+++ new/hledger-ui-1.2/CHANGES 2017-04-01 03:07:26.000000000 +0200
@@ -2,9 +2,18 @@
See also the hledger and project change logs.
-# 1.1.2 (2017/1/25)
+# 1.2 (2016/3/31)
+
+Fix a pattern match failure when pressing E on the transaction screen (fixes #508)
+
+Accounts with ? in name had empty registers (fixes #498) (Bryan Richter)
+
+Allow brick 0.16 (Joshua Chia) and brick 0.17/vty 0.15 (Peter Simons)
+
+Allow megaparsec 5.2 (fixes #503)
+
+Allow text-zipper 0.10
-- allow vty 0.15, brick 0.17 (#494)
# 1.1.1 (2017/1/20)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/Hledger/UI/RegisterScreen.hs new/hledger-ui-1.2/Hledger/UI/RegisterScreen.hs
--- old/hledger-ui-1.1.2/Hledger/UI/RegisterScreen.hs 2017-01-25 18:49:25.000000000 +0100
+++ new/hledger-ui-1.2/Hledger/UI/RegisterScreen.hs 2017-03-27 13:23:16.000000000 +0200
@@ -281,7 +281,10 @@
where
(pos,f) = case listSelectedElement rsList of
Nothing -> (endPos, journalFilePath j)
- Just (_, RegisterScreenItem{rsItemTransaction=Transaction{tsourcepos=GenericSourcePos f l c}}) -> (Just (l, Just c),f)
+ Just (_, RegisterScreenItem{
+ rsItemTransaction=Transaction{tsourcepos=GenericSourcePos f l c}}) -> (Just (l, Just c),f)
+ Just (_, RegisterScreenItem{
+ rsItemTransaction=Transaction{tsourcepos=JournalSourcePos f (l,_)}}) -> (Just (l, Nothing),f)
VtyEvent (EvKey (KChar 'H') []) -> continue $ regenerateScreens j d $ toggleHistorical ui
VtyEvent (EvKey (KChar 'F') []) -> scrollTop >> (continue $ regenerateScreens j d $ toggleFlat ui)
VtyEvent (EvKey (KChar 'Z') []) -> scrollTop >> (continue $ regenerateScreens j d $ toggleEmpty ui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/Hledger/UI/TransactionScreen.hs new/hledger-ui-1.2/Hledger/UI/TransactionScreen.hs
--- old/hledger-ui-1.1.2/Hledger/UI/TransactionScreen.hs 2017-01-11 21:09:58.000000000 +0100
+++ new/hledger-ui-1.2/Hledger/UI/TransactionScreen.hs 2017-03-27 13:23:16.000000000 +0200
@@ -128,7 +128,9 @@
VtyEvent (EvKey (KChar c) []) | c `elem` ['?'] -> continue $ setMode Help ui
VtyEvent (EvKey (KChar 'E') []) -> suspendAndResume $ void (runEditor pos f) >> uiReloadJournalIfChanged copts d j ui
where
- (pos,f) = let GenericSourcePos f l c = tsourcepos t in (Just (l, Just c),f)
+ (pos,f) = case tsourcepos t of
+ GenericSourcePos f l c -> (Just (l, Just c),f)
+ JournalSourcePos f (l1,_) -> (Just (l1, Nothing),f)
AppEvent (DateChange old _) | isStandardPeriod p && p `periodContainsDate` old ->
continue $ regenerateScreens j d $ setReportPeriod (DayPeriod d) ui
where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/Hledger/UI/UIOptions.hs new/hledger-ui-1.2/Hledger/UI/UIOptions.hs
--- old/hledger-ui-1.1.2/Hledger/UI/UIOptions.hs 2017-01-11 21:09:58.000000000 +0100
+++ new/hledger-ui-1.2/Hledger/UI/UIOptions.hs 2017-03-29 17:00:51.000000000 +0200
@@ -39,7 +39,6 @@
-- ,flagReq ["drop"] (\s opts -> Right $ setopt "drop" s opts) "N" "with --flat, omit this many leading account name components"
-- ,flagReq ["format"] (\s opts -> Right $ setopt "format" s opts) "FORMATSTR" "use this custom line format"
-- ,flagNone ["no-elide"] (\opts -> setboolopt "no-elide" opts) "don't compress empty parent accounts on one line"
- ,flagNone ["value","V"] (setboolopt "value") "show amounts as their current market value in their default valuation commodity (accounts screen)"
]
--uimode :: Mode [([Char], [Char])]
@@ -81,7 +80,7 @@
checkUIOpts :: UIOpts -> UIOpts
checkUIOpts opts =
- either optserror (const opts) $ do
+ either usageError (const opts) $ do
case maybestringopt "theme" $ rawopts_ $ cliopts_ opts of
Just t | not $ elem t themeNames -> Left $ "invalid theme name: "++t
_ -> Right ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/doc/hledger-ui.1 new/hledger-ui-1.2/doc/hledger-ui.1
--- old/hledger-ui-1.1.2/doc/hledger-ui.1 2017-01-25 20:17:40.000000000 +0100
+++ new/hledger-ui-1.2/doc/hledger-ui.1 2017-04-01 02:53:13.000000000 +0200
@@ -1,5 +1,5 @@
-.TH "hledger\-ui" "1" "January 2017" "hledger\-ui 1.1.2" "hledger User Manuals"
+.TH "hledger\-ui" "1" "March 2017" "hledger\-ui 1.2" "hledger User Manuals"
@@ -63,64 +63,38 @@
show full account names, unindented
.RS
.RE
-.TP
-.B \f[C]\-V\ \-\-value\f[]
-show amounts as their current market value in their default valuation
-commodity (accounts screen only)
-.RS
-.RE
.PP
-hledger general options:
-.TP
-.B \f[C]\-h\f[]
-show general usage (or after COMMAND, the command\[aq]s usage)
-.RS
-.RE
-.TP
-.B \f[C]\-\-help\f[]
-show the current program\[aq]s manual as plain text (or after an add\-on
-COMMAND, the add\-on\[aq]s manual)
-.RS
-.RE
-.TP
-.B \f[C]\-\-man\f[]
-show the current program\[aq]s manual with man
-.RS
-.RE
-.TP
-.B \f[C]\-\-info\f[]
-show the current program\[aq]s manual with info
-.RS
-.RE
+hledger input options:
.TP
-.B \f[C]\-\-version\f[]
-show version
+.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
+use a different input file.
+For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or
+\f[C]$HOME/.hledger.journal\f[])
.RS
.RE
.TP
-.B \f[C]\-\-debug[=N]\f[]
-show debug output (levels 1\-9, default: 1)
+.B \f[C]\-\-rules\-file=RULESFILE\f[]
+Conversion rules file to use when reading CSV (default: FILE.rules)
.RS
.RE
.TP
-.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
-use a different input file.
-For stdin, use \-
+.B \f[C]\-\-alias=OLD=NEW\f[]
+rename accounts named OLD to NEW
.RS
.RE
.TP
-.B \f[C]\-\-rules\-file=RULESFILE\f[]
-Conversion rules file to use when reading CSV (default: FILE.rules)
+.B \f[C]\-\-anon\f[]
+anonymize accounts and payees
.RS
.RE
.TP
-.B \f[C]\-\-alias=OLD=NEW\f[]
-display accounts named OLD as NEW
+.B \f[C]\-\-pivot\ TAGNAME\f[]
+use some other field/tag for account names
.RS
.RE
.TP
.B \f[C]\-I\ \-\-ignore\-assertions\f[]
-ignore any failing balance assertions in the journal
+ignore any failing balance assertions
.RS
.RE
.PP
@@ -208,20 +182,42 @@
.RS
.RE
.TP
-.B \f[C]\-\-pivot\ TAG\f[]
-will transform the journal before any other processing by replacing the
-account name of every posting having the tag TAG with content VALUE by
-the account name "TAG:VALUE".
-The TAG will only match if it is a full\-length match.
-The pivot will only happen if the TAG is on a posting, not if it is on
-the transaction.
-If the tag value is a multi:level:account:name the new account name will
-be "TAG:multi:level:account:name".
+.B \f[C]\-V\ \-\-value\f[]
+convert amounts to their market value on the report end date (using the
+most recent applicable market price, if any)
.RS
.RE
+.PP
+hledger help options:
.TP
-.B \f[C]\-\-anon\f[]
-show anonymized accounts and payees
+.B \f[C]\-h\f[]
+show general usage (or after COMMAND, command usage)
+.RS
+.RE
+.TP
+.B \f[C]\-\-help\f[]
+show this program\[aq]s manual as plain text (or after an add\-on
+COMMAND, the add\-on\[aq]s manual)
+.RS
+.RE
+.TP
+.B \f[C]\-\-man\f[]
+show this program\[aq]s manual with man
+.RS
+.RE
+.TP
+.B \f[C]\-\-info\f[]
+show this program\[aq]s manual with info
+.RS
+.RE
+.TP
+.B \f[C]\-\-version\f[]
+show version
+.RS
+.RE
+.TP
+.B \f[C]\-\-debug[=N]\f[]
+show debug output (levels 1\-9, default: 1)
.RS
.RE
.SH KEYS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/doc/hledger-ui.1.info new/hledger-ui-1.2/doc/hledger-ui.1.info
--- old/hledger-ui-1.1.2/doc/hledger-ui.1.info 2017-01-25 20:17:40.000000000 +0100
+++ new/hledger-ui-1.2/doc/hledger-ui.1.info 2017-04-01 02:53:11.000000000 +0200
@@ -1,24 +1,22 @@
-This is hledger-ui/doc/hledger-ui.1.info, produced by makeinfo version
-4.8 from stdin.
+This is hledger-ui.1.info, produced by makeinfo version 6.0 from stdin.
-File: hledger-ui.1.info, Node: Top, Up: (dir)
+File: hledger-ui.1.info, Node: Top, Next: OPTIONS, Up: (dir)
-hledger-ui(1) hledger-ui 1.1.2
-******************************
+hledger-ui(1) hledger-ui 1.2
+****************************
hledger-ui is hledger's curses-style interface, providing an efficient
full-window text UI for viewing accounts and transactions, and some
-limited data entry capability. It is easier than hledger's command-line
+limited data entry capability. It is easier than hledger's command-line
interface, and sometimes quicker and more convenient than the web
interface.
Like hledger, it reads data from one or more files in hledger
-journal, timeclock, timedot, or CSV format specified with `-f', or
-`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps
-`C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
+journal, timeclock, timedot, or CSV format specified with '-f', or
+'$LEDGER_FILE', or '$HOME/.hledger.journal' (on windows, perhaps
+'C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
hledger_journal(5) etc.
-
* Menu:
* OPTIONS::
@@ -31,128 +29,129 @@
1 OPTIONS
*********
-Note: if invoking hledger-ui as a hledger subcommand, write `--' before
+Note: if invoking hledger-ui as a hledger subcommand, write '--' before
options as shown above.
Any QUERYARGS are interpreted as a hledger search query which filters
the data.
-`--watch'
+'--watch'
+
watch for data and date changes and reload automatically
+'--theme=default|terminal|greenterm'
-`--theme=default|terminal|greenterm'
use this custom display theme
+'--register=ACCTREGEX'
-`--register=ACCTREGEX'
start in the (first) matched account's register screen
+'--change'
-`--change'
show period balances (changes) at startup instead of historical
balances
+'--flat'
-`--flat'
show full account names, unindented
-`-V --value'
- show amounts as their current market value in their default
- valuation commodity (accounts screen only)
-
- hledger general options:
-
-`-h'
- show general usage (or after COMMAND, the command's usage)
-
-`--help'
- show the current program's manual as plain text (or after an add-on
- COMMAND, the add-on's manual)
-
-`--man'
- show the current program's manual with man
+ hledger input options:
-`--info'
- show the current program's manual with info
+'-f FILE --file=FILE'
-`--version'
- show version
+ use a different input file. For stdin, use - (default:
+ '$LEDGER_FILE' or '$HOME/.hledger.journal')
+'--rules-file=RULESFILE'
-`--debug[=N]'
- show debug output (levels 1-9, default: 1)
+ Conversion rules file to use when reading CSV (default: FILE.rules)
+'--alias=OLD=NEW'
-`-f FILE --file=FILE'
- use a different input file. For stdin, use -
+ rename accounts named OLD to NEW
+'--anon'
-`--rules-file=RULESFILE'
- Conversion rules file to use when reading CSV (default: FILE.rules)
+ anonymize accounts and payees
+'--pivot TAGNAME'
-`--alias=OLD=NEW'
- display accounts named OLD as NEW
+ use some other field/tag for account names
+'-I --ignore-assertions'
-`-I --ignore-assertions'
- ignore any failing balance assertions in the journal
+ ignore any failing balance assertions
hledger reporting options:
-`-b --begin=DATE'
+'-b --begin=DATE'
+
include postings/txns on or after this date
+'-e --end=DATE'
-`-e --end=DATE'
include postings/txns before this date
+'-D --daily'
-`-D --daily'
multiperiod/multicolumn report by day
+'-W --weekly'
-`-W --weekly'
multiperiod/multicolumn report by week
+'-M --monthly'
-`-M --monthly'
multiperiod/multicolumn report by month
+'-Q --quarterly'
-`-Q --quarterly'
multiperiod/multicolumn report by quarter
+'-Y --yearly'
-`-Y --yearly'
multiperiod/multicolumn report by year
+'-p --period=PERIODEXP'
-`-p --period=PERIODEXP'
set start date, end date, and/or reporting interval all at once
(overrides the flags above)
+'--date2'
-`--date2'
show, and match with -b/-e/-p/date:, secondary dates instead
+'-C --cleared'
-`-C --cleared'
include only cleared postings/txns
+'--pending'
-`--pending'
include only pending postings/txns
+'-U --uncleared'
-`-U --uncleared'
include only uncleared (and pending) postings/txns
+'-R --real'
-`-R --real'
include only non-virtual postings
+'--depth=N'
-`--depth=N'
hide accounts/postings deeper than N
+'-E --empty'
-`-E --empty'
show items with zero amount, normally hidden
+'-B --cost'
-`-B --cost'
convert amounts to their cost at transaction time (using the
transaction price, if any)
+'-V --value'
-`--pivot TAG'
- will transform the journal before any other processing by
- replacing the account name of every posting having the tag TAG
- with content VALUE by the account name "TAG:VALUE". The TAG will
- only match if it is a full-length match. The pivot will only
- happen if the TAG is on a posting, not if it is on the
- transaction. If the tag value is a multi:level:account:name the
- new account name will be "TAG:multi:level:account:name".
+ convert amounts to their market value on the report end date (using
+ the most recent applicable market price, if any)
-`--anon'
- show anonymized accounts and payees
+ hledger help options:
+
+'-h'
+
+ show general usage (or after COMMAND, command usage)
+'--help'
+
+ show this program's manual as plain text (or after an add-on
+ COMMAND, the add-on's manual)
+'--man'
+
+ show this program's manual with man
+'--info'
+
+ show this program's manual with info
+'--version'
+
+ show version
+'--debug[=N]'
+
+ show debug output (levels 1-9, default: 1)
File: hledger-ui.1.info, Node: KEYS, Next: SCREENS, Prev: OPTIONS, Up: Top
@@ -160,57 +159,57 @@
2 KEYS
******
-`?' shows a help dialog listing all keys. (Some of these also appear in
-the quick help at the bottom of each screen.) Press `?' again (or
-`ESCAPE', or `LEFT') to close it. The following keys work on most
+'?' shows a help dialog listing all keys. (Some of these also appear in
+the quick help at the bottom of each screen.) Press '?' again (or
+'ESCAPE', or 'LEFT') to close it. The following keys work on most
screens:
- The cursor keys navigate: `right' (or `enter') goes deeper, `left'
-returns to the previous screen, `up'/`down'/`page up'/`page
-down'/`home'/`end' move up and down through lists. Vi-style
-`h'/`j'/`k'/`l' movement keys are also supported. A tip: movement speed
+ The cursor keys navigate: 'right' (or 'enter') goes deeper, 'left'
+returns to the previous screen, 'up'/'down'/'page up'/'page
+down'/'home'/'end' move up and down through lists. Vi-style
+'h'/'j'/'k'/'l' movement keys are also supported. A tip: movement speed
is limited by your keyboard repeat rate, to move faster you may want to
-adjust it. (If you're on a mac, the Karabiner app is one way to do
+adjust it. (If you're on a mac, the Karabiner app is one way to do
that.)
With shift pressed, the cursor keys adjust the report period,
limiting the transactions to be shown (by default, all are shown).
-`shift-down/up' steps downward and upward through these standard report
-period durations: year, quarter, month, week, day. Then,
-`shift-left/right' moves to the previous/next period. `t' sets the
-report period to today. With the `--watch' option, when viewing a
+'shift-down/up' steps downward and upward through these standard report
+period durations: year, quarter, month, week, day. Then,
+'shift-left/right' moves to the previous/next period. 't' sets the
+report period to today. With the '--watch' option, when viewing a
"current" period (the current day, week, month, quarter, or year), the
-period will move automatically to track the current date. To set a
-non-standard period, you can use `/' and a `date:' query.
+period will move automatically to track the current date. To set a
+non-standard period, you can use '/' and a 'date:' query.
- `/' lets you set a general filter query limiting the data shown,
-using the same query terms as in hledger and hledger-web. While editing
-the query, you can use CTRL-a/e/d/k, BS, cursor keys; press `ENTER' to
-set it, or `ESCAPE'to cancel. There are also keys for quickly adjusting
+ '/' lets you set a general filter query limiting the data shown,
+using the same query terms as in hledger and hledger-web. While editing
+the query, you can use CTRL-a/e/d/k, BS, cursor keys; press 'ENTER' to
+set it, or 'ESCAPE'to cancel. There are also keys for quickly adjusting
some common filters like account depth and cleared/uncleared (see
-below). `BACKSPACE' or `DELETE' removes all filters, showing all
+below). 'BACKSPACE' or 'DELETE' removes all filters, showing all
transactions.
- `ESCAPE' removes all filters and jumps back to the top screen. Or,
+ 'ESCAPE' removes all filters and jumps back to the top screen. Or,
it cancels a minibuffer edit or help dialog in progress.
- `g' reloads from the data file(s) and updates the current screen and
-any previous screens. (With large files, this could cause a noticeable
+ 'g' reloads from the data file(s) and updates the current screen and
+any previous screens. (With large files, this could cause a noticeable
pause.)
- `I' toggles balance assertion checking. Disabling balance assertions
+ 'I' toggles balance assertion checking. Disabling balance assertions
temporarily can be useful for troubleshooting.
- `a' runs command-line hledger's add command, and reloads the updated
-file. This allows some basic data entry.
+ 'a' runs command-line hledger's add command, and reloads the updated
+file. This allows some basic data entry.
- `E' runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (`emacsclient
--a "" -nw') on the journal file. With some editors (emacs, vi), the
+ 'E' runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default ('emacsclient
+-a "" -nw') on the journal file. With some editors (emacs, vi), the
cursor will be positioned at the current transaction when invoked from
the register and transaction screens, and at the error location (if
possible) when invoked from the error screen.
- `q' quits the application.
+ 'q' quits the application.
Additional screen-specific keys are described below.
@@ -233,45 +232,45 @@
3.1 Accounts screen
===================
-This is normally the first screen displayed. It lists accounts and their
-balances, like hledger's balance command. By default, it shows all
-accounts and their latest ending balances (including the balances of
-subaccounts). if you specify a query on the command line, it shows just
+This is normally the first screen displayed. It lists accounts and
+their balances, like hledger's balance command. By default, it shows
+all accounts and their latest ending balances (including the balances of
+subaccounts). if you specify a query on the command line, it shows just
the matched accounts and the balances from matched transactions.
Account names are normally indented to show the hierarchy (tree
mode). To see less detail, set a depth limit by pressing a number key,
-`1' to `9'. `0' shows even less detail, collapsing all accounts to a
-single total. `-' and `+' (or `=') decrease and increase the depth
-limit. To remove the depth limit, set it higher than the maximum
-account depth, or press `ESCAPE'.
+'1' to '9'. '0' shows even less detail, collapsing all accounts to a
+single total. '-' and '+' (or '=') decrease and increase the depth
+limit. To remove the depth limit, set it higher than the maximum
+account depth, or press 'ESCAPE'.
- `F' toggles flat mode, in which accounts are shown as a flat list,
-with their full names. In this mode, account balances exclude
+ 'F' toggles flat mode, in which accounts are shown as a flat list,
+with their full names. In this mode, account balances exclude
subaccounts, except for accounts at the depth limit (as with hledger's
balance command).
- `H' toggles between showing historical balances or period balances.
+ 'H' toggles between showing historical balances or period balances.
Historical balances (the default) are ending balances at the end of the
report period, taking into account all transactions before that date
(filtered by the filter query if any), including transactions before the
-start of the report period. In other words, historical balances are what
-you would see on a bank statement for that account (unless disturbed by
-a filter query). Period balances ignore transactions before the report
-start date, so they show the change in balance during the report period.
-They are more useful eg when viewing a time log.
+start of the report period. In other words, historical balances are
+what you would see on a bank statement for that account (unless
+disturbed by a filter query). Period balances ignore transactions
+before the report start date, so they show the change in balance during
+the report period. They are more useful eg when viewing a time log.
- `C' toggles cleared mode, in which uncleared transactions and
-postings are not shown. `U' toggles uncleared mode, in which only
+ 'C' toggles cleared mode, in which uncleared transactions and
+postings are not shown. 'U' toggles uncleared mode, in which only
uncleared transactions/postings are shown.
- `R' toggles real mode, in which virtual postings are ignored.
+ 'R' toggles real mode, in which virtual postings are ignored.
- `Z' toggles nonzero mode, in which only accounts with nonzero
+ 'Z' toggles nonzero mode, in which only accounts with nonzero
balances are shown (hledger-ui shows zero items by default, unlike
command-line hledger).
- Press `right' or `enter' to view an account's transactions register.
+ Press 'right' or 'enter' to view an account's transactions register.
File: hledger-ui.1.info, Node: Register screen, Next: Transaction screen, Prev: Accounts screen, Up: SCREENS
@@ -280,44 +279,42 @@
===================
This screen shows the transactions affecting a particular account, like
-a check register. Each line represents one transaction and shows:
+a check register. Each line represents one transaction and shows:
- * the other account(s) involved, in abbreviated form. (If there are
- both real and virtual postings, it shows only the accounts
- affected by real postings.)
+ * the other account(s) involved, in abbreviated form. (If there are
+ both real and virtual postings, it shows only the accounts affected
+ by real postings.)
* the overall change to the current account's balance; positive for
an inflow to this account, negative for an outflow.
* the running historical total or period total for the current
- account, after the transaction. This can be toggled with `H'.
- Similar to the accounts screen, the historical total is affected
- by transactions (filtered by the filter query) before the report
- start date, while the period total is not. If the historical total
- is not disturbed by a filter query, it will be the running
- historical balance you would see on a bank register for the
- current account.
-
+ account, after the transaction. This can be toggled with 'H'.
+ Similar to the accounts screen, the historical total is affected by
+ transactions (filtered by the filter query) before the report start
+ date, while the period total is not. If the historical total is
+ not disturbed by a filter query, it will be the running historical
+ balance you would see on a bank register for the current account.
If the accounts screen was in tree mode, the register screen will
include transactions from both the current account and its subaccounts.
If the accounts screen was in flat mode, and a non-depth-clipped account
was selected, the register screen will exclude transactions from
-subaccounts. In other words, the register always shows the transactions
-responsible for the period balance shown on the accounts screen. As on
-the accounts screen, this can be toggled with `F'.
+subaccounts. In other words, the register always shows the transactions
+responsible for the period balance shown on the accounts screen. As on
+the accounts screen, this can be toggled with 'F'.
- `C' toggles cleared mode, in which uncleared transactions and
-postings are not shown. `U' toggles uncleared mode, in which only
+ 'C' toggles cleared mode, in which uncleared transactions and
+postings are not shown. 'U' toggles uncleared mode, in which only
uncleared transactions/postings are shown.
- `R' toggles real mode, in which virtual postings are ignored.
+ 'R' toggles real mode, in which virtual postings are ignored.
- `Z' toggles nonzero mode, in which only transactions posting a
+ 'Z' toggles nonzero mode, in which only transactions posting a
nonzero change are shown (hledger-ui shows zero items by default, unlike
command-line hledger).
- Press `right' (or `enter') to view the selected transaction in
+ Press 'right' (or 'enter') to view the selected transaction in
detail.
@@ -335,11 +332,11 @@
Simple transactions have two postings, but there can be more (or in
certain cases, fewer).
- `up' and `down' will step through all transactions listed in the
-previous account register screen. In the title bar, the numbers in
-parentheses show your position within that account register. They will
+ 'up' and 'down' will step through all transactions listed in the
+previous account register screen. In the title bar, the numbers in
+parentheses show your position within that account register. They will
vary depending on which account register you came from (remember most
-transactions appear in multiple account registers). The #N number
+transactions appear in multiple account registers). The #N number
preceding them is the transaction's position within the complete
unfiltered journal, which is a more stable id (at least until the next
reload).
@@ -351,27 +348,26 @@
================
This screen will appear if there is a problem, such as a parse error,
-when you press g to reload. Once you have fixed the problem, press g
-again to reload and resume normal operation. (Or, you can press escape
+when you press g to reload. Once you have fixed the problem, press g
+again to reload and resume normal operation. (Or, you can press escape
to cancel the reload attempt.)
-
Tag Table:
-Node: Top88
-Node: OPTIONS827
-Ref: #options926
-Node: KEYS4005
-Ref: #keys4102
-Node: SCREENS6672
-Ref: #screens6759
-Node: Accounts screen6849
-Ref: #accounts-screen6979
-Node: Register screen9017
-Ref: #register-screen9174
-Node: Transaction screen11062
-Ref: #transaction-screen11222
-Node: Error screen12089
-Ref: #error-screen12213
+Node: Top73
+Node: OPTIONS825
+Ref: #options924
+Node: KEYS3650
+Ref: #keys3747
+Node: SCREENS6335
+Ref: #screens6422
+Node: Accounts screen6512
+Ref: #accounts-screen6642
+Node: Register screen8691
+Ref: #register-screen8848
+Node: Transaction screen10737
+Ref: #transaction-screen10897
+Node: Error screen11767
+Ref: #error-screen11891
End Tag Table
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/doc/hledger-ui.1.txt new/hledger-ui-1.2/doc/hledger-ui.1.txt
--- old/hledger-ui-1.1.2/doc/hledger-ui.1.txt 2017-01-25 20:17:41.000000000 +0100
+++ new/hledger-ui-1.2/doc/hledger-ui.1.txt 2017-04-01 02:53:13.000000000 +0200
@@ -50,39 +50,26 @@
--flat show full account names, unindented
- -V --value
- show amounts as their current market value in their default val-
- uation commodity (accounts screen only)
-
- hledger general options:
-
- -h show general usage (or after COMMAND, the command's usage)
-
- --help show the current program's manual as plain text (or after an
- add-on COMMAND, the add-on's manual)
-
- --man show the current program's manual with man
-
- --info show the current program's manual with info
-
- --version
- show version
-
- --debug[=N]
- show debug output (levels 1-9, default: 1)
+ hledger input options:
-f FILE --file=FILE
- use a different input file. For stdin, use -
+ use a different input file. For stdin, use - (default:
+ $LEDGER_FILE or $HOME/.hledger.journal)
--rules-file=RULESFILE
- Conversion rules file to use when reading CSV (default:
+ Conversion rules file to use when reading CSV (default:
FILE.rules)
--alias=OLD=NEW
- display accounts named OLD as NEW
+ rename accounts named OLD to NEW
+
+ --anon anonymize accounts and payees
+
+ --pivot TAGNAME
+ use some other field/tag for account names
-I --ignore-assertions
- ignore any failing balance assertions in the journal
+ ignore any failing balance assertions
hledger reporting options:
@@ -108,7 +95,7 @@
multiperiod/multicolumn report by year
-p --period=PERIODEXP
- set start date, end date, and/or reporting interval all at once
+ set start date, end date, and/or reporting interval all at once
(overrides the flags above)
--date2
@@ -133,66 +120,76 @@
show items with zero amount, normally hidden
-B --cost
- convert amounts to their cost at transaction time (using the
+ convert amounts to their cost at transaction time (using the
transaction price, if any)
- --pivot TAG
- will transform the journal before any other processing by
- replacing the account name of every posting having the tag TAG
- with content VALUE by the account name "TAG:VALUE". The TAG
- will only match if it is a full-length match. The pivot will
- only happen if the TAG is on a posting, not if it is on the
- transaction. If the tag value is a multi:level:account:name the
- new account name will be "TAG:multi:level:account:name".
+ -V --value
+ convert amounts to their market value on the report end date
+ (using the most recent applicable market price, if any)
+
+ hledger help options:
+
+ -h show general usage (or after COMMAND, command usage)
+
+ --help show this program's manual as plain text (or after an add-on
+ COMMAND, the add-on's manual)
+
+ --man show this program's manual with man
- --anon show anonymized accounts and payees
+ --info show this program's manual with info
+
+ --version
+ show version
+
+ --debug[=N]
+ show debug output (levels 1-9, default: 1)
KEYS
- ? shows a help dialog listing all keys. (Some of these also appear in
+ ? shows a help dialog listing all keys. (Some of these also appear in
the quick help at the bottom of each screen.) Press ? again (or ESCAPE,
or LEFT) to close it. The following keys work on most screens:
The cursor keys navigate: right (or enter) goes deeper, left returns to
- the previous screen, up/down/page up/page down/home/end move up and
+ the previous screen, up/down/page up/page down/home/end move up and
down through lists. Vi-style h/j/k/l movement keys are also supported.
- A tip: movement speed is limited by your keyboard repeat rate, to move
- faster you may want to adjust it. (If you're on a mac, the Karabiner
+ A tip: movement speed is limited by your keyboard repeat rate, to move
+ faster you may want to adjust it. (If you're on a mac, the Karabiner
app is one way to do that.)
- With shift pressed, the cursor keys adjust the report period, limiting
- the transactions to be shown (by default, all are shown).
- shift-down/up steps downward and upward through these standard report
+ With shift pressed, the cursor keys adjust the report period, limiting
+ the transactions to be shown (by default, all are shown).
+ shift-down/up steps downward and upward through these standard report
period durations: year, quarter, month, week, day. Then,
- shift-left/right moves to the previous/next period. t sets the report
- period to today. With the --watch option, when viewing a "current"
- period (the current day, week, month, quarter, or year), the period
- will move automatically to track the current date. To set a non-stan-
+ shift-left/right moves to the previous/next period. t sets the report
+ period to today. With the --watch option, when viewing a "current"
+ period (the current day, week, month, quarter, or year), the period
+ will move automatically to track the current date. To set a non-stan-
dard period, you can use / and a date: query.
- / lets you set a general filter query limiting the data shown, using
- the same query terms as in hledger and hledger-web. While editing the
- query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set
+ / lets you set a general filter query limiting the data shown, using
+ the same query terms as in hledger and hledger-web. While editing the
+ query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set
it, or ESCAPEto cancel. There are also keys for quickly adjusting some
- common filters like account depth and cleared/uncleared (see below).
+ common filters like account depth and cleared/uncleared (see below).
BACKSPACE or DELETE removes all filters, showing all transactions.
- ESCAPE removes all filters and jumps back to the top screen. Or, it
+ ESCAPE removes all filters and jumps back to the top screen. Or, it
cancels a minibuffer edit or help dialog in progress.
- g reloads from the data file(s) and updates the current screen and any
- previous screens. (With large files, this could cause a noticeable
+ g reloads from the data file(s) and updates the current screen and any
+ previous screens. (With large files, this could cause a noticeable
pause.)
- I toggles balance assertion checking. Disabling balance assertions
+ I toggles balance assertion checking. Disabling balance assertions
temporarily can be useful for troubleshooting.
- a runs command-line hledger's add command, and reloads the updated
+ a runs command-line hledger's add command, and reloads the updated
file. This allows some basic data entry.
- E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emac-
+ E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emac-
sclient -a "" -nw) on the journal file. With some editors (emacs, vi),
- the cursor will be positioned at the current transaction when invoked
- from the register and transaction screens, and at the error location
+ the cursor will be positioned at the current transaction when invoked
+ from the register and transaction screens, and at the error location
(if possible) when invoked from the error screen.
q quits the application.
@@ -201,42 +198,42 @@
SCREENS
Accounts screen
- This is normally the first screen displayed. It lists accounts and
- their balances, like hledger's balance command. By default, it shows
- all accounts and their latest ending balances (including the balances
- of subaccounts). if you specify a query on the command line, it shows
+ This is normally the first screen displayed. It lists accounts and
+ their balances, like hledger's balance command. By default, it shows
+ all accounts and their latest ending balances (including the balances
+ of subaccounts). if you specify a query on the command line, it shows
just the matched accounts and the balances from matched transactions.
- Account names are normally indented to show the hierarchy (tree mode).
+ Account names are normally indented to show the hierarchy (tree mode).
To see less detail, set a depth limit by pressing a number key, 1 to 9.
0 shows even less detail, collapsing all accounts to a single total. -
- and + (or =) decrease and increase the depth limit. To remove the
- depth limit, set it higher than the maximum account depth, or press
+ and + (or =) decrease and increase the depth limit. To remove the
+ depth limit, set it higher than the maximum account depth, or press
ESCAPE.
- F toggles flat mode, in which accounts are shown as a flat list, with
- their full names. In this mode, account balances exclude subaccounts,
- except for accounts at the depth limit (as with hledger's balance com-
+ F toggles flat mode, in which accounts are shown as a flat list, with
+ their full names. In this mode, account balances exclude subaccounts,
+ except for accounts at the depth limit (as with hledger's balance com-
mand).
H toggles between showing historical balances or period balances. His-
- torical balances (the default) are ending balances at the end of the
- report period, taking into account all transactions before that date
- (filtered by the filter query if any), including transactions before
- the start of the report period. In other words, historical balances
- are what you would see on a bank statement for that account (unless
- disturbed by a filter query). Period balances ignore transactions
+ torical balances (the default) are ending balances at the end of the
+ report period, taking into account all transactions before that date
+ (filtered by the filter query if any), including transactions before
+ the start of the report period. In other words, historical balances
+ are what you would see on a bank statement for that account (unless
+ disturbed by a filter query). Period balances ignore transactions
before the report start date, so they show the change in balance during
the report period. They are more useful eg when viewing a time log.
- C toggles cleared mode, in which uncleared transactions and postings
- are not shown. U toggles uncleared mode, in which only uncleared
+ C toggles cleared mode, in which uncleared transactions and postings
+ are not shown. U toggles uncleared mode, in which only uncleared
transactions/postings are shown.
R toggles real mode, in which virtual postings are ignored.
- Z toggles nonzero mode, in which only accounts with nonzero balances
- are shown (hledger-ui shows zero items by default, unlike command-line
+ Z toggles nonzero mode, in which only accounts with nonzero balances
+ are shown (hledger-ui shows zero items by default, unlike command-line
hledger).
Press right or enter to view an account's transactions register.
@@ -245,62 +242,62 @@
This screen shows the transactions affecting a particular account, like
a check register. Each line represents one transaction and shows:
- o the other account(s) involved, in abbreviated form. (If there are
- both real and virtual postings, it shows only the accounts affected
+ o the other account(s) involved, in abbreviated form. (If there are
+ both real and virtual postings, it shows only the accounts affected
by real postings.)
- o the overall change to the current account's balance; positive for an
+ o the overall change to the current account's balance; positive for an
inflow to this account, negative for an outflow.
o the running historical total or period total for the current account,
- after the transaction. This can be toggled with H. Similar to the
- accounts screen, the historical total is affected by transactions
- (filtered by the filter query) before the report start date, while
+ after the transaction. This can be toggled with H. Similar to the
+ accounts screen, the historical total is affected by transactions
+ (filtered by the filter query) before the report start date, while
the period total is not. If the historical total is not disturbed by
- a filter query, it will be the running historical balance you would
+ a filter query, it will be the running historical balance you would
see on a bank register for the current account.
- If the accounts screen was in tree mode, the register screen will
+ If the accounts screen was in tree mode, the register screen will
include transactions from both the current account and its subaccounts.
- If the accounts screen was in flat mode, and a non-depth-clipped
- account was selected, the register screen will exclude transactions
+ If the accounts screen was in flat mode, and a non-depth-clipped
+ account was selected, the register screen will exclude transactions
from subaccounts. In other words, the register always shows the trans-
- actions responsible for the period balance shown on the accounts
+ actions responsible for the period balance shown on the accounts
screen. As on the accounts screen, this can be toggled with F.
- C toggles cleared mode, in which uncleared transactions and postings
- are not shown. U toggles uncleared mode, in which only uncleared
+ C toggles cleared mode, in which uncleared transactions and postings
+ are not shown. U toggles uncleared mode, in which only uncleared
transactions/postings are shown.
R toggles real mode, in which virtual postings are ignored.
- Z toggles nonzero mode, in which only transactions posting a nonzero
- change are shown (hledger-ui shows zero items by default, unlike com-
+ Z toggles nonzero mode, in which only transactions posting a nonzero
+ change are shown (hledger-ui shows zero items by default, unlike com-
mand-line hledger).
Press right (or enter) to view the selected transaction in detail.
Transaction screen
- This screen shows a single transaction, as a general journal entry,
- similar to hledger's print command and journal format (hledger_jour-
+ This screen shows a single transaction, as a general journal entry,
+ similar to hledger's print command and journal format (hledger_jour-
nal(5)).
- The transaction's date(s) and any cleared flag, transaction code,
- description, comments, along with all of its account postings are
- shown. Simple transactions have two postings, but there can be more
+ The transaction's date(s) and any cleared flag, transaction code,
+ description, comments, along with all of its account postings are
+ shown. Simple transactions have two postings, but there can be more
(or in certain cases, fewer).
- up and down will step through all transactions listed in the previous
- account register screen. In the title bar, the numbers in parentheses
- show your position within that account register. They will vary
+ up and down will step through all transactions listed in the previous
+ account register screen. In the title bar, the numbers in parentheses
+ show your position within that account register. They will vary
depending on which account register you came from (remember most trans-
actions appear in multiple account registers). The #N number preceding
them is the transaction's position within the complete unfiltered jour-
nal, which is a more stable id (at least until the next reload).
Error screen
- This screen will appear if there is a problem, such as a parse error,
- when you press g to reload. Once you have fixed the problem, press g
+ This screen will appear if there is a problem, such as a parse error,
+ when you press g to reload. Once you have fixed the problem, press g
again to reload and resume normal operation. (Or, you can press escape
to cancel the reload attempt.)
@@ -308,17 +305,17 @@
COLUMNS The screen width to use. Default: the full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default:
- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
FILES
- Reads data from one or more files in hledger journal, timeclock, time-
- dot, or CSV format specified with -f, or $LEDGER_FILE, or
- $HOME/.hledger.journal (on windows, perhaps
+ Reads data from one or more files in hledger journal, timeclock, time-
+ dot, or CSV format specified with -f, or $LEDGER_FILE, or
+ $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
- The need to precede options with -- when invoked from hledger is awk-
+ The need to precede options with -- when invoked from hledger is awk-
ward.
-f- doesn't work (hledger-ui can't read from stdin).
@@ -326,13 +323,13 @@
-V affects only the accounts screen.
When you press g, the current and all previous screens are regenerated,
- which may cause a noticeable pause with large files. Also there is no
+ which may cause a noticeable pause with large files. Also there is no
visual indication that this is in progress.
- --watch is not yet fully robust. It works well for normal usage, but
- many file changes in a short time (eg saving the file thousands of
- times with an editor macro) can cause problems at least on OSX. Symp-
- toms include: unresponsive UI, periodic resetting of the cursor posi-
+ --watch is not yet fully robust. It works well for normal usage, but
+ many file changes in a short time (eg saving the file thousands of
+ times with an editor macro) can cause problems at least on OSX. Symp-
+ toms include: unresponsive UI, periodic resetting of the cursor posi-
tion, momentary display of parse errors, high CPU usage eventually sub-
siding, and possibly a small but persistent build-up of CPU usage until
the program is restarted.
@@ -340,7 +337,7 @@
REPORTING BUGS
- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@@ -354,7 +351,7 @@
SEE ALSO
- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@@ -362,4 +359,4 @@
-hledger-ui 1.1.2 January 2017 hledger-ui(1)
+hledger-ui 1.2 March 2017 hledger-ui(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-ui-1.1.2/hledger-ui.cabal new/hledger-ui-1.2/hledger-ui.cabal
--- old/hledger-ui-1.1.2/hledger-ui.cabal 2017-01-25 20:18:20.000000000 +0100
+++ new/hledger-ui-1.2/hledger-ui.cabal 2017-04-01 02:56:37.000000000 +0200
@@ -1,11 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger-ui
-version: 1.1.2
-stability: stable
-category: Finance, Console
+version: 1.2
synopsis: Curses-style user interface for the hledger accounting tool
description: This is hledger's curses-style interface.
It is simpler and more convenient for browsing data than the command-line interface,
@@ -17,15 +15,17 @@
with ledger(1). hledger provides command-line, curses and web
interfaces, and aims to be a reliable, practical tool for daily
use.
-license: GPL
-license-file: LICENSE
-author: Simon Michael <simon(a)joyful.com>
-maintainer: Simon Michael <simon(a)joyful.com>
+category: Finance, Console
+stability: stable
homepage: http://hledger.org
bug-reports: http://bugs.hledger.org
-cabal-version: >= 1.10
-build-type: Simple
+author: Simon Michael <simon(a)joyful.com>
+maintainer: Simon Michael <simon(a)joyful.com>
+license: GPL-3
+license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
CHANGES
@@ -46,19 +46,19 @@
default: False
flag threaded
- default: True
description: Build with support for multithreaded execution
manual: False
+ default: True
executable hledger-ui
main-is: hledger-ui.hs
hs-source-dirs:
- .
+ ./.
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1.2"
+ cpp-options: -DVERSION="1.2"
build-depends:
- hledger >= 1.1 && < 1.2
- , hledger-lib >= 1.1 && < 1.2
+ hledger >= 1.2 && < 1.3
+ , hledger-lib >= 1.2 && < 1.3
, ansi-terminal >= 0.6.2.3 && < 0.7
, async
, base >= 4.8 && < 5
@@ -72,13 +72,13 @@
, HUnit
, microlens >= 0.4 && < 0.5
, microlens-platform >= 0.2.3.1 && < 0.4
- , megaparsec >=5.0 && < 5.2
+ , megaparsec >=5.0 && < 5.3
, pretty-show >=1.6.4
, process >= 1.2
, safe >= 0.2
, split >= 0.1 && < 0.3
, text >= 1.2 && < 1.3
- , text-zipper >= 0.4 && < 0.10
+ , text-zipper >= 0.4 && < 0.11
, transformers
, vector
if os(windows)
++++++ hledger-ui.cabal ++++++
--- /var/tmp/diff_new_pack.rjL3sQ/_old 2017-08-31 20:48:56.634779533 +0200
+++ /var/tmp/diff_new_pack.rjL3sQ/_new 2017-08-31 20:48:56.634779533 +0200
@@ -1,12 +1,10 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger-ui
-version: 1.1.2
-x-revision: 2
-stability: stable
-category: Finance, Console
+version: 1.2
+x-revision: 3
synopsis: Curses-style user interface for the hledger accounting tool
description: This is hledger's curses-style interface.
It is simpler and more convenient for browsing data than the command-line interface,
@@ -18,15 +16,17 @@
with ledger(1). hledger provides command-line, curses and web
interfaces, and aims to be a reliable, practical tool for daily
use.
-license: GPL
-license-file: LICENSE
-author: Simon Michael <simon(a)joyful.com>
-maintainer: Simon Michael <simon(a)joyful.com>
+category: Finance, Console
+stability: stable
homepage: http://hledger.org
bug-reports: http://bugs.hledger.org
-cabal-version: >= 1.10
-build-type: Simple
+author: Simon Michael <simon(a)joyful.com>
+maintainer: Simon Michael <simon(a)joyful.com>
+license: GPL-3
+license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
CHANGES
@@ -47,19 +47,19 @@
default: False
flag threaded
- default: True
description: Build with support for multithreaded execution
manual: False
+ default: True
executable hledger-ui
main-is: hledger-ui.hs
hs-source-dirs:
- .
+ ./.
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1.2"
+ cpp-options: -DVERSION="1.2"
build-depends:
- hledger >= 1.1 && < 1.2
- , hledger-lib >= 1.1 && < 1.2
+ hledger >= 1.2 && < 1.3
+ , hledger-lib >= 1.2 && < 1.3
, ansi-terminal >= 0.6.2.3 && < 0.7
, async
, base >= 4.8 && < 5
@@ -73,7 +73,7 @@
, HUnit
, microlens >= 0.4 && < 0.5
, microlens-platform >= 0.2.3.1 && < 0.4
- , megaparsec >=5.0 && < 5.3
+ , megaparsec >=5.0 && < 5.4
, pretty-show >=1.6.4
, process >= 1.2
, safe >= 0.2
@@ -86,8 +86,8 @@
buildable: False
else
build-depends:
- brick >= 0.12 && < 0.18
- , vty >= 5.5 && < 5.16
+ brick >= 0.12 && < 0.19
+ , vty >= 5.5 && < 5.17
if flag(threaded)
ghc-options: -threaded
if flag(oldtime)
1
0
Hello community,
here is the log from the commit of package hledger-api for openSUSE:Factory checked in at 2017-08-31 20:48:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hledger-api (Old)
and /work/SRC/openSUSE:Factory/.hledger-api.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hledger-api"
Thu Aug 31 20:48:51 2017 rev:2 rq:513567 version:1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hledger-api/hledger-api.changes 2017-05-10 20:55:01.116737988 +0200
+++ /work/SRC/openSUSE:Factory/.hledger-api.new/hledger-api.changes 2017-08-31 20:48:54.275110755 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:15 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.2.
+
+-------------------------------------------------------------------
Old:
----
hledger-api-1.1.tar.gz
New:
----
hledger-api-1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hledger-api.spec ++++++
--- /var/tmp/diff_new_pack.pvccwL/_old 2017-08-31 20:48:55.318964231 +0200
+++ /var/tmp/diff_new_pack.pvccwL/_new 2017-08-31 20:48:55.326963109 +0200
@@ -17,7 +17,7 @@
Name: hledger-api
-Version: 1.1
+Version: 1.2
Release: 0
Summary: Web API server for the hledger accounting tool
License: GPL-3.0+
++++++ hledger-api-1.1.tar.gz -> hledger-api-1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/CHANGES new/hledger-api-1.2/CHANGES
--- old/hledger-api-1.1/CHANGES 2016-12-31 20:22:14.000000000 +0100
+++ new/hledger-api-1.2/CHANGES 2017-04-01 03:10:27.000000000 +0200
@@ -2,6 +2,10 @@
See also the hledger and the project change logs.
+# 1.2 (2016/3/31)
+
+see project changes at http://hledger.org/release-notes
+
# 1.1 (2016/12/31)
- serves on 127.0.0.1 by default, --host option added (#432)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/doc/hledger-api.1 new/hledger-api-1.2/doc/hledger-api.1
--- old/hledger-api-1.1/doc/hledger-api.1 2016-12-31 20:22:38.000000000 +0100
+++ new/hledger-api-1.2/doc/hledger-api.1 2017-04-01 02:53:13.000000000 +0200
@@ -1,5 +1,5 @@
-.TH "hledger\-api" "1" "December 2016" "hledger\-api 1.1" "hledger User Manuals"
+.TH "hledger\-api" "1" "March 2017" "hledger\-api 1.2" "hledger User Manuals"
@@ -12,10 +12,6 @@
.PD 0
.P
.PD
-\f[C]hledger\-api\ \-\-swagger\f[]
-.PD 0
-.P
-.PD
\f[C]hledger\ api\ \-\-\ [OPTIONS]\f[]
.SH DESCRIPTION
.PP
@@ -51,41 +47,30 @@
Note: if invoking hledger\-api as a hledger subcommand, write
\f[C]\-\-\f[] before options as shown above.
.TP
-.B \f[C]\-d\ \-\-static\-dir=DIR\f[]
-serve files from a different directory (default: \f[C]\&.\f[])
-.RS
-.RE
-.TP
-.B \f[C]\-p\ \-\-port=PORT\f[]
-use a different TCP port (default: 8001)
-.RS
-.RE
-.TP
-.B \f[C]\-\-swagger\f[]
-print API docs in Swagger 2.0 format, and exit
+.B \f[C]\-f\ \-\-file=FILE\f[]
+use a different input file.
+For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or
+\f[C]$HOME/.hledger.journal\f[])
.RS
.RE
-.PP
-hledger general options:
.TP
-.B \f[C]\-h\f[]
-show general usage (or after COMMAND, the command\[aq]s usage)
+.B \f[C]\-d\ \-\-static\-dir=DIR\f[]
+serve files from a different directory (default: \f[C]\&.\f[])
.RS
.RE
.TP
-.B \f[C]\-\-help\f[]
-show the current program\[aq]s manual as plain text (or after an add\-on
-COMMAND, the add\-on\[aq]s manual)
+.B \f[C]\-\-host=IPADDR\f[]
+listen on this IP address (default: 127.0.0.1)
.RS
.RE
.TP
-.B \f[C]\-\-man\f[]
-show the current program\[aq]s manual with man
+.B \f[C]\-p\ \-\-port=PORT\f[]
+listen on this TCP port (default: 8001)
.RS
.RE
.TP
-.B \f[C]\-\-info\f[]
-show the current program\[aq]s manual with info
+.B \f[C]\-\-swagger\f[]
+print API docs in Swagger 2.0 format, and exit
.RS
.RE
.TP
@@ -94,29 +79,23 @@
.RS
.RE
.TP
-.B \f[C]\-\-debug[=N]\f[]
-show debug output (levels 1\-9, default: 1)
-.RS
-.RE
-.TP
-.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]
-use a different input file.
-For stdin, use \-
+.B \f[C]\-h\f[]
+show usage
.RS
.RE
.TP
-.B \f[C]\-\-rules\-file=RULESFILE\f[]
-Conversion rules file to use when reading CSV (default: FILE.rules)
+.B \f[C]\-\-help\f[]
+show manual as plain text
.RS
.RE
.TP
-.B \f[C]\-\-alias=OLD=NEW\f[]
-display accounts named OLD as NEW
+.B \f[C]\-\-man\f[]
+show manual with man
.RS
.RE
.TP
-.B \f[C]\-I\ \-\-ignore\-assertions\f[]
-ignore any failing balance assertions in the journal
+.B \f[C]\-\-info\f[]
+show manual with info
.RS
.RE
.SH ENVIRONMENT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/doc/hledger-api.1.info new/hledger-api-1.2/doc/hledger-api.1.info
--- old/hledger-api-1.1/doc/hledger-api.1.info 2016-12-31 20:22:35.000000000 +0100
+++ new/hledger-api-1.2/doc/hledger-api.1.info 2017-04-01 02:53:10.000000000 +0200
@@ -1,32 +1,30 @@
-This is hledger-api/doc/hledger-api.1.info, produced by makeinfo
-version 4.8 from stdin.
+This is hledger-api.1.info, produced by makeinfo version 6.0 from stdin.
-File: hledger-api.1.info, Node: Top, Up: (dir)
+File: hledger-api.1.info, Node: Top, Next: OPTIONS, Up: (dir)
-hledger-api(1) hledger-api 1.1
+hledger-api(1) hledger-api 1.2
******************************
hledger-api is a simple web API server, intended to support client-side
-web apps operating on hledger data. It comes with a series of simple
+web apps operating on hledger data. It comes with a series of simple
client-side app examples, which drive its evolution.
Like hledger, it reads data from one or more files in hledger
-journal, timeclock, timedot, or CSV format specified with `-f', or
-`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps
-`C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
+journal, timeclock, timedot, or CSV format specified with '-f', or
+'$LEDGER_FILE', or '$HOME/.hledger.journal' (on windows, perhaps
+'C:/Users/USER/.hledger.journal'). For more about this see hledger(1),
hledger_journal(5) etc.
The server listens on IP address 127.0.0.1, accessible only to local
-requests, by default. You can change this with `--host', eg `--host
-0.0.0.0' to listen on all addresses. Note there is no other access
+requests, by default. You can change this with '--host', eg '--host
+0.0.0.0' to listen on all addresses. Note there is no other access
control, so you will need to hide hledger-api behind an authenticating
-proxy if you want to restrict access. You can change the TCP port
-(default: 8001) with `-p PORT'.
+proxy if you want to restrict access. You can change the TCP port
+(default: 8001) with '-p PORT'.
- If invoked as `hledger-api --swagger', instead of starting a server
+ If invoked as 'hledger-api --swagger', instead of starting a server
the API docs will be printed in Swagger 2.0 format.
-
* Menu:
* OPTIONS::
@@ -37,56 +35,45 @@
1 OPTIONS
*********
-Note: if invoking hledger-api as a hledger subcommand, write `--'
-before options as shown above.
-
-`-d --static-dir=DIR'
- serve files from a different directory (default: `.')
+Note: if invoking hledger-api as a hledger subcommand, write '--' before
+options as shown above.
-`-p --port=PORT'
- use a different TCP port (default: 8001)
-
-`--swagger'
- print API docs in Swagger 2.0 format, and exit
+'-f --file=FILE'
- hledger general options:
+ use a different input file. For stdin, use - (default:
+ '$LEDGER_FILE' or '$HOME/.hledger.journal')
+'-d --static-dir=DIR'
-`-h'
- show general usage (or after COMMAND, the command's usage)
+ serve files from a different directory (default: '.')
+'--host=IPADDR'
-`--help'
- show the current program's manual as plain text (or after an add-on
- COMMAND, the add-on's manual)
+ listen on this IP address (default: 127.0.0.1)
+'-p --port=PORT'
-`--man'
- show the current program's manual with man
+ listen on this TCP port (default: 8001)
+'--swagger'
-`--info'
- show the current program's manual with info
+ print API docs in Swagger 2.0 format, and exit
+'--version'
-`--version'
show version
+'-h'
-`--debug[=N]'
- show debug output (levels 1-9, default: 1)
-
-`-f FILE --file=FILE'
- use a different input file. For stdin, use -
-
-`--rules-file=RULESFILE'
- Conversion rules file to use when reading CSV (default: FILE.rules)
+ show usage
+'--help'
-`--alias=OLD=NEW'
- display accounts named OLD as NEW
+ show manual as plain text
+'--man'
-`-I --ignore-assertions'
- ignore any failing balance assertions in the journal
+ show manual with man
+'--info'
+ show manual with info
Tag Table:
-Node: Top90
-Node: OPTIONS1216
-Ref: #options1303
+Node: Top74
+Node: OPTIONS1220
+Ref: #options1307
End Tag Table
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/doc/hledger-api.1.txt new/hledger-api-1.2/doc/hledger-api.1.txt
--- old/hledger-api-1.1/doc/hledger-api.1.txt 2016-12-31 20:22:38.000000000 +0100
+++ new/hledger-api-1.2/doc/hledger-api.1.txt 2017-04-01 02:53:13.000000000 +0200
@@ -8,7 +8,6 @@
SYNOPSIS
hledger-api [OPTIONS]
- hledger-api --swagger
hledger api -- [OPTIONS]
DESCRIPTION
@@ -41,64 +40,52 @@
Note: if invoking hledger-api as a hledger subcommand, write -- before
options as shown above.
+ -f --file=FILE
+ use a different input file. For stdin, use - (default:
+ $LEDGER_FILE or $HOME/.hledger.journal)
+
-d --static-dir=DIR
serve files from a different directory (default: .)
+ --host=IPADDR
+ listen on this IP address (default: 127.0.0.1)
+
-p --port=PORT
- use a different TCP port (default: 8001)
+ listen on this TCP port (default: 8001)
--swagger
print API docs in Swagger 2.0 format, and exit
- hledger general options:
-
- -h show general usage (or after COMMAND, the command's usage)
-
- --help show the current program's manual as plain text (or after an
- add-on COMMAND, the add-on's manual)
-
- --man show the current program's manual with man
-
- --info show the current program's manual with info
-
--version
show version
- --debug[=N]
- show debug output (levels 1-9, default: 1)
-
- -f FILE --file=FILE
- use a different input file. For stdin, use -
+ -h show usage
- --rules-file=RULESFILE
- Conversion rules file to use when reading CSV (default:
- FILE.rules)
+ --help show manual as plain text
- --alias=OLD=NEW
- display accounts named OLD as NEW
+ --man show manual with man
- -I --ignore-assertions
- ignore any failing balance assertions in the journal
+ --info show manual with info
ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default:
- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
FILES
- Reads data from one or more files in hledger journal, timeclock, time-
- dot, or CSV format specified with -f, or $LEDGER_FILE, or
- $HOME/.hledger.journal (on windows, perhaps
+ Reads data from one or more files in hledger journal, timeclock, time-
+ dot, or CSV format specified with -f, or $LEDGER_FILE, or
+ $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
- The need to precede options with -- when invoked from hledger is awk-
+ The need to precede options with -- when invoked from hledger is awk-
ward.
REPORTING BUGS
- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@@ -112,7 +99,7 @@
SEE ALSO
- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@@ -120,4 +107,4 @@
-hledger-api 1.1 December 2016 hledger-api(1)
+hledger-api 1.2 March 2017 hledger-api(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/hledger-api.cabal new/hledger-api-1.2/hledger-api.cabal
--- old/hledger-api-1.1/hledger-api.cabal 2016-12-31 16:54:47.000000000 +0100
+++ new/hledger-api-1.2/hledger-api.cabal 2017-04-01 02:56:37.000000000 +0200
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger-api
-version: 1.1
+version: 1.2
synopsis: Web API server for the hledger accounting tool
description: This is a simple web API server for hledger data.
It comes with a series of simple client-side web app examples.
@@ -20,11 +20,11 @@
bug-reports: http://bugs.hledger.org
author: Simon Michael <simon(a)joyful.com>
maintainer: Simon Michael <simon(a)joyful.com>
-license: GPL
+license: GPL-3
license-file: LICENSE
+tested-with: GHC==7.10.3, GHC==8.0
build-type: Simple
cabal-version: >= 1.10
-tested-with: GHC==7.10.3, GHC==8.0
extra-source-files:
CHANGES
@@ -44,10 +44,10 @@
executable hledger-api
main-is: hledger-api.hs
ghc-options: -threaded
- cpp-options: -DVERSION="1.1"
+ cpp-options: -DVERSION="1.2"
build-depends:
- hledger-lib >= 1.1 && < 1.2
- , hledger >= 1.1 && < 1.2
+ hledger-lib >= 1.2 && < 1.3
+ , hledger >= 1.2 && < 1.3
, base >=4.8 && <5
, aeson
, bytestring
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hledger-api-1.1/hledger-api.hs new/hledger-api-1.2/hledger-api.hs
--- old/hledger-api-1.1/hledger-api.hs 2016-12-31 16:54:47.000000000 +0100
+++ new/hledger-api-1.2/hledger-api.hs 2017-04-01 02:54:20.000000000 +0200
@@ -35,12 +35,12 @@
import Hledger.Query
import Hledger.Cli hiding (Reader, version)
-hledgerApiVersion="1.1"
+hledgerApiVersion="1.2"
-- https://github.com/docopt/docopt.hs#readme
doc :: Docopt
doc = [docopt|
-hledger-api 1.1
+hledger-api 1.2
Serves hledger data and reports as a JSON web API.
@@ -50,7 +50,7 @@
hledger-api --swagger
print API docs in Swagger 2.0 format
hledger-api --version
- hledger-api -h|--help|--info
+ hledger-api -h|--help|--man|--info
Options:
-f --file FILE use a different input file
1
0
Hello community,
here is the log from the commit of package hledger for openSUSE:Factory checked in at 2017-08-31 20:48:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hledger (Old)
and /work/SRC/openSUSE:Factory/.hledger.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hledger"
Thu Aug 31 20:48:48 2017 rev:2 rq:513566 version:1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hledger/hledger.changes 2017-04-18 13:51:24.741858929 +0200
+++ /work/SRC/openSUSE:Factory/.hledger.new/hledger.changes 2017-08-31 20:48:50.899584570 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:44 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.2 revision 1.
+
+-------------------------------------------------------------------
Old:
----
hledger-1.1.tar.gz
New:
----
hledger-1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hledger.spec ++++++
--- /var/tmp/diff_new_pack.pjFJPK/_old 2017-08-31 20:48:52.263393135 +0200
+++ /var/tmp/diff_new_pack.pjFJPK/_new 2017-08-31 20:48:52.267392574 +0200
@@ -19,7 +19,7 @@
%global pkg_name hledger
%bcond_with tests
Name: %{pkg_name}
-Version: 1.1
+Version: 1.2
Release: 0
Summary: Command-line interface for the hledger accounting tool
License: GPL-3.0+
@@ -41,6 +41,7 @@
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-haskeline-devel
+BuildRequires: ghc-here-devel
BuildRequires: ghc-hledger-lib-devel
BuildRequires: ghc-megaparsec-devel
BuildRequires: ghc-mtl-compat-devel
++++++ hledger-1.1.tar.gz -> hledger-1.2.tar.gz ++++++
++++ 12143 lines of diff (skipped)
++++++ hledger.cabal ++++++
--- /var/tmp/diff_new_pack.pjFJPK/_old 2017-08-31 20:48:52.511358329 +0200
+++ /var/tmp/diff_new_pack.pjFJPK/_new 2017-08-31 20:48:52.511358329 +0200
@@ -1,12 +1,10 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: hledger
-version: 1.1
+version: 1.2
x-revision: 1
-stability: stable
-category: Finance, Console
synopsis: Command-line interface for the hledger accounting tool
description: This is hledger's command-line interface.
Its basic function is to read a plain text file describing
@@ -18,15 +16,17 @@
with ledger(1). hledger provides command-line, curses and web
interfaces, and aims to be a reliable, practical tool for daily
use.
-license: GPL
-license-file: LICENSE
-author: Simon Michael <simon(a)joyful.com>
-maintainer: Simon Michael <simon(a)joyful.com>
+category: Finance, Console
+stability: stable
homepage: http://hledger.org
bug-reports: http://bugs.hledger.org
-cabal-version: >= 1.10
-build-type: Simple
+author: Simon Michael <simon(a)joyful.com>
+maintainer: Simon Michael <simon(a)joyful.com>
+license: GPL-3
+license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
bench/10000x1000x10.journal
@@ -75,24 +75,25 @@
default: True
flag threaded
- default: True
description: Build with support for multithreaded execution
manual: False
+ default: True
library
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ cpp-options: -DVERSION="1.2"
build-depends:
base >=4.8 && <5
, base-compat >=0.8.1
, directory
, file-embed >=0.0.10 && <0.1
, filepath
+ , here
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
- , hledger-lib >= 1.1 && < 1.2
+ , hledger-lib >= 1.2 && < 1.3
, bytestring
, containers
, unordered-containers
@@ -105,7 +106,7 @@
, mtl
, mtl-compat
, old-time
- , megaparsec >=5.0 && < 5.3
+ , megaparsec >=5.0 && < 5.4
, regex-tdfa
, safe >=0.2
, split >=0.1 && <0.3
@@ -145,6 +146,7 @@
Hledger.Cli.Accounts
Hledger.Cli.Balance
Hledger.Cli.Balancesheet
+ Hledger.Cli.BalanceView
Hledger.Cli.Cashflow
Hledger.Cli.Help
Hledger.Cli.Histogram
@@ -164,19 +166,20 @@
hs-source-dirs:
app
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ cpp-options: -DVERSION="1.2"
build-depends:
base >=4.8 && <5
, base-compat >=0.8.1
, directory
, file-embed >=0.0.10 && <0.1
, filepath
+ , here
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
- , hledger-lib >= 1.1 && < 1.2
- , hledger == 1.1
+ , hledger-lib >= 1.2 && < 1.3
+ , hledger == 1.2
, bytestring
, containers
, unordered-containers
@@ -225,19 +228,20 @@
hs-source-dirs:
test
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- cpp-options: -DVERSION="1.1"
+ cpp-options: -DVERSION="1.2"
build-depends:
base >=4.8 && <5
, base-compat >=0.8.1
, directory
, file-embed >=0.0.10 && <0.1
, filepath
+ , here
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
- , hledger-lib >= 1.1 && < 1.2
- , hledger == 1.1
+ , hledger-lib >= 1.2 && < 1.3
+ , hledger == 1.2
, bytestring
, containers
, unordered-containers
@@ -282,23 +286,23 @@
benchmark bench
type: exitcode-stdio-1.0
+ main-is: bench.hs
hs-source-dirs:
bench
- main-is: bench.hs
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans
- default-language: Haskell2010
build-depends:
base >=4.8 && <5
, base-compat >=0.8.1
, directory
, file-embed >=0.0.10 && <0.1
, filepath
+ , here
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
- , hledger-lib >= 1.1 && < 1.2
- , hledger == 1.1
+ , hledger-lib >= 1.2 && < 1.3
+ , hledger == 1.2
, criterion
, html
, timeit
@@ -309,3 +313,4 @@
else
build-depends:
time >=1.5
+ default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package ghc-rawfilepath for openSUSE:Factory checked in at 2017-08-31 20:48:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-rawfilepath (Old)
and /work/SRC/openSUSE:Factory/.ghc-rawfilepath.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-rawfilepath"
Thu Aug 31 20:48:45 2017 rev:2 rq:513464 version:0.2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-rawfilepath/ghc-rawfilepath.changes 2017-05-10 20:50:49.420255376 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-rawfilepath.new/ghc-rawfilepath.changes 2017-08-31 20:48:46.916143716 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:11 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.2.4.
+
+-------------------------------------------------------------------
Old:
----
rawfilepath-0.1.1.tar.gz
rawfilepath.cabal
New:
----
rawfilepath-0.2.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-rawfilepath.spec ++++++
--- /var/tmp/diff_new_pack.khztBf/_old 2017-08-31 20:48:47.900005613 +0200
+++ /var/tmp/diff_new_pack.khztBf/_new 2017-08-31 20:48:47.920002806 +0200
@@ -19,14 +19,13 @@
%global pkg_name rawfilepath
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.1
+Version: 0.2.4
Release: 0
Summary: Use RawFilePath instead of FilePath
License: Apache-2.0
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-bytestring-devel
BuildRequires: ghc-rpm-macros
@@ -51,7 +50,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ rawfilepath-0.1.1.tar.gz -> rawfilepath-0.2.4.tar.gz ++++++
++++ 2173 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-product-profunctors for openSUSE:Factory checked in at 2017-08-31 20:48:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-product-profunctors (Old)
and /work/SRC/openSUSE:Factory/.ghc-product-profunctors.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-product-profunctors"
Thu Aug 31 20:48:44 2017 rev:2 rq:513454 version:0.8.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-product-profunctors/ghc-product-profunctors.changes 2016-11-15 17:56:56.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-product-profunctors.new/ghc-product-profunctors.changes 2017-08-31 20:48:45.620325606 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:27 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.8.0.3.
+
+-------------------------------------------------------------------
Old:
----
1.cabal
product-profunctors-0.7.1.0.tar.gz
New:
----
product-profunctors-0.8.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-product-profunctors.spec ++++++
--- /var/tmp/diff_new_pack.xm01jw/_old 2017-08-31 20:48:46.580190873 +0200
+++ /var/tmp/diff_new_pack.xm01jw/_new 2017-08-31 20:48:46.588189750 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-product-profunctors
#
-# 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,23 +19,20 @@
%global pkg_name product-profunctors
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.7.1.0
+Version: 0.8.0.3
Release: 0
Summary: Product-profunctors
License: BSD-3-Clause
-Group: System/Libraries
+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
-# Begin cabal-rpm deps:
BuildRequires: ghc-contravariant-devel
BuildRequires: ghc-profunctors-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-tagged-devel
BuildRequires: ghc-template-haskell-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
Product profunctors.
@@ -54,22 +51,15 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ product-profunctors-0.7.1.0.tar.gz -> product-profunctors-0.8.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Class.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Class.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Class.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Class.hs 2017-02-25 23:59:20.000000000 +0100
@@ -1,12 +1,83 @@
module Data.Profunctor.Product.Class where
-import Data.Profunctor (Profunctor)
+import Data.Profunctor (Profunctor)
+import qualified Data.Profunctor as Profunctor
--- | A 'ProductProfunctor' is a generalization of an 'Applicative'.
--- It has an "input", contravariant type parameter on the left as well
--- as the usual 'Applicative' "output", covariant parameter on teh
--- right.
+-- | 'ProductProfunctor' is a generalization of 'Applicative'.
+--
+-- It has the usual 'Applicative' "output" (covariant) parameter on
+-- the right. Additionally it has an "input" (contravariant) type
+-- parameter on the left.
+--
+-- You will find it easier to see the correspondence between
+-- 'ProductProfunctor' and 'Applicative' if you look at @purePP@,
+-- @(***$)@, and @(****)@, which correspond to @pure@, @(\<$\>)@, and
+-- @(\<*\>)@ respectively.
+--
+-- @
+-- | Correspondence between Applicative and ProductProfunctor
+-- |
+-- | Applicative f ProductProfunctor p
+-- |
+-- | pure purePP
+-- | :: b -> f b :: b -> p a b
+-- |
+-- | (\<$\>) (***$)
+-- | :: (b -> b') :: (b -> b')
+-- | -> f b -> p a b
+-- | -> f b' -> p a b'
+-- |
+-- | (\<*\>) (****)
+-- | :: f (b -> b') :: p a (b -> b')
+-- | -> f b -> p a b
+-- | -> f b' -> p a b'
+-- @
+--
+-- It's easy to make instances of 'ProductProfunctor'. Just make
+-- instances
+--
+-- @
+-- instance Profunctor MyProductProfunctor where
+-- ...
+--
+-- instance Applicative (MyProductProfunctor a) where
+-- ...
+-- @
+--
+-- and then write
+--
+-- @
+-- instance ProductProfunctor MyProductProfunctor where
+-- purePP = pure
+-- (****) = (\<*\>)
+-- @
class Profunctor p => ProductProfunctor p where
- empty :: p () ()
- (***!) :: p a b -> p a' b' -> p (a, a') (b, b')
+ -- | 'purePP' is the generalisation of @Applicative@'s @pure@.
+ --
+ -- Aside from defining 'ProductProfunctor' instances you will
+ -- probably never need to use this; @pure@ should be sufficient (if
+ -- your 'ProductProfunctor' instance also has an @Applicative@
+ -- instance).
+ purePP :: b -> p a b
+ purePP b = Profunctor.dimap (const ()) (const b) empty
+
+ -- | '****' is the generalisation of @Applicative@'s @\<*\>@.
+ --
+ -- Aside from defining 'ProductProfunctor' instances you will you
+ -- will probably never need to use this; @\<*\>@ should be
+ -- sufficient (if your 'ProductProfunctor' instance has also been
+ -- given an @Applicative@ instance).
+ (****) :: p a (b -> c) -> p a b -> p a c
+ (****) f x = Profunctor.dimap dup (uncurry ($)) (f ***! x)
+ where dup y = (y, y)
+ -- | You probably never want to use 'empty' and it may be deprecated
+ -- in a future version.
+ empty :: p () ()
+ empty = purePP ()
+
+ -- | You probably never want to use '***!' and it may be
+ -- deprecated in a future version.
+ (***!) :: p a b -> p a' b' -> p (a, a') (b, b')
+ f ***! g = (,) `Profunctor.rmap` Profunctor.lmap fst f
+ **** Profunctor.lmap snd g
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Default.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Default.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Default.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Default.hs 2017-02-25 23:59:20.000000000 +0100
@@ -17,6 +17,7 @@
import Data.Profunctor.Product.Default.Class
import Data.Profunctor.Product.Tuples.TH (mkDefaultNs, maxTupleSize)
+-- | This will be deprecated in a future version
cdef :: Default (PPOfContravariant u) a a => u a
cdef = unPPOfContravariant def
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Internal/TH.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Internal/TH.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Internal/TH.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Internal/TH.hs 2017-02-25 23:59:20.000000000 +0100
@@ -3,8 +3,8 @@
module Data.Profunctor.Product.Internal.TH where
-import Data.Profunctor (dimap)
-import Data.Profunctor.Product
+import Data.Profunctor (dimap, lmap)
+import Data.Profunctor.Product hiding (constructor, field)
import Data.Profunctor.Product.Default (Default, def)
import qualified Data.Profunctor.Product.Newtype as N
import Language.Haskell.TH (Dec(DataD, SigD, FunD, InstanceD, NewtypeD),
@@ -31,17 +31,27 @@
makeAdaptorAndInstanceE :: Maybe String -> Info -> Either Error (Q [Dec])
makeAdaptorAndInstanceE adaptorNameM info = do
- (tyName, tyVars, conName, conTys) <- dataDecStuffOfInfo info
- let numTyVars = length tyVars
- numConTys = length conTys
+ dataDecStuff <- dataDecStuffOfInfo info
+ let tyName = dTyName dataDecStuff
+ tyVars = dTyVars dataDecStuff
+ conName = dConName dataDecStuff
+ conTys = dConTys dataDecStuff
+
+ numTyVars = length tyVars
+ numConTys = lengthCons conTys
defaultAdaptorName = (mkName . ("p" ++) . nameBase) conName
adaptorNameN = maybe defaultAdaptorName mkName adaptorNameM
adaptorSig' = adaptorSig tyName numTyVars adaptorNameN
- adaptorDefinition' = adaptorDefinition numTyVars conName adaptorNameN
+ adaptorDefinition' =
+ case conTys of ConTys _ ->
+ adaptorDefinition numTyVars conName adaptorNameN
+ FieldTys fieldTys ->
+ adaptorDefinitionFields conName fieldTys adaptorNameN
+
instanceDefinition' = instanceDefinition tyName numTyVars numConTys
adaptorNameN conName
- newtypeInstance' = if length conTys == 1 then
+ newtypeInstance' = if numConTys == 1 then
newtypeInstance conName tyName
else
return []
@@ -63,7 +73,23 @@
return [InstanceD [] (ConT ''N.Newtype `AppT` ConT tyName) body]
#endif
-dataDecStuffOfInfo :: Info -> Either Error (Name, [Name], Name, [Name])
+data ConTysFields = ConTys [Name]
+ -- ^^ The type of each constructor field
+ | FieldTys [(Name, Name)]
+ -- ^^ The fieldname and type of each constructor field
+
+lengthCons :: ConTysFields -> Int
+lengthCons (ConTys l) = length l
+lengthCons (FieldTys l) = length l
+
+data DataDecStuff = DataDecStuff {
+ dTyName :: Name
+ , dTyVars :: [Name]
+ , dConName :: Name
+ , dConTys :: ConTysFields
+ }
+
+dataDecStuffOfInfo :: Info -> Either Error DataDecStuff
#if __GLASGOW_HASKELL__ >= 800
dataDecStuffOfInfo (TyConI (DataD _cxt tyName tyVars _kind constructors _deriving)) =
#else
@@ -72,7 +98,12 @@
do
(conName, conTys) <- extractConstructorStuff constructors
let tyVars' = map varNameOfBinder tyVars
- return (tyName, tyVars', conName, conTys)
+ return DataDecStuff { dTyName = tyName
+ , dTyVars = tyVars'
+ , dConName = conName
+ , dConTys = conTys
+ }
+
#if __GLASGOW_HASKELL__ >= 800
dataDecStuffOfInfo (TyConI (NewtypeD _cxt tyName tyVars _kind constructor _deriving)) =
#else
@@ -81,25 +112,31 @@
do
(conName, conTys) <- extractConstructorStuff [constructor]
let tyVars' = map varNameOfBinder tyVars
- return (tyName, tyVars', conName, conTys)
+ return DataDecStuff { dTyName = tyName
+ , dTyVars = tyVars'
+ , dConName = conName
+ , dConTys = conTys
+ }
dataDecStuffOfInfo _ = Left "That doesn't look like a data or newtype declaration to me"
varNameOfType :: Type -> Either Error Name
varNameOfType (VarT n) = Right n
-varNameOfType x = Left $ "Found a non-variable type" ++ show x
+varNameOfType x = Left $ "Found a non-variable type " ++ show x
varNameOfBinder :: TyVarBndr -> Name
varNameOfBinder (PlainTV n) = n
varNameOfBinder (KindedTV n _) = n
-conStuffOfConstructor :: Con -> Either Error (Name, [Name])
+conStuffOfConstructor :: Con -> Either Error (Name, ConTysFields)
conStuffOfConstructor (NormalC conName st) = do
conTys <- mapM (varNameOfType . snd) st
- return (conName, conTys)
+ return (conName, ConTys conTys)
conStuffOfConstructor (RecC conName vst) = do
- conTys <- mapM (varNameOfType . thrd) vst
- return (conName, conTys)
- where thrd = \(_,_,x) -> x
+ conTys <- mapM nameType vst
+ return (conName, FieldTys conTys)
+ where nameType (n, _, VarT t) = Right (n, t)
+ nameType (_, _, x) = Left ("Found a non-variable type " ++ show x)
+
conStuffOfConstructor _ = Left "I can't deal with your constructor type"
constructorOfConstructors :: [Con] -> Either Error Con
@@ -108,7 +145,7 @@
constructorOfConstructors _many =
Left "I can't deal with more than one constructor"
-extractConstructorStuff :: [Con] -> Either Error (Name, [Name])
+extractConstructorStuff :: [Con] -> Either Error (Name, ConTysFields)
extractConstructorStuff = conStuffOfConstructor <=< constructorOfConstructors
instanceDefinition :: Name -> Int -> Int -> Name -> Name -> Q Dec
@@ -203,6 +240,33 @@
33 -> 'p33
34 -> 'p34
35 -> 'p35
+ 36 -> 'p36
+ 37 -> 'p37
+ 38 -> 'p38
+ 39 -> 'p39
+ 40 -> 'p40
+ 41 -> 'p41
+ 42 -> 'p42
+ 43 -> 'p43
+ 44 -> 'p44
+ 45 -> 'p45
+ 46 -> 'p46
+ 47 -> 'p47
+ 48 -> 'p48
+ 49 -> 'p49
+ 50 -> 'p50
+ 51 -> 'p51
+ 52 -> 'p52
+ 53 -> 'p53
+ 54 -> 'p54
+ 55 -> 'p55
+ 56 -> 'p56
+ 57 -> 'p57
+ 58 -> 'p58
+ 59 -> 'p59
+ 60 -> 'p60
+ 61 -> 'p61
+ 62 -> 'p62
_ -> error errorMsg
where errorMsg = "Data.Profunctor.Product.TH: "
++ show n
@@ -221,6 +285,26 @@
wheres = [toTuple conName (toTupleN, numConVars),
fromTuple conName (fromTupleN, numConVars)]
+adaptorDefinitionFields :: Name -> [(Name, name)] -> Name -> Dec
+adaptorDefinitionFields conName fieldsTys adaptorName =
+ FunD adaptorName [clause]
+ where fields = map fst fieldsTys
+ -- TODO: vv f should be generated in Q
+ fP = VarP (mkName "f")
+ fE = VarE (mkName "f")
+ clause = Clause [fP] (NormalB body) []
+ body = case fields of
+ [] -> error "Can't handle no fields in constructor"
+ field1:fields' -> let first = (VarE '(***$)) `AppE` (ConE conName)
+ `AppE` (theLmap field1)
+ app x y = (VarE '(****)) `AppE` x
+ `AppE` (theLmap y)
+ in foldl app first fields'
+
+ theLmap field = appEAll (VarE 'lmap)
+ [ VarE field
+ , VarE field `AppE` fE ]
+
xTuple :: ([Pat] -> Pat) -> ([Exp] -> Exp) -> (Name, Int) -> Dec
xTuple patCon retCon (funN, numTyVars) = FunD funN [clause]
where clause = Clause [pat] body []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/TH.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/TH.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/TH.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/TH.hs 2017-02-25 23:59:20.000000000 +0100
@@ -18,7 +18,7 @@
-- \"adaptor\" with the following splice:
--
-- @
--- $(makeAdaptorAndInstance \"pFoo\" ''Foo)
+-- \$(makeAdaptorAndInstance \"pFoo\" ''Foo)
-- @
--
-- The adaptor for a type @Foo@ is by convention called @pFoo@, but in
@@ -26,7 +26,7 @@
-- the name @pFoo@ yourself you can use
--
-- @
--- $(makeAdaptorAndInstance' ''Foo)
+-- \$(makeAdaptorAndInstance' ''Foo)
-- @
--
-- and it will be named @pFoo@ automatically.
@@ -34,8 +34,9 @@
-- @pFoo@ will have the type
--
-- @
--- pFoo :: ProductProfunctor p =>
--- Foo (p a a') (p b b') (p c c') -> p (Foo a b c) (Foo a' b' c')
+-- pFoo :: ProductProfunctor p
+-- => Foo (p a a') (p b b') (p c c')
+-- -> p (Foo a b c) (Foo a' b' c')
-- @
--
-- and the instance generated will be
@@ -50,8 +51,9 @@
-- (its implementation is given below).
--
-- @
--- pFooApplicative :: Applicative f =>
--- Foo (f a) (f b) (f c) -> f (Foo a b c)
+-- pFooApplicative :: Applicative f
+-- => Foo (f a) (f b) (f c)
+-- -> f (Foo a b c)
-- @
--
-- The product-profunctor \"adaptor\" (in this case @pFoo@) is a
@@ -77,7 +79,7 @@
-- @
-- instance 'N.Newtype' Foo where
-- 'N.constructor' = Foo
--- 'N.field' = \(Foo x) -> x
+-- 'N.field' = \\(Foo x) -> x
-- @
--
-- which allows you to use the polymorphic function 'N.pNewtype'
@@ -85,7 +87,7 @@
--
-- If you prefer not to use Template Haskell then the generated code
-- can be written by hand because it is quite simple. It corresponds
--- very closely to what you would do in the more familiar
+-- very closely to what we would do in the more familiar
-- @Applicative@ case. For an @Applicative@ we would write
--
-- @
@@ -126,7 +128,7 @@
-- | For example
--
-- @
--- $(makeAdaptorAndInstance \"pFoo\" ''Foo)
+-- \$(makeAdaptorAndInstance \"pFoo\" ''Foo)
-- @
--
-- generates the 'Default' instance and the adaptor @pFoo@.
@@ -136,7 +138,7 @@
-- | For example
--
-- @
--- $(makeAdaptorAndInstance ''Foo)
+-- \$(makeAdaptorAndInstance ''Foo)
-- @
--
-- generates the 'Default' instance and the adaptor @pFoo@. The name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Tuples/TH.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Tuples/TH.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Tuples/TH.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Tuples/TH.hs 2017-02-25 23:59:20.000000000 +0100
@@ -14,6 +14,7 @@
import Data.Profunctor (Profunctor (dimap))
import Data.Profunctor.Product.Class (ProductProfunctor, (***!), empty)
import Data.Profunctor.Product.Default.Class (Default (def))
+import Control.Applicative (pure)
mkTs :: [Int] -> Q [Dec]
mkTs = mapM mkT
@@ -37,12 +38,18 @@
pTns :: [Int] -> Q [Dec]
pTns = fmap concat . mapM pTn
+productProfunctor :: Name -> Q Pred
+productProfunctor p = classP ''ProductProfunctor [pure (VarT p)]
+
+default_ :: Name -> Name -> Name -> Q Pred
+default_ p a b = classP ''Default (map (pure . VarT) [p, a, b])
+
pTn :: Int -> Q [Dec]
pTn n = sequence [sig, fun]
where
p = mkName "p"
sig = sigD (pT n) (forallT (map PlainTV $ p : take n as ++ take n bs)
- (pure [ConT ''ProductProfunctor `AppT` VarT p])
+ (sequence [productProfunctor p])
(arrowT `appT` mkLeftTy `appT` mkRightTy)
)
mkLeftTy = foldl appT (conT tN)
@@ -115,7 +122,7 @@
pN n = sequence [sig, fun]
where
sig = sigD nm (forallT (map PlainTV $ p : as ++ bs)
- (pure [ConT ''ProductProfunctor `AppT` VarT p])
+ (sequence [productProfunctor p])
(arrowT `appT` mkLeftTy `appT` mkRightTy)
)
mkLeftTy = case n of
@@ -146,11 +153,11 @@
mkDefaultNs = mapM mkDefaultN
mkDefaultN :: Int -> Q Dec
-mkDefaultN n = instanceD (pure (ConT ''ProductProfunctor `AppT` VarT p : mkDefs))
+mkDefaultN n = instanceD (sequence (productProfunctor p : mkDefs))
(conT ''Default `appT` varT p `appT` mkTupT as `appT` mkTupT bs)
[mkFun]
where
- mkDefs = zipWith (\a b -> ConT ''Default `AppT` VarT p `AppT` VarT a `AppT` VarT b) as bs
+ mkDefs = zipWith (\a b -> default_ p a b) as bs
mkTupT = foldl appT (tupleT n) . map varT
mkFun = funD 'def [clause [] bdy []]
bdy = normalB $ case n of
@@ -161,4 +168,4 @@
bs = take n [ mkName $ 'b':show i | i <- [0::Int ..] ]
maxTupleSize :: Int
-maxTupleSize = 35
+maxTupleSize = 62
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Tuples.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Tuples.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product/Tuples.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product/Tuples.hs 2017-02-25 23:59:20.000000000 +0100
@@ -1,6 +1,10 @@
{-# LANGUAGE TemplateHaskell #-}
+
+-- | This is old cruft. You should never use this and it will likely
+-- be deprecated in a future version.
+
module Data.Profunctor.Product.Tuples where
import Data.Profunctor.Product.Tuples.TH
-mkTs [0..35]
+mkTs [0..maxTupleSize]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/Data/Profunctor/Product.hs new/product-profunctors-0.8.0.3/Data/Profunctor/Product.hs
--- old/product-profunctors-0.7.1.0/Data/Profunctor/Product.hs 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/Data/Profunctor/Product.hs 2017-02-25 23:59:20.000000000 +0100
@@ -9,7 +9,7 @@
import Data.Functor.Contravariant (Contravariant, contramap)
import Control.Category (id)
import Control.Arrow (Arrow, (***), (<<<), arr, (&&&))
-import Control.Applicative (Applicative, liftA2, pure)
+import Control.Applicative (Applicative, liftA2, pure, (<*>))
import Data.Monoid (Monoid, mempty, (<>))
import Data.Profunctor.Product.Newtype
@@ -63,65 +63,24 @@
-- Still, at least we now have default implementations of the class
-- methods, which makes things simpler.
--- This appears to be just 'Data.Functor.Contravariant.Divisible'
-class Contravariant f => ProductContravariant f where
- point :: f ()
- (***<) :: f a -> f b -> f (a, b)
-
--- | This is exactly the same as @Applicative@'s @\<*\>@, but for a
--- 'ProductProfunctor'.
-(****) :: ProductProfunctor p => p a (b -> c) -> p a b -> p a c
-(****) f x = Profunctor.dimap dup (uncurry ($)) (f ***! x)
- where dup y = (y, y)
-
--- | This is exactly 'Profunctor.rmap', given a name which highlights
--- the similarity to @Applicative@'s @\<$\>@.
+-- | '***$' is the generalisation of @Applicative@'s @\<$\>@.
+--
+-- '***$' = 'Profunctor.rmap', just like '<$>' = 'fmap'.
+--
+-- You will probably never need to use this; @\<$\>@ should be
+-- sufficient (if your 'ProductProfunctor' instance has also been given
+-- a @Functor@ instance).
(***$) :: ProductProfunctor p => (b -> c) -> p a b -> p a c
(***$) = Profunctor.rmap
-defaultEmpty :: Applicative (p ()) => p () ()
-defaultEmpty = pure ()
-
-defaultProfunctorProduct :: (Applicative (p (a, a')), Profunctor p)
- => p a b -> p a' b' -> p (a, a') (b, b')
-defaultProfunctorProduct p p' = liftA2 (,) (lmap fst p) (lmap snd p')
-
-defaultPoint :: Monoid (p ()) => p ()
-defaultPoint = mempty
-
-defaultContravariantProduct :: (Contravariant f, Monoid (f (a, b)))
- => f a -> f b -> f (a, b)
-defaultContravariantProduct p p' = contramap fst p <> contramap snd p'
-
-newtype PPOfContravariant f a b = PPOfContravariant (f a)
-
-unPPOfContravariant :: PPOfContravariant c a a -> c a
-unPPOfContravariant (PPOfContravariant pp) = pp
-
-instance Contravariant f => Profunctor (PPOfContravariant f) where
- dimap f _ (PPOfContravariant p) = PPOfContravariant (contramap f p)
-
-instance ProductContravariant f => ProductProfunctor (PPOfContravariant f) where
- empty = PPOfContravariant point
- PPOfContravariant f ***! PPOfContravariant f' = PPOfContravariant (f ***< f')
-
instance ProductProfunctor (->) where
- empty = id
- (***!) = (***)
+ purePP = pure
+ (****) = (<*>)
instance Arrow arr => ProductProfunctor (WrappedArrow arr) where
- empty = id
+ empty = id
(***!) = (***)
-data AndArrow arr z a b = AndArrow { runAndArrow :: arr z b }
-
-instance Arrow arr => Profunctor (AndArrow arr z) where
- dimap _ f (AndArrow g) = AndArrow (arr f <<< g)
-
-instance Arrow arr => ProductProfunctor (AndArrow arr z) where
- empty = AndArrow (arr (const ()))
- (AndArrow f) ***! (AndArrow f') = AndArrow (f &&& f')
-
-- { Sum
class Profunctor p => SumProfunctor p where
@@ -132,6 +91,10 @@
instance SumProfunctor (->) where
f +++! g = either (Left . f) (Right . g)
+-- | A generalisation of @map :: (a -> b) -> [a] -> [b]@. It is also,
+-- in spirit, a generalisation of @traverse :: (a -> f b) -> [a] -> f
+-- [b]@, but the types need to be shuffled around a bit to make that
+-- work.
list :: (ProductProfunctor p, SumProfunctor p) => p a b -> p [a] [b]
list p = Profunctor.dimap fromList toList (empty +++! (p ***! list p))
where toList :: Either () (a, [a]) -> [a]
@@ -148,3 +111,57 @@
pTns [0..maxTupleSize]
pNs [0..maxTupleSize]
+
+-- { Deprecated stuff
+
+-- | You probably never want to use 'defaultEmpty' and it may be
+-- deprecated in a later version.
+defaultEmpty :: Applicative (p ()) => p () ()
+defaultEmpty = pure ()
+
+-- | You probably never want to use 'defaultProfunctorProduct' and it
+-- may be deprecated in a later version.
+defaultProfunctorProduct :: (Applicative (p (a, a')), Profunctor p)
+ => p a b -> p a' b' -> p (a, a') (b, b')
+defaultProfunctorProduct p p' = liftA2 (,) (lmap fst p) (lmap snd p')
+
+-- | You probably never want to use 'defaultPoint' and it may be
+-- deprecated in a later version.
+defaultPoint :: Monoid (p ()) => p ()
+defaultPoint = mempty
+
+{-# DEPRECATED ProductContravariant "Use Data.Functor.Contravariant.Divisible instead" #-}
+class Contravariant f => ProductContravariant f where
+ point :: f ()
+ (***<) :: f a -> f b -> f (a, b)
+
+{-# DEPRECATED AndArrow "If you really need this, file an issue. It will go soon." #-}
+data AndArrow arr z a b = AndArrow { runAndArrow :: arr z b }
+
+instance Arrow arr => Profunctor (AndArrow arr z) where
+ dimap _ f (AndArrow g) = AndArrow (arr f <<< g)
+
+instance Arrow arr => ProductProfunctor (AndArrow arr z) where
+ empty = AndArrow (arr (const ()))
+ (AndArrow f) ***! (AndArrow f') = AndArrow (f &&& f')
+
+{-# DEPRECATED defaultContravariantProduct "defaultContravariantProduct will be removed" #-}
+defaultContravariantProduct :: (Contravariant f, Monoid (f (a, b)))
+ => f a -> f b -> f (a, b)
+defaultContravariantProduct p p' = contramap fst p <> contramap snd p'
+
+{-# DEPRECATED PPOfContravariant "PPOfContravariant will be removed" #-}
+newtype PPOfContravariant f a b = PPOfContravariant (f a)
+
+{-# DEPRECATED unPPOfContravariant "unPPOfContravariant will be removed" #-}
+unPPOfContravariant :: PPOfContravariant c a a -> c a
+unPPOfContravariant (PPOfContravariant pp) = pp
+
+instance Contravariant f => Profunctor (PPOfContravariant f) where
+ dimap f _ (PPOfContravariant p) = PPOfContravariant (contramap f p)
+
+instance ProductContravariant f => ProductProfunctor (PPOfContravariant f) where
+ empty = PPOfContravariant point
+ PPOfContravariant f ***! PPOfContravariant f' = PPOfContravariant (f ***< f')
+
+-- }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/LICENSE new/product-profunctors-0.8.0.3/LICENSE
--- old/product-profunctors-0.7.1.0/LICENSE 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/LICENSE 2017-02-25 23:59:20.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2013, Karamaan Group LLC
+Copyright (c) 2013, Karamaan Group LLC; 2014-2017 Purely Agile Limited
All rights reserved.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-profunctors-0.7.1.0/product-profunctors.cabal new/product-profunctors-0.8.0.3/product-profunctors.cabal
--- old/product-profunctors-0.7.1.0/product-profunctors.cabal 2016-05-28 09:39:24.000000000 +0200
+++ new/product-profunctors-0.8.0.3/product-profunctors.cabal 2017-02-25 23:59:20.000000000 +0100
@@ -1,21 +1,24 @@
name: product-profunctors
-version: 0.7.1.0
+copyright: Copyright (c) 2013, Karamaan Group LLC; 2014-2017 Purely Agile Limited
+version: 0.8.0.3
synopsis: product-profunctors
description: Product profunctors
homepage: https://github.com/tomjaguarpaw/product-profunctors
license: BSD3
-license-File: LICENSE
+license-file: LICENSE
author: Purely Agile
maintainer: Purely Agile
category: Control, Category
build-type: Simple
-cabal-version: >= 1.8
+cabal-version: >= 1.18
+tested-with: GHC==8.0.1, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
source-repository head
- Type: git
- Location: https://github.com/tomjaguarpaw/product-profunctors
+ type: git
+ location: https://github.com/tomjaguarpaw/product-profunctors
library
+ default-language: Haskell2010
build-depends: base >= 4.5 && < 5
, profunctors >= 4.0 && < 5.3
, contravariant >= 0.4 && < 1.5
@@ -37,6 +40,7 @@
build-depends: transformers >= 0.2 && < 0.6
test-suite test
+ default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules: CheckTypes,
1
0
Hello community,
here is the log from the commit of package ghc-primitive for openSUSE:Factory checked in at 2017-08-31 20:48:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-primitive (Old)
and /work/SRC/openSUSE:Factory/.ghc-primitive.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-primitive"
Thu Aug 31 20:48:42 2017 rev:11 rq:513453 version:0.6.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-primitive/ghc-primitive.changes 2016-07-27 16:09:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-primitive.new/ghc-primitive.changes 2017-08-31 20:48:43.884569250 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:15 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.6.2.0 revision 1.
+
+-------------------------------------------------------------------
Old:
----
1.cabal
primitive-0.6.1.0.tar.gz
New:
----
primitive-0.6.2.0.tar.gz
primitive.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-primitive.spec ++++++
--- /var/tmp/diff_new_pack.2FGLHn/_old 2017-08-31 20:48:44.864431709 +0200
+++ /var/tmp/diff_new_pack.2FGLHn/_new 2017-08-31 20:48:44.888428341 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-primitive
#
-# 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,20 +18,18 @@
%global pkg_name primitive
Name: ghc-%{pkg_name}
-Version: 0.6.1.0
+Version: 0.6.2.0
Release: 0
Summary: Primitive memory-related operations
License: BSD-3-Clause
-Group: System/Libraries
+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
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
-# Begin cabal-rpm deps:
BuildRequires: ghc-transformers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
This package provides various primitive memory-related operations.
@@ -51,15 +49,12 @@
%setup -q -n %{pkg_name}-%{version}
cp -p %{SOURCE1} %{pkg_name}.cabal
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%post devel
%ghc_pkg_recache
++++++ primitive-0.6.1.0.tar.gz -> primitive-0.6.2.0.tar.gz ++++++
++++ 1720 lines of diff (skipped)
++++++ primitive.cabal ++++++
Name: primitive
Version: 0.6.2.0
x-revision: 1
License: BSD3
License-File: LICENSE
Author: Roman Leshchinskiy <rl(a)cse.unsw.edu.au>
Maintainer: libraries(a)haskell.org
Copyright: (c) Roman Leshchinskiy 2009-2012
Homepage: https://github.com/haskell/primitive
Bug-Reports: https://github.com/haskell/primitive/issues
Category: Data
Synopsis: Primitive memory-related operations
Cabal-Version: >= 1.10
Build-Type: Simple
Description: This package provides various primitive memory-related operations.
Extra-Source-Files: changelog.md
Tested-With:
GHC == 7.4.2,
GHC == 7.6.3,
GHC == 7.8.4,
GHC == 7.10.3,
GHC == 8.0.1
Library
Default-Language: Haskell2010
Other-Extensions:
BangPatterns, CPP, DeriveDataTypeable,
MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes
Exposed-Modules:
Control.Monad.Primitive
Data.Primitive
Data.Primitive.MachDeps
Data.Primitive.Types
Data.Primitive.Array
Data.Primitive.ByteArray
Data.Primitive.SmallArray
Data.Primitive.UnliftedArray
Data.Primitive.Addr
Data.Primitive.MutVar
Other-Modules:
Data.Primitive.Internal.Compat
Data.Primitive.Internal.Operations
Build-Depends: base >= 4.5 && < 4.11
, ghc-prim >= 0.2 && < 0.6
, transformers >= 0.2 && < 0.6
Ghc-Options: -O2 -Wall
Include-Dirs: cbits
Install-Includes: primitive-memops.h
includes: primitive-memops.h
c-sources: cbits/primitive-memops.c
cc-options: -O3 -fomit-frame-pointer -Wall
if !os(solaris)
cc-options: -ftree-vectorize
if arch(i386) || arch(x86_64)
cc-options: -msse2
test-suite test
Default-Language: Haskell2010
hs-source-dirs: test
main-is: main.hs
type: exitcode-stdio-1.0
build-depends: base
, ghc-prim
, primitive
ghc-options: -O2
source-repository head
type: git
location: https://github.com/haskell/primitive
1
0
Hello community,
here is the log from the commit of package ghc-pipes-cacophony for openSUSE:Factory checked in at 2017-08-31 20:48:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pipes-cacophony (Old)
and /work/SRC/openSUSE:Factory/.ghc-pipes-cacophony.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pipes-cacophony"
Thu Aug 31 20:48:40 2017 rev:3 rq:513450 version:0.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pipes-cacophony/ghc-pipes-cacophony.changes 2017-04-18 13:48:34.569944394 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-pipes-cacophony.new/ghc-pipes-cacophony.changes 2017-08-31 20:48:41.980836473 +0200
@@ -1,0 +2,10 @@
+Sun Jul 30 03:01:24 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.5.0 revision 1.
+
+-------------------------------------------------------------------
+Thu Jul 27 14:07:28 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.5.0.
+
+-------------------------------------------------------------------
Old:
----
pipes-cacophony-0.4.1.tar.gz
New:
----
pipes-cacophony-0.5.0.tar.gz
pipes-cacophony.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-pipes-cacophony.spec ++++++
--- /var/tmp/diff_new_pack.OwpGHg/_old 2017-08-31 20:48:43.120676476 +0200
+++ /var/tmp/diff_new_pack.OwpGHg/_new 2017-08-31 20:48:43.128675353 +0200
@@ -19,17 +19,17 @@
%global pkg_name pipes-cacophony
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.4.1
+Version: 0.5.0
Release: 0
Summary: Pipes for Noise-secured network connections
License: SUSE-Public-Domain
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-bytestring-devel
BuildRequires: ghc-cacophony-devel
-BuildRequires: ghc-memory-devel
BuildRequires: ghc-pipes-devel
BuildRequires: ghc-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -55,6 +55,7 @@
%prep
%setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ pipes-cacophony-0.4.1.tar.gz -> pipes-cacophony-0.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/.travis.yml new/pipes-cacophony-0.5.0/.travis.yml
--- old/pipes-cacophony-0.4.1/.travis.yml 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/.travis.yml 2017-06-26 18:13:04.000000000 +0200
@@ -1,81 +1,36 @@
-# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
language: c
-sudo: false
+dist: trusty
cache:
directories:
- - $HOME/.cabsnap
- - $HOME/.cabal/packages
+ - $HOME/.stack
-before_cache:
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
+addons:
+ apt:
+ packages:
+ - libgmp-dev
matrix:
include:
- - env: CABALVER=1.22 GHCVER=7.10.3
- compiler: ": #GHC 7.10.3"
- addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
- - env: CABALVER=1.24 GHCVER=8.0.2
- compiler: ": #GHC 8.0.2"
- addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
- - env: CABALVER=head GHCVER=head
- compiler: ": #GHC head"
- addons: {apt: {packages: [cabal-install-head,ghc-head,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
+ - env: ARGS="--resolver lts-8"
+ compiler: ": #stack 8.0.2"
+
+ - env: ARGS="--resolver nightly"
+ compiler: ": #stack nightly"
allow_failures:
- - env: CABALVER=head GHCVER=head
+ - env: ARGS="--resolver nightly"
+ compiler: ": #stack nightly"
before_install:
- unset CC
- - export HAPPYVER=1.19.5
- - export ALEXVER=3.1.7
- - export PATH=~/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:/opt/alex/$ALEXVER/bin:$PATH
+ - mkdir -p ~/.local/bin
+ - export PATH=$HOME/.local/bin:$PATH
+ - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
install:
- - cabal --version
- - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
- then
- zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
- $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
- fi
- - travis_retry cabal update
- - "sed -i 's/^jobs:.*$/jobs: 2/' $HOME/.cabal/config"
- - cabal install --only-dependencies --enable-tests -fbuild-examples --dry -v pipes-cacophony.cabal > installplan.txt
- - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
-
- # check whether current requested install-plan matches cached package-db snapshot
- - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
- then
- echo "cabal build-cache HIT";
- rm -rfv .ghc;
- cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
- cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
- else
- echo "cabal build-cache MISS";
- rm -rf $HOME/.cabsnap;
- mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
- cabal install --only-dependencies --enable-tests -fbuild-examples pipes-cacophony.cabal;
- fi
-
- # snapshot package-db on cache miss
- - if [ ! -d $HOME/.cabsnap ];
- then
- echo "snapshotting package-db to build-cache";
- mkdir $HOME/.cabsnap;
- cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
- cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
- fi
+ - stack $ARGS setup
script:
- - cabal configure --enable-tests -fbuild-examples -v2 # -v2 provides useful information for debugging
- - cabal build # this builds all libraries and executables (including tests)
- - cabal test
- - cabal sdist # tests that a source-distribution can be generated
-
- # Check that the resulting source distribution can be built & installed.
- # If there are no other `.tar.gz` files in `dist`, this can be even simpler:
- # `cabal install --force-reinstalls dist/*-*.tar.gz`
- - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
- (cd dist && cabal install --enable-tests --run-tests -fbuild-examples --force-reinstalls "$SRC_TGZ")
+ - stack $ARGS --no-terminal test --flag "pipes-cacophony:build-examples" --haddock --no-haddock-deps
+ - stack sdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/changelog.md new/pipes-cacophony-0.5.0/changelog.md
--- old/pipes-cacophony-0.4.1/changelog.md 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/changelog.md 2017-06-26 18:13:04.000000000 +0200
@@ -1,3 +1,7 @@
+# 0.5.0
+
+* Brought up to date with cacophony API changes
+
# 0.4.1
* Brought up to date with cacophony API changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/examples/loopback/Main.hs new/pipes-cacophony-0.5.0/examples/loopback/Main.hs
--- old/pipes-cacophony-0.4.1/examples/loopback/Main.hs 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/examples/loopback/Main.hs 2017-06-26 18:13:04.000000000 +0200
@@ -1,10 +1,8 @@
module Main where
-import Control.Exception (SomeException)
-import Control.Lens
import Control.Monad (forever)
-import Data.ByteArray (ScrubbedBytes, convert)
import Data.ByteString.Char8 (unpack, pack)
+import Data.Maybe (fromMaybe)
import Pipes
import qualified Pipes.Prelude as P
@@ -17,28 +15,49 @@
import Pipes.Noise
-strToSB :: Pipe String ScrubbedBytes IO (Either SomeException ())
+strToSB :: (Cipher c, DH d, Hash h)
+ => Pipe String ScrubbedBytes IO (NoiseResult c d h)
strToSB = forever $ await >>= yield . convert . pack
-sbToStr :: Pipe ScrubbedBytes String IO (Either SomeException ())
+sbToStr :: (Cipher c, DH d, Hash h)
+ => Pipe ScrubbedBytes String IO (NoiseResult c d h)
sbToStr = forever $ await >>= yield . unpack . convert
+performHandshake :: (Cipher c, DH d, Hash h)
+ => NoiseState c d h
+ -> NoiseState c d h
+ -> (NoiseState c d h, NoiseState c d h)
+performHandshake ins rns = (ins'', rns'')
+ where
+ (NoiseResultMessage ct ins') = writeMessage mempty ins
+ (NoiseResultMessage _ rns') = readMessage ct rns
+ (NoiseResultMessage ct' rns'') = writeMessage mempty rns'
+ (NoiseResultMessage _ ins'') = readMessage ct' ins'
+
main :: IO ()
main = do
iek <- dhGenKey :: IO (KeyPair Curve25519)
rek <- dhGenKey :: IO (KeyPair Curve25519)
- let idho = defaultHandshakeOpts noiseNN InitiatorRole
- rdho = defaultHandshakeOpts noiseNN ResponderRole
- iho = idho & hoLocalEphemeral .~ Just iek
- rho = rdho & hoLocalEphemeral .~ Just rek
- ins = noiseState iho :: NoiseState ChaChaPoly1305 Curve25519 SHA256
- rns = noiseState rho :: NoiseState ChaChaPoly1305 Curve25519 SHA256
-
- (iip, iop) <- mkNoisePipes ins
- (rip, rop) <- mkNoisePipes rns
-
- result <- runEffect $ (Right () <$ P.stdinLn) >-> strToSB >-> iop >-> rip >-> rop >-> iip >-> sbToStr >-> (Right () <$ P.stdoutLn)
+ let idho = defaultHandshakeOpts InitiatorRole "cacophony"
+ rdho = defaultHandshakeOpts ResponderRole "cacophony"
+ iho = setLocalEphemeral (Just iek) idho
+ rho = setLocalEphemeral (Just rek) rdho
+ ins = noiseState iho noiseNN :: NoiseState ChaChaPoly1305 Curve25519 SHA256
+ rns = noiseState rho noiseNN :: NoiseState ChaChaPoly1305 Curve25519 SHA256
+
+ (ins', rns') = performHandshake ins rns
+ (iip, iop) = fromMaybe (error "unable to make Noise pipe") $ mkNoisePipes ins'
+ (rip, rop) = fromMaybe (error "unable to make Noise pipe") $ mkNoisePipes rns'
+
+ result <- runEffect $ (undefined <$ P.stdinLn)
+ >-> strToSB
+ >-> iop
+ >-> rip
+ >-> rop
+ >-> iip
+ >-> sbToStr
+ >-> (undefined <$ P.stdoutLn)
case result of
- Left e -> print e
- Right _ -> return ()
+ NoiseResultException ex -> print ex
+ _ -> return ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/package.yaml new/pipes-cacophony-0.5.0/package.yaml
--- old/pipes-cacophony-0.4.1/package.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pipes-cacophony-0.5.0/package.yaml 2017-06-26 18:20:38.000000000 +0200
@@ -0,0 +1,79 @@
+name: pipes-cacophony
+synopsis: Pipes for Noise-secured network connections.
+version: 0.5.0
+license: PublicDomain
+license-file: LICENSE
+maintainer: John Galt <jgalt(a)centromere.net>
+category: Cryptography
+github: centromere/pipes-cacophony
+ghc-options: -Wall
+description: |
+ A set of pipes to secure network connections with the
+ <https://github.com/trevp/noise/blob/master/noise.md Noise> protocol.
+extra-source-files:
+ - .travis.yml
+ - README.md
+ - changelog.md
+ - LICENSE
+ - stack.yaml
+ - package.yaml
+ - tests/.hlint
+
+flags:
+ build-examples:
+ description: Build examples
+ default: False
+ manual: True
+
+library:
+ source-dirs: src
+ dependencies:
+ - base >= 4.9 && < 4.10
+ - bytestring
+ - cacophony >= 0.10
+ - pipes
+
+ exposed-modules:
+ - Pipes.Noise
+
+ default-extensions:
+ - OverloadedStrings
+
+tests:
+ hlint:
+ main: hlint.hs
+ source-dirs: tests/hlint
+ dependencies:
+ - base >= 4.9 && < 4.10
+ - hlint
+
+ ghc-options:
+ - -O2
+ - -rtsopts
+ - -threaded
+ - -with-rtsopts=-N
+
+executables:
+ loopback:
+ source-dirs: examples/loopback
+ main: Main.hs
+ when:
+ - condition: 'flag(build-examples)'
+ then:
+ dependencies:
+ - base >= 4.9 && < 4.10
+ - bytestring
+ - cacophony >= 0.10
+ - pipes
+ - pipes-cacophony
+ else:
+ buildable: False
+
+ ghc-options:
+ - -O2
+ - -rtsopts
+ - -threaded
+ - -with-rtsopts=-N
+
+ default-extensions:
+ - OverloadedStrings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/pipes-cacophony.cabal new/pipes-cacophony-0.5.0/pipes-cacophony.cabal
--- old/pipes-cacophony-0.4.1/pipes-cacophony.cabal 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/pipes-cacophony.cabal 2017-06-26 18:23:31.000000000 +0200
@@ -1,106 +1,79 @@
-name: pipes-cacophony
-version: 0.4.1
-synopsis: Pipes for Noise-secured network connections.
-license: PublicDomain
-license-file: LICENSE
-author: John Galt
-maintainer: jgalt(a)centromere.net
-homepage: https://github.com/centromere/pipes-cacophony
-bug-reports: https://github.com/centromere/pipes-cacophony/issues
-category: Pipes, Cryptography
-build-type: Simple
-cabal-version: >=1.10
-tested-with: GHC == 7.10.3, GHC == 8.0.2
-description:
- A set of pipes to secure network connections with the
- <https://github.com/trevp/noise/blob/master/noise.md Noise> protocol.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
+--
+-- see: https://github.com/sol/hpack
+
+name: pipes-cacophony
+version: 0.5.0
+synopsis: Pipes for Noise-secured network connections.
+description: A set of pipes to secure network connections with the
+ <https://github.com/trevp/noise/blob/master/noise.md Noise> protocol.
+category: Cryptography
+homepage: https://github.com/centromere/pipes-cacophony#readme
+bug-reports: https://github.com/centromere/pipes-cacophony/issues
+maintainer: John Galt <jgalt(a)centromere.net>
+license: PublicDomain
+license-file: LICENSE
+build-type: Simple
+cabal-version: >= 1.10
extra-source-files:
- .travis.yml
- README.md
- changelog.md
- LICENSE
- tests/.hlint
+ .travis.yml
+ changelog.md
+ LICENSE
+ package.yaml
+ README.md
+ stack.yaml
+ tests/.hlint
source-repository head
type: git
- location: https://github.com/centromere/pipes-cacophony.git
-
---------------------------------------------------------------------------------
--- FLAGS
-
-flag hlint
- description: Build hlint test
+ location: https://github.com/centromere/pipes-cacophony
flag build-examples
- description: Build example executables
- default: False
+ description: Build examples
manual: True
-
-flag llvm
default: False
- manual: True
-
---------------------------------------------------------------------------------
--- LIBRARY
library
+ hs-source-dirs:
+ src
+ default-extensions: OverloadedStrings
+ ghc-options: -Wall
build-depends:
- base >=4.8 && <5,
- bytestring,
- cacophony >=0.9,
- memory,
- pipes
- hs-source-dirs: src
- default-language: Haskell2010
+ base >= 4.9 && < 4.10
+ , bytestring
+ , cacophony >= 0.10
+ , pipes
exposed-modules:
- Pipes.Noise
- ghc-options: -Wall -fwarn-tabs
-
- if flag(llvm)
- ghc-options: -fllvm
-
---------------------------------------------------------------------------------
--- EXAMPLES
-
-executable loopback
+ Pipes.Noise
+ other-modules:
+ Paths_pipes_cacophony
default-language: Haskell2010
- hs-source-dirs: examples/loopback
- main-is: Main.hs
+executable loopback
+ main-is: Main.hs
+ hs-source-dirs:
+ examples/loopback
+ default-extensions: OverloadedStrings
+ ghc-options: -Wall -O2 -rtsopts -threaded -with-rtsopts=-N
if flag(build-examples)
build-depends:
- base >=4.8 && <5,
- bytestring,
- cacophony >=0.9,
- lens,
- memory,
- pipes,
- pipes-cacophony
+ base >= 4.9 && < 4.10
+ , bytestring
+ , cacophony >= 0.10
+ , pipes
+ , pipes-cacophony
else
buildable: False
-
- ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N -Wall -fwarn-tabs
-
- if flag(llvm)
- ghc-options: -fllvm
-
---------------------------------------------------------------------------------
--- TESTS
+ default-language: Haskell2010
test-suite hlint
- type: exitcode-stdio-1.0
- main-is: hlint.hs
- ghc-options: -Wall -fwarn-tabs
- hs-source-dirs: tests
+ type: exitcode-stdio-1.0
+ main-is: hlint.hs
+ hs-source-dirs:
+ tests/hlint
+ ghc-options: -Wall -O2 -rtsopts -threaded -with-rtsopts=-N
+ build-depends:
+ base >= 4.9 && < 4.10
+ , hlint
default-language: Haskell2010
-
- if !flag(hlint)
- buildable: False
- else
- build-depends:
- base >=4.8 && <5,
- hlint
-
- if flag(llvm)
- ghc-options: -fllvm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/src/Pipes/Noise.hs new/pipes-cacophony-0.5.0/src/Pipes/Noise.hs
--- old/pipes-cacophony-0.4.1/src/Pipes/Noise.hs 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/src/Pipes/Noise.hs 2017-06-26 18:17:46.000000000 +0200
@@ -1,4 +1,3 @@
-{-# LANGUAGE OverloadedStrings #-}
----------------------------------------------------------------
-- |
-- Module : Pipes.Noise
@@ -14,16 +13,13 @@
, mkNoisePipes
) where
-import Control.Concurrent.MVar (MVar, newMVar, putMVar, takeMVar)
-import Control.Exception (SomeException)
-import Data.ByteArray (ScrubbedBytes)
-import Data.ByteString (ByteString)
-import Pipes (Pipe, MonadIO, await, yield, liftIO)
-
-import Crypto.Noise.Cipher (Cipher)
-import Crypto.Noise.DH (DH)
-import Crypto.Noise.Hash (Hash)
+import Data.ByteString (ByteString)
+import Pipes (Pipe, await, yield)
+
import Crypto.Noise
+import Crypto.Noise.Cipher (Cipher)
+import Crypto.Noise.DH (DH)
+import Crypto.Noise.Hash (Hash)
-- | Pipe used for inbound Noise messages.
type InboundNoisePipe = Pipe ByteString ScrubbedBytes
@@ -32,39 +28,40 @@
type OutboundNoisePipe = Pipe ScrubbedBytes ByteString
-- | Creates a pair of Pipes, the first used for inbound messages and the
--- second used for outbound messages.
-mkNoisePipes :: (MonadIO m, Cipher c, DH d, Hash h)
+-- second used for outbound messages. Note: The handshake for the given
+-- 'NoiseState' must be complete. If it is not, this function will return
+-- 'Nothing'.
+mkNoisePipes :: (Monad m, Cipher c, DH d, Hash h)
=> NoiseState c d h
- -> IO (InboundNoisePipe m (Either SomeException ()),
- OutboundNoisePipe m (Either SomeException ()))
-mkNoisePipes ns = do
- nsmv <- liftIO . newMVar $ ns
- return (inboundPipe nsmv, outboundPipe nsmv)
-
-inboundPipe :: (MonadIO m, Cipher c, DH d, Hash h)
- => MVar (NoiseState c d h)
- -> InboundNoisePipe m (Either SomeException ())
-inboundPipe nsmv = do
+ -> Maybe (InboundNoisePipe m (NoiseResult c d h),
+ OutboundNoisePipe m (NoiseResult c d h))
+mkNoisePipes ns | handshakeComplete ns = return (inboundPipe ns, outboundPipe ns)
+ | otherwise = Nothing
+
+inboundPipe :: (Monad m, Cipher c, DH d, Hash h)
+ => NoiseState c d h
+ -> InboundNoisePipe m (NoiseResult c d h)
+inboundPipe ns = do
msg <- await
- ns <- liftIO . takeMVar $ nsmv
- case readMessage ns msg of
- Left e -> return . Left $ e
- Right (pt, ns') -> do
- liftIO . putMVar nsmv $ ns'
+ let result = readMessage (convert msg) ns
+ case result of
+ NoiseResultMessage pt ns' -> do
yield pt
- inboundPipe nsmv
+ inboundPipe ns'
+ NoiseResultNeedPSK _ -> return result
+ NoiseResultException _ -> return result
-outboundPipe :: (MonadIO m, Cipher c, DH d, Hash h)
- => MVar (NoiseState c d h)
- -> OutboundNoisePipe m (Either SomeException ())
-outboundPipe nsmv = do
+outboundPipe :: (Monad m, Cipher c, DH d, Hash h)
+ => NoiseState c d h
+ -> OutboundNoisePipe m (NoiseResult c d h)
+outboundPipe ns = do
msg <- await
- ns <- liftIO . takeMVar $ nsmv
- case writeMessage ns msg of
- Left e -> return . Left $ e
- Right (ct, ns') -> do
- liftIO . putMVar nsmv $ ns'
- yield ct
- outboundPipe nsmv
+ let result = writeMessage msg ns
+ case result of
+ NoiseResultMessage ct ns' -> do
+ yield . convert $ ct
+ outboundPipe ns'
+ NoiseResultNeedPSK _ -> return result
+ NoiseResultException _ -> return result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/stack.yaml new/pipes-cacophony-0.5.0/stack.yaml
--- old/pipes-cacophony-0.4.1/stack.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pipes-cacophony-0.5.0/stack.yaml 2017-06-26 18:24:27.000000000 +0200
@@ -0,0 +1,6 @@
+resolver: lts-8.20
+packages:
+ - '.'
+extra-deps: []
+flags: {}
+extra-package-dbs: []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/tests/hlint/hlint.hs new/pipes-cacophony-0.5.0/tests/hlint/hlint.hs
--- old/pipes-cacophony-0.4.1/tests/hlint/hlint.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/pipes-cacophony-0.5.0/tests/hlint/hlint.hs 2017-06-26 18:13:04.000000000 +0200
@@ -0,0 +1,16 @@
+module Main where
+
+import Control.Monad
+import Language.Haskell.HLint
+import System.Environment
+import System.Exit
+
+main :: IO ()
+main = do
+ args <- getArgs
+ hints <- hlint $ [ "src"
+ , "tests"
+ , "--hint=tests/.hlint"
+ , "--cpp-define=HLINT"
+ ] `mappend` args
+ unless (null hints) exitFailure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-cacophony-0.4.1/tests/hlint.hs new/pipes-cacophony-0.5.0/tests/hlint.hs
--- old/pipes-cacophony-0.4.1/tests/hlint.hs 2016-12-26 17:17:05.000000000 +0100
+++ new/pipes-cacophony-0.5.0/tests/hlint.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-module Main where
-
-import Control.Monad
-import Language.Haskell.HLint
-import System.Environment
-import System.Exit
-
-main :: IO ()
-main = do
- args <- getArgs
- hints <- hlint $ [ "src"
- , "tests"
- , "--hint=tests/.hlint"
- , "--cpp-define=HLINT"
- ] `mappend` args
- unless (null hints) exitFailure
++++++ pipes-cacophony.cabal ++++++
-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: pipes-cacophony
version: 0.5.0
x-revision: 1
synopsis: Pipes for Noise-secured network connections.
description: A set of pipes to secure network connections with the
<https://github.com/trevp/noise/blob/master/noise.md Noise> protocol.
category: Cryptography
homepage: https://github.com/centromere/pipes-cacophony#readme
bug-reports: https://github.com/centromere/pipes-cacophony/issues
maintainer: John Galt <jgalt(a)centromere.net>
license: PublicDomain
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
.travis.yml
changelog.md
LICENSE
package.yaml
README.md
stack.yaml
tests/.hlint
source-repository head
type: git
location: https://github.com/centromere/pipes-cacophony
flag build-examples
description: Build examples
manual: True
default: False
library
hs-source-dirs:
src
default-extensions: OverloadedStrings
ghc-options: -Wall
build-depends:
base >= 4.9 && < 4.11
, bytestring
, cacophony >= 0.10
, pipes
exposed-modules:
Pipes.Noise
other-modules:
Paths_pipes_cacophony
default-language: Haskell2010
executable loopback
main-is: Main.hs
hs-source-dirs:
examples/loopback
default-extensions: OverloadedStrings
ghc-options: -Wall -O2 -rtsopts -threaded -with-rtsopts=-N
if flag(build-examples)
build-depends:
base >= 4.9 && < 4.10
, bytestring
, cacophony >= 0.10
, pipes
, pipes-cacophony
else
buildable: False
default-language: Haskell2010
test-suite hlint
type: exitcode-stdio-1.0
main-is: hlint.hs
hs-source-dirs:
tests/hlint
ghc-options: -Wall -O2 -rtsopts -threaded -with-rtsopts=-N
build-depends:
base >= 4.9 && < 4.10
, hlint
default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package ghc-pandoc-citeproc for openSUSE:Factory checked in at 2017-08-31 20:48:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-citeproc (Old)
and /work/SRC/openSUSE:Factory/.ghc-pandoc-citeproc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pandoc-citeproc"
Thu Aug 31 20:48:38 2017 rev:2 rq:513446 version:0.10.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pandoc-citeproc/ghc-pandoc-citeproc.changes 2017-05-16 14:38:29.895249245 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-pandoc-citeproc.new/ghc-pandoc-citeproc.changes 2017-08-31 20:48:39.677159833 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:06 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.10.5.1.
+
+-------------------------------------------------------------------
Old:
----
pandoc-citeproc-0.10.4.1.tar.gz
pandoc-citeproc.cabal
New:
----
pandoc-citeproc-0.10.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-pandoc-citeproc.spec ++++++
--- /var/tmp/diff_new_pack.fOymRD/_old 2017-08-31 20:48:40.952980750 +0200
+++ /var/tmp/diff_new_pack.fOymRD/_new 2017-08-31 20:48:40.960979627 +0200
@@ -20,14 +20,13 @@
%global pkg_name pandoc-citeproc
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.10.4.1
+Version: 0.10.5.1
Release: 0
Summary: Supports using pandoc with citeproc
License: BSD-3-Clause
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: chrpath
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-aeson-devel
@@ -91,7 +90,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -120,6 +118,7 @@
%{_datadir}/%{pkg_name}-%{version}/chicago-author-date.csl
%{_datadir}/%{pkg_name}-%{version}/locales/*.xml
%{_datadir}/%{pkg_name}-%{version}/README.md
+%{_datadir}/%{pkg_name}-%{version}/LICENSE
%{_datadir}/%{pkg_name}-%{version}/man/man1/pandoc-citeproc.1
%{_datadir}/%{pkg_name}-%{version}/changelog
%{_mandir}/man1/pandoc-citeproc.1%{ext_man}
++++++ pandoc-citeproc-0.10.4.1.tar.gz -> pandoc-citeproc-0.10.5.1.tar.gz ++++++
++++ 2169 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-oanda-rest-api for openSUSE:Factory checked in at 2017-08-31 20:48:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-oanda-rest-api (Old)
and /work/SRC/openSUSE:Factory/.ghc-oanda-rest-api.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-oanda-rest-api"
Thu Aug 31 20:48:36 2017 rev:2 rq:513441 version:0.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-oanda-rest-api/ghc-oanda-rest-api.changes 2017-04-06 11:00:32.153273170 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-oanda-rest-api.new/ghc-oanda-rest-api.changes 2017-08-31 20:48:37.629447265 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:03 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.4.1.
+
+-------------------------------------------------------------------
Old:
----
oanda-rest-api-0.3.0.0.tar.gz
oanda-rest-api.cabal
New:
----
oanda-rest-api-0.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-oanda-rest-api.spec ++++++
--- /var/tmp/diff_new_pack.ldqcGK/_old 2017-08-31 20:48:39.021251902 +0200
+++ /var/tmp/diff_new_pack.ldqcGK/_new 2017-08-31 20:48:39.029250779 +0200
@@ -19,26 +19,29 @@
%global pkg_name oanda-rest-api
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.3.0.0
+Version: 0.4.1
Release: 0
Summary: Client to the OANDA REST API
License: BSD-3-Clause
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-Decimal-devel
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-conduit-devel
BuildRequires: ghc-containers-devel
+BuildRequires: ghc-http-client-devel
BuildRequires: ghc-http-conduit-devel
BuildRequires: ghc-lens-devel
BuildRequires: ghc-old-locale-devel
+BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-scientific-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-thyme-devel
+BuildRequires: ghc-transformers-devel
BuildRequires: ghc-vector-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
@@ -63,7 +66,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ oanda-rest-api-0.3.0.0.tar.gz -> oanda-rest-api-0.4.1.tar.gz ++++++
++++ 2148 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-mongoDB for openSUSE:Factory checked in at 2017-08-31 20:48:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mongoDB (Old)
and /work/SRC/openSUSE:Factory/.ghc-mongoDB.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-mongoDB"
Thu Aug 31 20:48:33 2017 rev:3 rq:513435 version:2.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-mongoDB/ghc-mongoDB.changes 2017-04-07 13:55:11.647481842 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-mongoDB.new/ghc-mongoDB.changes 2017-08-31 20:48:33.841978902 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:24 UTC 2017 - psimons(a)suse.com
+
+- Update to version 2.3.0.
+
+-------------------------------------------------------------------
Old:
----
mongoDB-2.1.1.1.tar.gz
New:
----
mongoDB-2.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-mongoDB.spec ++++++
--- /var/tmp/diff_new_pack.gEiUac/_old 2017-08-31 20:48:34.669862694 +0200
+++ /var/tmp/diff_new_pack.gEiUac/_new 2017-08-31 20:48:34.669862694 +0200
@@ -19,7 +19,7 @@
%global pkg_name mongoDB
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.1.1.1
+Version: 2.3.0
Release: 0
Summary: Driver (client) for MongoDB, a free, scalable, fast, document DBMS
License: Apache-2.0
@@ -33,6 +33,8 @@
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bson-devel
BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-conduit-devel
+BuildRequires: ghc-conduit-extra-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cryptohash-devel
BuildRequires: ghc-data-default-class-devel
@@ -43,17 +45,21 @@
BuildRequires: ghc-network-devel
BuildRequires: ghc-nonce-devel
BuildRequires: ghc-parsec-devel
+BuildRequires: ghc-pureMD5-devel
BuildRequires: ghc-random-devel
BuildRequires: ghc-random-shuffle-devel
+BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-tagged-devel
BuildRequires: ghc-text-devel
+BuildRequires: ghc-time-devel
BuildRequires: ghc-tls-devel
BuildRequires: ghc-transformers-base-devel
+BuildRequires: ghc-transformers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-hspec-devel
BuildRequires: ghc-old-locale-devel
-BuildRequires: ghc-time-devel
%endif
%description
++++++ mongoDB-2.1.1.1.tar.gz -> mongoDB-2.3.0.tar.gz ++++++
++++ 1928 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-monad-http for openSUSE:Factory checked in at 2017-08-31 20:48:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-monad-http (Old)
and /work/SRC/openSUSE:Factory/.ghc-monad-http.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-monad-http"
Thu Aug 31 20:48:31 2017 rev:3 rq:513433 version:0.1.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-monad-http/ghc-monad-http.changes 2017-02-21 13:45:37.344300818 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-monad-http.new/ghc-monad-http.changes 2017-08-31 20:48:32.726135530 +0200
@@ -1,0 +2,5 @@
+Sat Jul 29 03:02:00 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.1.0.0 revision 5.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-monad-http.spec ++++++
--- /var/tmp/diff_new_pack.CMkb16/_old 2017-08-31 20:48:33.630008656 +0200
+++ /var/tmp/diff_new_pack.CMkb16/_new 2017-08-31 20:48:33.634008094 +0200
@@ -25,7 +25,7 @@
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/4.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/5.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-MonadRandom-devel
BuildRequires: ghc-base-compat-devel
@@ -79,5 +79,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc README.md
%changelog
++++++ monad-http.cabal ++++++
--- /var/tmp/diff_new_pack.CMkb16/_old 2017-08-31 20:48:33.713996866 +0200
+++ /var/tmp/diff_new_pack.CMkb16/_new 2017-08-31 20:48:33.713996866 +0200
@@ -1,10 +1,6 @@
--- This file has been generated from package.yaml by hpack version 0.8.0.
---
--- see: https://github.com/sol/hpack
-
name: monad-http
version: 0.1.0.0
-x-revision: 4
+x-revision: 5
synopsis: A class of monads which can do http requests
description: A class of monads which can do http requests
homepage: https://github.com/futurice/haskell-monad-http#readme
@@ -14,7 +10,7 @@
author: Oleg Grenrus <oleg.grenrus(a)iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus(a)iki.fi>
category: Web
-tested-with: GHC==7.8.4, GHC==7.10.2, GHC==7.10.3
+tested-with: GHC==7.8.4, GHC==7.10.2, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
build-type: Simple
cabal-version: >= 1.10
@@ -30,7 +26,7 @@
src
ghc-options: -Wall
build-depends:
- base >=4.7 && <4.10,
+ base >=4.7 && <4.11,
base-compat >=0.6.0 && <0.10,
bytestring >=0.10.0.4 && <0.12,
exceptions >=0.8.0.2 && <0.9,
1
0
Hello community,
here is the log from the commit of package ghc-mod for openSUSE:Factory checked in at 2017-08-31 20:48:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mod (Old)
and /work/SRC/openSUSE:Factory/.ghc-mod.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-mod"
Thu Aug 31 20:48:29 2017 rev:12 rq:513432 version:5.8.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-mod/ghc-mod.changes 2017-04-14 13:32:50.400780512 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-mod.new/ghc-mod.changes 2017-08-31 20:48:30.606433066 +0200
@@ -1,0 +2,5 @@
+Fri Jul 28 08:57:09 UTC 2017 - psimons(a)suse.com
+
+- Update to version 5.8.0.0 revision 1.
+
+-------------------------------------------------------------------
Old:
----
ghc-mod-5.7.0.0.tar.gz
New:
----
ghc-mod-5.8.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-mod.spec ++++++
--- /var/tmp/diff_new_pack.6eM9PA/_old 2017-08-31 20:48:31.834260719 +0200
+++ /var/tmp/diff_new_pack.6eM9PA/_new 2017-08-31 20:48:31.846259035 +0200
@@ -19,9 +19,9 @@
%global pkg_name ghc-mod
%bcond_with tests
Name: %{pkg_name}
-Version: 5.7.0.0
+Version: 5.8.0.0
Release: 0
-Summary: Happy Haskell Programming
+Summary: Happy Haskell Hacking
License: AGPL-3.0+ AND BSD-3-Clause
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
@@ -51,7 +51,6 @@
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-optparse-applicative-devel
BuildRequires: ghc-pipes-devel
-BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-safe-devel
@@ -83,8 +82,7 @@
fundamental functionality of the frontend program can be accessed through the
library however many implementation details are hidden and if you want to
significantly extend ghc-mod you should submit these changes upstream instead
-of implementing them on top of the library. For more information, please see
-its home page.
+of implementing them on top of the library.
%package -n ghc-%{name}
Summary: Haskell %{name} library
@@ -117,9 +115,6 @@
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
echo 'export cabal_helper_libexecdir=%{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/cabal-helper' > %{buildroot}%{_sysconfdir}/profile.d/ghc-mod.sh
echo 'setenv cabal_helper_libexecdir %{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/cabal-helper' > %{buildroot}%{_sysconfdir}/profile.d/ghc-mod.csh
-rm %{buildroot}%{_datadir}/%{name}-%{version}/LICENSE
-rm %{buildroot}%{_datadir}/%{name}-%{version}/COPYING.AGPL3
-rm %{buildroot}%{_datadir}/%{name}-%{version}/COPYING.BSD3
%check
%cabal_test
@@ -132,24 +127,25 @@
%files
%defattr(-,root,root,-)
-%doc LICENSE
%doc COPYING.BSD3
%doc COPYING.AGPL3
-%doc ChangeLog
+%doc ChangeLog README.md
%{_bindir}/%{name}
%{_bindir}/ghc-modi
-%{_datadir}/%{name}-%{version}
+%dir %{_datadir}/%{name}-%{version}
+%dir %{_datadir}/%{name}-%{version}/elisp
+%{_datadir}/%{name}-%{version}/elisp/Makefile
+%{_datadir}/%{name}-%{version}/elisp/*.el
%config %{_sysconfdir}/profile.d/ghc-mod.sh
%config %{_sysconfdir}/profile.d/ghc-mod.csh
%files -n ghc-%{name} -f ghc-%{name}.files
%defattr(-,root,root,-)
-%doc LICENSE
%doc COPYING.BSD3
%doc COPYING.AGPL3
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%defattr(-,root,root,-)
-%doc ChangeLog
+%doc ChangeLog README.md
%changelog
++++++ ghc-mod-5.7.0.0.tar.gz -> ghc-mod-5.8.0.0.tar.gz ++++++
++++ 21517 lines of diff (skipped)
++++++ ghc-mod.cabal ++++++
--- /var/tmp/diff_new_pack.6eM9PA/_old 2017-08-31 20:48:32.350188300 +0200
+++ /var/tmp/diff_new_pack.6eM9PA/_new 2017-08-31 20:48:32.350188300 +0200
@@ -1,5 +1,5 @@
Name: ghc-mod
-Version: 5.7.0.0
+Version: 5.8.0.0
x-revision: 1
Author: Kazu Yamamoto <kazu(a)iij.ad.jp>,
Daniel Gröber <dxld(a)darkboxed.org>,
@@ -9,8 +9,8 @@
License: AGPL-3
License-File: LICENSE
License-Files: COPYING.BSD3 COPYING.AGPL3
-Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
-Synopsis: Happy Haskell Programming
+Homepage: https://github.com/DanielG/ghc-mod
+Synopsis: Happy Haskell Hacking
Description:
ghc-mod is a backend program to enrich Haskell programming in editors. It
strives to offer most of the features one has come to expect from modern IDEs
@@ -23,44 +23,30 @@
significantly extend ghc-mod you should submit these changes upstream instead
of implementing them on top of the library.
- For more information, please see its home page.
Category: GHC, Development
-Cabal-Version: >= 1.14
+Cabal-Version: >= 1.18
Build-Type: Custom
-Tested-With: GHC == 7.6.3
- GHC == 7.8.4
- , GHC == 7.10.3
- , GHC == 8.0.1
- , GHC == 8.0.2
Data-Files: elisp/Makefile
elisp/*.el
-Data-Files: LICENSE COPYING.BSD3 COPYING.AGPL3
Extra-Source-Files: ChangeLog
- cabal.project
- SetupCompat.hs
- NotCPP/*.hs
- NotCPP/COPYING
- Language/Haskell/GhcMod/Monad/Compat.hs_h
+ README.md
+ core/GhcMod/Monad/Compat.hs_h
test/data/annotations/*.hs
test/data/broken-cabal/*.cabal
- test/data/broken-cabal/cabal.sandbox.config.in
test/data/broken-sandbox/cabal.sandbox.config
test/data/broken-sandbox/dummy.cabal
test/data/cabal-flags/cabal-flags.cabal
test/data/cabal-project/*.cabal
test/data/cabal-project/*.hs
test/data/cabal-project/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
- test/data/cabal-project/cabal.sandbox.config.in
test/data/cabal-project/subdir1/subdir2/dummy
test/data/case-split/*.hs
- test/data/check-packageid/cabal.sandbox.config.in
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
test/data/check-test-subdir/*.cabal
test/data/check-test-subdir/src/Check/Test/*.hs
test/data/check-test-subdir/test/*.hs
test/data/check-test-subdir/test/Bar/*.hs
- test/data/duplicate-pkgver/cabal.sandbox.config.in
test/data/duplicate-pkgver/duplicate-pkgver.cabal
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
@@ -95,173 +81,193 @@
test/data/file-mapping/preprocessor/*.hs
test/data/file-mapping/lhs/*.lhs
test/data/nice-qualification/*.hs
- test/data/stack-project/stack.yaml
+ test/data/stack-project/stack.yaml.in
test/data/stack-project/new-template.cabal
test/data/stack-project/*.hs
test/data/stack-project/app/*.hs
test/data/stack-project/src/*.hs
test/data/stack-project/test/*.hs
+ bench/data/simple-cabal/simple-cabal.cabal
+ bench/data/simple-cabal/*.hs
+
Custom-Setup
Setup-Depends: base
- , Cabal < 1.25
+ , Cabal >= 1.18 && < 1.25
, containers
, filepath
+ , directory
, process
, template-haskell
, transformers
+
Library
Default-Language: Haskell2010
GHC-Options: -Wall -fno-warn-deprecations
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
ConstraintKinds, FlexibleContexts,
DataKinds, KindSignatures, TypeOperators, ViewPatterns
- Exposed-Modules: Language.Haskell.GhcMod
- Language.Haskell.GhcMod.Internal
- Language.Haskell.GhcMod.Boot
- Language.Haskell.GhcMod.Browse
- Language.Haskell.GhcMod.CabalHelper
- Language.Haskell.GhcMod.Caching
- Language.Haskell.GhcMod.Caching.Types
- Language.Haskell.GhcMod.CaseSplit
- Language.Haskell.GhcMod.Check
- Language.Haskell.GhcMod.Convert
- Language.Haskell.GhcMod.Cradle
- Language.Haskell.GhcMod.CustomPackageDb
- Language.Haskell.GhcMod.Debug
- Language.Haskell.GhcMod.DebugLogger
- Language.Haskell.GhcMod.Doc
- Language.Haskell.GhcMod.DynFlags
- Language.Haskell.GhcMod.DynFlagsTH
- Language.Haskell.GhcMod.Error
- Language.Haskell.GhcMod.FileMapping
- Language.Haskell.GhcMod.FillSig
- Language.Haskell.GhcMod.Find
- Language.Haskell.GhcMod.Flag
- Language.Haskell.GhcMod.Gap
- Language.Haskell.GhcMod.GhcPkg
- Language.Haskell.GhcMod.HomeModuleGraph
- Language.Haskell.GhcMod.Info
- Language.Haskell.GhcMod.Lang
- Language.Haskell.GhcMod.Lint
- Language.Haskell.GhcMod.LightGhc
- Language.Haskell.GhcMod.Logger
- Language.Haskell.GhcMod.Logging
- Language.Haskell.GhcMod.Modules
- Language.Haskell.GhcMod.Monad
- Language.Haskell.GhcMod.Monad.Env
- Language.Haskell.GhcMod.Monad.Log
- Language.Haskell.GhcMod.Monad.Newtypes
- Language.Haskell.GhcMod.Monad.Orphans
- Language.Haskell.GhcMod.Monad.Out
- Language.Haskell.GhcMod.Monad.State
- Language.Haskell.GhcMod.Monad.Types
- Language.Haskell.GhcMod.Output
- Language.Haskell.GhcMod.PathsAndFiles
- Language.Haskell.GhcMod.PkgDoc
- Language.Haskell.GhcMod.Pretty
- Language.Haskell.GhcMod.Read
- Language.Haskell.GhcMod.SrcUtils
- Language.Haskell.GhcMod.Stack
- Language.Haskell.GhcMod.Target
- Language.Haskell.GhcMod.Test
- Language.Haskell.GhcMod.Types
- Language.Haskell.GhcMod.Utils
- Language.Haskell.GhcMod.World
-
- Language.Haskell.GhcMod.Options.Options
- Language.Haskell.GhcMod.Options.DocUtils
- Language.Haskell.GhcMod.Options.Help
+ HS-Source-Dirs: ., core, shared
+ Exposed-Modules:
+ GhcMod
+ GhcMod.Exe.Boot
+ GhcMod.Exe.Browse
+ GhcMod.Exe.CaseSplit
+ GhcMod.Exe.Check
+ GhcMod.Exe.Debug
+ GhcMod.Exe.FillSig
+ GhcMod.Exe.Find
+ GhcMod.Exe.Flag
+ GhcMod.Exe.Info
+ GhcMod.Exe.Internal
+ GhcMod.Exe.Lang
+ GhcMod.Exe.Lint
+ GhcMod.Exe.Modules
+ GhcMod.Exe.PkgDoc
+ GhcMod.Exe.Test
+ GhcMod.CabalHelper
+ GhcMod.Caching
+ GhcMod.Caching.Types
+ GhcMod.Convert
+ GhcMod.Cradle
+ GhcMod.CustomPackageDb
+ GhcMod.DebugLogger
+ GhcMod.Doc
+ GhcMod.DynFlags
+ GhcMod.DynFlagsTH
+ GhcMod.Error
+ GhcMod.FileMapping
+ GhcMod.Gap
+ GhcMod.GhcPkg
+ GhcMod.HomeModuleGraph
+ GhcMod.LightGhc
+ GhcMod.Logger
+ GhcMod.Logging
+ GhcMod.Monad
+ GhcMod.Monad.Env
+ GhcMod.Monad.Log
+ GhcMod.Monad.Newtypes
+ GhcMod.Monad.Orphans
+ GhcMod.Monad.Out
+ GhcMod.Monad.State
+ GhcMod.Monad.Types
+ GhcMod.Options.DocUtils
+ GhcMod.Options.Help
+ GhcMod.Options.Options
+ GhcMod.Output
+ GhcMod.PathsAndFiles
+ GhcMod.Pretty
+ GhcMod.Read
+ GhcMod.SrcUtils
+ GhcMod.Stack
+ GhcMod.Target
+ GhcMod.Types
+ GhcMod.Utils
+ GhcMod.World
Other-Modules: Paths_ghc_mod
Utils
Data.Binary.Generic
System.Directory.ModTime
- Build-Depends: base < 5 && >= 4.0
- , bytestring < 0.11
- , binary < 0.9 && >= 0.5.1.0
- , containers < 0.6
- , cabal-helper < 0.8 && >= 0.7.3.0
- , deepseq < 1.5
- , directory < 1.4
- , filepath < 1.5
- , ghc < 8.2 && >= 7.6
- , ghc-paths < 0.2 && >= 0.1.0.9
- , ghc-syb-utils < 0.3 && >= 0.2.3
- , hlint < 1.10 && >= 1.9.27
- , monad-journal < 0.8 && >= 0.4
- , old-time < 1.2
- , pretty < 1.2
- , process < 1.5
- , syb < 0.7 && >= 0.5.1
- , temporary < 1.3 && >= 1.2.0.3
- , transformers < 0.6
- , time < 1.7
- , transformers < 0.6
- , transformers-base < 0.5 && >= 0.4.4
- , mtl < 2.3 && >= 2.0
- , monad-control < 1.1 && >= 1
- , split < 0.3 && >= 0.2.2
- , haskell-src-exts < 1.19 && >= 1.16.0.1
- , text < 1.3 && >= 1.2.1.3
- , djinn-ghc < 0.1 && >= 0.0.2.2
- , fclabels == 2.0.*
- , extra < 1.6 && >= 1.4.0
- , pipes < 4.4 && >= 4.1.0
- , safe < 0.4 && >= 0.3.9
- , optparse-applicative >=0.11.0 && <0.14.0
+ Build-Depends:
+ -- See Note [GHC Boot libraries]
+ binary
+ , bytestring
+ , containers
+ , deepseq
+ , directory
+ , filepath
+ , mtl
+ , old-time
+ , process
, template-haskell
- , syb
- if impl(ghc < 7.8)
- Build-Depends: convertible < 1.2 && >= 1.1.0.0
+ , time
+ , transformers
+
+ , base < 4.10 && >= 4.6.0.1
+ , djinn-ghc < 0.1 && >= 0.0.2.2
+ , extra < 1.6 && >= 1.4
+ , fclabels < 2.1 && >= 2.0
+ , ghc-paths < 0.2 && >= 0.1.0.9
+ , ghc-syb-utils < 0.3 && >= 0.2.3
+ , haskell-src-exts < 1.20 && >= 1.18
+ , hlint < 2.1 && >= 2.0.8
+ , monad-control < 1.1 && >= 1
+ , monad-journal < 0.8 && >= 0.4
+ , optparse-applicative < 0.14 && >= 0.13.0.0
+ , pipes < 4.4 && >= 4.1
+ , safe < 0.4 && >= 0.3.9
+ , semigroups < 0.19 && >= 0.10.0
+ , split < 0.3 && >= 0.2.2
+ , syb < 0.8 && >= 0.5.1
+ , temporary < 1.3 && >= 1.2.0.3
+ , text < 1.3 && >= 1.2.1.3
+ , transformers-base < 0.5 && >= 0.4.4
+
+ , cabal-helper < 0.8 && >= 0.7.3.0
+ , ghc < 8.2 && >= 7.6
+
if impl(ghc >= 8.0)
Build-Depends: ghc-boot
+ if impl(ghc < 7.8)
+ Build-Depends: convertible < 1.2 && >= 1.1.0.0
Executable ghc-mod
Default-Language: Haskell2010
- Main-Is: GHCMod.hs
+ Main-Is: GhcModMain.hs
Other-Modules: Paths_ghc_mod
- , GHCMod.Options
- , GHCMod.Options.Commands
- , GHCMod.Version
- , GHCMod.Options.ShellParse
+ , GhcMod.Exe.Options
+ , GhcMod.Exe.Options.Commands
+ , GhcMod.Exe.Version
+ , GhcMod.Exe.Options.ShellParse
GHC-Options: -Wall -fno-warn-deprecations -threaded
Default-Extensions: ConstraintKinds, FlexibleContexts
- HS-Source-Dirs: src
- Build-Depends: base < 5 && >= 4.0
- , directory < 1.4
- , filepath < 1.5
- , pretty < 1.2
- , process < 1.5
- , split < 0.3 && >= 0.2.2
- , mtl < 2.3 && >= 2.0
- , ghc < 8.2 && >= 7.6
- , monad-control < 1.1 && >= 1
- , fclabels ==2.0.*
- , optparse-applicative >=0.11.0 && <0.14.0
- , semigroups < 0.19 && >= 0.10.0
+ HS-Source-Dirs: src, shared
+ X-Internal: True
+ Build-Depends:
+ -- See Note [GHC Boot libraries]
+ directory
+ , filepath
+ , mtl
+ , process
+
+ , base < 4.10 && >= 4.6.0.1
+ , fclabels < 2.1 && >= 2.0
+ , monad-control < 1.1 && >= 1
+ , optparse-applicative < 0.14 && >= 0.13.0.0
+ , semigroups < 0.19 && >= 0.10.0
+ , split < 0.3 && >= 0.2.2
+
+ , ghc < 8.2 && >= 7.6
, ghc-mod
+
Executable ghc-modi
Default-Language: Haskell2010
- Main-Is: GHCModi.hs
+ Main-Is: GhcModi.hs
Other-Modules: Paths_ghc_mod
Utils
+ System.Directory.ModTime
GHC-Options: -Wall -threaded -fno-warn-deprecations
if os(windows)
Cpp-Options: -DWINDOWS
Default-Extensions: ConstraintKinds, FlexibleContexts
- HS-Source-Dirs: src, .
- Build-Depends: base < 5 && >= 4.0
- , binary < 0.9 && >= 0.5.1.0
- , deepseq < 1.5
- , directory < 1.4
- , filepath < 1.5
- , process < 1.5
- , old-time < 1.2
- , time < 1.7
+ HS-Source-Dirs: ., src, shared
+ Build-Depends:
+ -- See Note [GHC Boot libraries]
+ binary
+ , deepseq
+ , directory
+ , filepath
+ , old-time
+ , process
+ , time
+
+ , base < 4.10 && >= 4.6.0.1
+
, ghc-mod
+
Test-Suite doctest
Type: exitcode-stdio-1.0
Default-Language: Haskell2010
@@ -269,8 +275,9 @@
Ghc-Options: -Wall
Default-Extensions: ConstraintKinds, FlexibleContexts
Main-Is: doctests.hs
- Build-Depends: base
- , doctest < 0.12 && >= 0.9.3
+ Build-Depends: base < 4.10 && >= 4.6.0.1
+ , doctest < 0.12 && >= 0.9.3
+
Test-Suite spec
Default-Language: Haskell2010
@@ -278,31 +285,106 @@
ConstraintKinds, FlexibleContexts,
DataKinds, KindSignatures, TypeOperators, ViewPatterns
Main-Is: Main.hs
- Hs-Source-Dirs: test, ., src
+ Hs-Source-Dirs: test, src
Ghc-Options: -Wall -fno-warn-deprecations -threaded
- CPP-Options: -DSPEC=1
Type: exitcode-stdio-1.0
Other-Modules: Paths_ghc_mod
Dir
- Spec
TestUtils
+
+-- $ ls test/*Spec.hs | sed 's_^.*/\(.*\)\.hs$_\1_' | sort
BrowseSpec
- CustomPackageDbSpec
+ CabalHelperSpec
+ CaseSplitSpec
CheckSpec
+ CradleSpec
+ CustomPackageDbSpec
+ FileMappingSpec
+ FindSpec
FlagSpec
+ GhcPkgSpec
+ HomeModuleGraphSpec
InfoSpec
LangSpec
LintSpec
ListSpec
MonadSpec
PathsAndFilesSpec
- HomeModuleGraphSpec
- FileMappingSpec
ShellParseSpec
+ TargetSpec
+
+ Build-Depends:
+ -- See Note [GHC Boot libraries]
+ containers
+ , directory
+ , filepath
+ , mtl
+ , process
+ , transformers
+
+ , base < 4.10 && >= 4.6.0.1
+ , fclabels < 2.1 && >= 2.0
+ , hspec < 2.4 && >= 2.0.0
+ , monad-journal < 0.8 && >= 0.4
+ , split < 0.3 && >= 0.2.2
+ , temporary < 1.3 && >= 1.2.0.3
+
+
+ if impl(ghc < 7.8)
+ Build-Depends: convertible < 1.2 && >= 1.1.0.0
+ if impl(ghc >= 8.0)
+ Build-Depends: ghc-boot
+
+ Build-Depends:
+ cabal-helper < 0.8 && >= 0.7.1.0
+ , ghc < 8.2 && >= 7.6
+ , ghc-mod
+
+
+Test-Suite shelltest
+ Default-Language: Haskell2010
+ Main-Is: ShellTest.hs
+ Hs-Source-Dirs: shelltest
+ Type: exitcode-stdio-1.0
+ Build-Tools: shelltest
+ Build-Depends: base < 4.10 && >= 4.6.0.1
+ , process < 1.5
+ -- , shelltestrunner >= 1.3.5
+ if !flag(shelltest)
+ Buildable: False
+
+
+Benchmark criterion
+ Type: exitcode-stdio-1.0
+ Default-Language: Haskell2010
+ Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
+ ConstraintKinds, FlexibleContexts,
+ DataKinds, KindSignatures, TypeOperators, ViewPatterns
+ HS-Source-Dirs: bench, test
+ Main-Is: Bench.hs
+ Build-Depends:
+ -- See Note [GHC Boot libraries]
+ directory
+ , filepath
+
+ , base < 4.10 && >= 4.6.0.1
+ , criterion < 1.2 && >= 1.1.1.0
+ , temporary < 1.3 && >= 1.2.0.3
+
+ , ghc-mod
+
+
+Flag shelltest
+ Description: Enable/disable shelltest test-suite
+ Default: False
+ Manual: True
- Build-Depends: hspec < 2.5 && >= 2.0.0
- X-Build-Depends-Like: CLibName
Source-Repository head
Type: git
- Location: https://github.com/kazu-yamamoto/ghc-mod.git
+ Location: https://github.com/DanielG/ghc-mod.git
+
+-- Note [GHC Boot libraries]
+--
+-- We don't give bounds to GHC boot libraries as our dependency on 'ghc' already
+-- constrains these packages to the version that shipped with GHC.
1
0
Hello community,
here is the log from the commit of package ghc-mime-mail for openSUSE:Factory checked in at 2017-08-31 20:48:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mime-mail (Old)
and /work/SRC/openSUSE:Factory/.ghc-mime-mail.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-mime-mail"
Thu Aug 31 20:48:27 2017 rev:8 rq:513431 version:0.4.13.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-mime-mail/ghc-mime-mail.changes 2017-06-04 02:01:07.589212059 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-mime-mail.new/ghc-mime-mail.changes 2017-08-31 20:48:27.702840635 +0200
@@ -1,0 +2,10 @@
+Mon Jul 24 14:29:29 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.4.13.1 revision 6.
+
+-------------------------------------------------------------------
+Mon Jul 24 03:01:13 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.4.13.1 revision 5.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-mime-mail.spec ++++++
--- /var/tmp/diff_new_pack.sjBaoE/_old 2017-08-31 20:48:28.482731164 +0200
+++ /var/tmp/diff_new_pack.sjBaoE/_new 2017-08-31 20:48:28.482731164 +0200
@@ -26,7 +26,7 @@
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/4.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/6.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-base64-bytestring-devel
BuildRequires: ghc-blaze-builder-devel
++++++ mime-mail.cabal ++++++
--- /var/tmp/diff_new_pack.sjBaoE/_old 2017-08-31 20:48:28.570718813 +0200
+++ /var/tmp/diff_new_pack.sjBaoE/_new 2017-08-31 20:48:28.574718252 +0200
@@ -14,7 +14,7 @@
extra-source-files:
README.md
ChangeLog.md
-x-revision: 4
+x-revision: 6
source-repository head
type: git
@@ -24,14 +24,14 @@
exposed-modules:
Network.Mail.Mime
build-depends:
- base ==4.*,
- base64-bytestring >=0.1 && <1.1,
- process >=1.0 && <1.5,
- random >=1.0 && <1.2,
- blaze-builder >=0.2.1 && <0.5,
- bytestring >=0.9.1 && <0.11,
+ base >= 4 && < 5,
+ base64-bytestring >=0.1,
+ process >=1.0,
+ random >=1.0,
+ blaze-builder >=0.2.1,
+ bytestring >=0.9.1,
text >=0.7 && <1.3,
- filepath >=1.2 && <1.5
+ filepath >=1.2
test-suite tests
type: exitcode-stdio-1.0
1
0
Hello community,
here is the log from the commit of package ghc-megaparsec for openSUSE:Factory checked in at 2017-08-31 20:48:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-megaparsec (Old)
and /work/SRC/openSUSE:Factory/.ghc-megaparsec.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-megaparsec"
Thu Aug 31 20:48:24 2017 rev:5 rq:513430 version:5.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-megaparsec/ghc-megaparsec.changes 2017-07-05 23:59:10.569996700 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-megaparsec.new/ghc-megaparsec.changes 2017-08-31 20:48:26.539003999 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:26 UTC 2017 - psimons(a)suse.com
+
+- Update to version 5.3.1.
+
+-------------------------------------------------------------------
Old:
----
megaparsec-5.2.0.tar.gz
megaparsec.cabal
New:
----
megaparsec-5.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-megaparsec.spec ++++++
--- /var/tmp/diff_new_pack.SmXjMD/_old 2017-08-31 20:48:27.350890037 +0200
+++ /var/tmp/diff_new_pack.SmXjMD/_new 2017-08-31 20:48:27.350890037 +0200
@@ -19,14 +19,13 @@
%global pkg_name megaparsec
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 5.2.0
+Version: 5.3.1
Release: 0
Summary: Monadic parser combinators
License: BSD-2-Clause
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-QuickCheck-devel
BuildRequires: ghc-bytestring-devel
@@ -61,7 +60,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ megaparsec-5.2.0.tar.gz -> megaparsec-5.3.1.tar.gz ++++++
++++ 3055 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-makefile for openSUSE:Factory checked in at 2017-08-31 20:48:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-makefile (Old)
and /work/SRC/openSUSE:Factory/.ghc-makefile.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-makefile"
Thu Aug 31 20:48:22 2017 rev:2 rq:513428 version:1.0.0.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-makefile/ghc-makefile.changes 2017-04-12 18:07:40.202463831 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-makefile.new/ghc-makefile.changes 2017-08-31 20:48:23.415442444 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:10 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.0.0.4.
+
+-------------------------------------------------------------------
Old:
----
makefile-0.1.1.0.tar.gz
New:
----
makefile-1.0.0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-makefile.spec ++++++
--- /var/tmp/diff_new_pack.famTNi/_old 2017-08-31 20:48:24.395304904 +0200
+++ /var/tmp/diff_new_pack.famTNi/_new 2017-08-31 20:48:24.403303781 +0200
@@ -19,30 +19,33 @@
%global pkg_name makefile
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.1.0
+Version: 1.0.0.4
Release: 0
-Summary: Simple Makefile parser
+Summary: Simple Makefile parser and generator
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…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-attoparsec-devel
-BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-text-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-Glob-devel
+BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-doctest-devel
%endif
%description
This package provides a few 'Attoparser' parsers and convenience functions for
-parsing Makefiles. The datatypes used for describing Makefiles are located in
-'Data.Makefile'. The parsers and parsing functions are located in
-'Data.Makefile.Parse'. To parse a Makefile in the current folder, simply run
+parsing and generating Makefiles. The datatypes used for describing Makefiles
+are located in 'Data.Makefile'. The parsers and parsing functions are located
+in 'Data.Makefile.Parse'. The generating and encoding functions are located in
+'Data.Makefile.Render'. To parse a Makefile in the current folder, simply run
'parseMakefile'. To parse a Makefile located at 'path', run 'parseAsMakefile'
-'path'.
+'path'. To parse a Makefile from a Text 'txt', run 'parseMakefileContents txt`.
+To encode a 'Makefile', run 'encodeMakefile'.
%package devel
Summary: Haskell %{pkg_name} library development files
++++++ makefile-0.1.1.0.tar.gz -> makefile-1.0.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/makefile.cabal new/makefile-1.0.0.4/makefile.cabal
--- old/makefile-0.1.1.0/makefile.cabal 2017-02-17 22:20:44.000000000 +0100
+++ new/makefile-1.0.0.4/makefile.cabal 2017-06-16 09:50:45.000000000 +0200
@@ -1,63 +1,65 @@
-name: makefile
-version: 0.1.1.0
-synopsis: Simple Makefile parser
+name: makefile
+version: 1.0.0.4
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: 2016-2017 Nicolas Mattia
+maintainer: nicolas(a)nmattia.com
+homepage: http://github.com/nmattia/mask
+synopsis: Simple Makefile parser and generator
description:
- This package provides a few @Attoparser@ parsers and convenience functions
- for parsing Makefiles.
-
- The datatypes used for describing Makefiles are located in 'Data.Makefile'.
- The parsers and parsing functions are located in 'Data.Makefile.Parse'.
-
- To parse a Makefile in the current folder, simply run 'parseMakefile'. To
- parse a Makefile located at @path@, run 'parseAsMakefile' @path@.
-
-homepage: http://github.com/nmattia/mask
-license: MIT
-license-file: LICENSE
-author: Nicolas Mattia
-maintainer: nicolas(a)nmattia.com
-copyright: 2016 Nicolas Mattia
-category: Parsing
-build-type: Simple
-cabal-version: >=1.10
-
+ This package provides a few @Attoparser@ parsers and convenience functions
+ for parsing and generating Makefiles.
+ The datatypes used for describing Makefiles are located in 'Data.Makefile'.
+ The parsers and parsing functions are located in 'Data.Makefile.Parse'.
+ The generating and encoding functions are located in 'Data.Makefile.Render'.
+ To parse a Makefile in the current folder, simply run 'parseMakefile'. To
+ parse a Makefile located at @path@, run 'parseAsMakefile' @path@. To parse a
+ Makefile from a Text @txt@, run 'parseMakefileContents txt`.
+ To encode a @Makefile@, run 'encodeMakefile'.
+category: Parsing
+author: Nicolas Mattia
extra-source-files:
- test-data/basic/Makefile1
- test-data/basic/Makefile2
- test-data/elfparse/Makefile
+ test-data/basic/Makefile1
+ test-data/basic/Makefile2
+ test-data/elfparse/Makefile
source-repository head
- type: git
- location: https://github.com/nmattia/mask.git
+ type: git
+ location: https://github.com/nmattia/mask.git
library
- hs-source-dirs: src
- default-language: Haskell2010
- build-depends: base >= 4.7 && < 5
- , attoparsec >= 0.12
- , bytestring >= 0.10
- exposed-modules:
- Data.Makefile
- , Data.Makefile.Parse
- , Data.Makefile.Parse.Internal
- , Data.Makefile.Render
- , Data.Makefile.Render.Internal
- ghc-options: -Wall
-
+ exposed-modules:
+ Data.Makefile
+ Data.Makefile.Parse
+ Data.Makefile.Parse.Internal
+ Data.Makefile.Render
+ Data.Makefile.Render.Internal
+ build-depends:
+ base >=4.7 && <5,
+ attoparsec >=0.12 && <0.14,
+ text >=1.1 && <1.3
+ default-language: Haskell2010
+ hs-source-dirs: src
+ ghc-options: -Wall
test-suite test
- hs-source-dirs: src
- default-language: Haskell2010
- type: exitcode-stdio-1.0
- main-is: Test.hs
- build-depends: base
- , attoparsec >= 0.12
- , bytestring >= 0.10
- , doctest >= 0.9
- , Glob >= 0.7
- , makefile
- other-modules: Data.Makefile
- , Data.Makefile.Parse
- , Data.Makefile.Parse.Internal
- , Data.Makefile.Render
- , Data.Makefile.Render.Internal
+ type: exitcode-stdio-1.0
+ main-is: Test.hs
+ build-depends:
+ base >=4.9.1.0 && <4.10,
+ attoparsec >=0.12 && <0.14,
+ text >=1.1 && <1.3,
+ doctest >=0.9 && <0.12,
+ Glob >=0.7 && <0.9,
+ QuickCheck >=2.9.2 && <2.11,
+ makefile >=1.0.0.4 && <1.1
+ default-language: Haskell2010
+ hs-source-dirs: src
+ other-modules:
+ Data.Makefile
+ Data.Makefile.Parse
+ Data.Makefile.Parse.Internal
+ Data.Makefile.Render
+ Data.Makefile.Render.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/src/Data/Makefile/Parse/Internal.hs new/makefile-1.0.0.4/src/Data/Makefile/Parse/Internal.hs
--- old/makefile-0.1.1.0/src/Data/Makefile/Parse/Internal.hs 2016-08-05 15:37:35.000000000 +0200
+++ new/makefile-1.0.0.4/src/Data/Makefile/Parse/Internal.hs 2017-04-29 12:29:28.000000000 +0200
@@ -1,13 +1,16 @@
{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE LambdaCase #-}
module Data.Makefile.Parse.Internal where
-import Control.Applicative ((<|>))
-import Data.Attoparsec.ByteString
+import Control.Monad
+import Control.Applicative
+import Data.Attoparsec.Text
import Data.Makefile
-import qualified Data.Attoparsec.ByteString.Char8 as Atto
-import qualified Data.ByteString as B
+import qualified Data.Attoparsec.Text as Atto
+import qualified Data.Text as T
+import qualified Data.Text.IO as T
-- $setup
-- >>> :set -XOverloadedStrings
@@ -16,11 +19,14 @@
--
-- Tries to open and parse a file name @Makefile@ in the current directory.
parseMakefile :: IO (Either String Makefile)
-parseMakefile = Atto.parseOnly makefile <$> B.readFile "Makefile"
+parseMakefile = Atto.parseOnly makefile <$> T.readFile "Makefile"
-- | Parse the specified file as a makefile.
parseAsMakefile :: FilePath -> IO (Either String Makefile)
-parseAsMakefile f = Atto.parseOnly makefile <$> B.readFile f
+parseAsMakefile f = Atto.parseOnly makefile <$> T.readFile f
+
+parseMakefileContents :: T.Text -> Either String Makefile
+parseMakefileContents = Atto.parseOnly makefile
--------------------------------------------------------------------------------
-- Parsers
@@ -34,56 +40,125 @@
entry :: Parser Entry
entry = many' emptyLine *> (assignment <|> rule)
--- | Parser of variable assignment
+-- | Parser of variable assignment (see 'Assignment'). Note that leading and
+-- trailing whitespaces will be stripped both from the variable name and
+-- assigned value.
+--
+-- Note that this tries to follow GNU make's (crazy) behavior when it comes to
+-- variable names and assignment operators.
+--
+-- >>> Atto.parseOnly assignment "foo = bar "
+-- Right (Assignment RecursiveAssign "foo" "bar")
+--
+-- >>> Atto.parseOnly assignment "foo := bar "
+-- Right (Assignment SimpleAssign "foo" "bar")
+--
+-- >>> Atto.parseOnly assignment "foo ::= bar "
+-- Right (Assignment SimplePosixAssign "foo" "bar")
+--
+-- >>> Atto.parseOnly assignment "foo?= bar "
+-- Right (Assignment ConditionalAssign "foo" "bar")
+--
+-- >>> Atto.parseOnly assignment "foo??= bar "
+-- Right (Assignment ConditionalAssign "foo?" "bar")
+--
+-- >>> Atto.parseOnly assignment "foo!?!= bar "
+-- Right (Assignment ShellAssign "foo!?" "bar")
assignment :: Parser Entry
-assignment = Assignment <$> (lazyVar <|> immVar)
- <*> toLineEnd1
+assignment = do
+ varName <- variableName
+ assType <- assignmentType
+ varVal <- toEscapedLineEnd
+ return (Assignment assType varName varVal)
+
+-- | Read chars while some ('Parser', monadic) predicate is 'True'.
+--
+-- XXX: extremely inefficient.
+takeWhileM :: (Char -> Parser Bool) -> Parser T.Text
+takeWhileM a = (T.pack . reverse) <$> go []
+ where
+ go cs = do
+ c <- Atto.anyChar
+ True <- a c
+ go (c:cs) <|> pure (c:cs)
+
+
+-- | Parse a variable name, not consuming any of the assignment operator. See
+-- also 'assignment'.
+--
+-- >>> Atto.parseOnly variableName "foo!?!= bar "
+-- Right "foo!?"
+variableName :: Parser T.Text
+variableName = stripped $ takeWhileM go
+ where
+ go '+' = Atto.peekChar' >>= \case
+ '=' -> return False
+ _c -> return True
+ go '?' = Atto.peekChar' >>= \case
+ '=' -> return False
+ _c -> return True
+ go '!' = Atto.peekChar' >>= \case
+ '=' -> return False
+ _c -> return True
+ -- those chars are not allowed in variable names
+ go ':' = return False
+ go '#' = return False
+ go '=' = return False
+ go _c = return True
+
+-- | Parse an assignment type, not consuming any of the assigned value. See
+-- also 'assignment'.
+--
+-- >>> Atto.parseOnly assignmentType "!= bar "
+-- Right ShellAssign
+assignmentType :: Parser AssignmentType
+assignmentType =
+ ("=" *> pure RecursiveAssign)
+ <|> ("+=" *> pure AppendAssign)
+ <|> ("?=" *> pure ConditionalAssign)
+ <|> ("!=" *> pure ShellAssign)
+ <|> (":=" *> pure SimpleAssign)
+ <|> ("::=" *> pure SimplePosixAssign)
-- | Parser for an entire rule
rule :: Parser Entry
-rule = Rule <$> target
- <*> (many' dependency <* nextLine)
- <*> many' command
+rule =
+ Rule
+ <$> target
+ <*> many' dependency
+ <*> many' (many' emptyLine *> command)
-- | Parser for a command
command :: Parser Command
-command = Command <$> (many' emptyLine *> Atto.char8 '\t'
- *> toLineEnd1
- <* nextLine)
+command = Command <$> (Atto.char '\t' *> toEscapedLineEnd)
-- | Parser for a (rule) target
target :: Parser Target
-target = Target <$> (Atto.takeWhile (/= ':') <* Atto.char8 ':')
+target = Target <$> stripped (Atto.takeWhile (/= ':') <* Atto.char ':')
-- | Parser for a (rule) dependency
dependency :: Parser Dependency
-dependency = Dependency <$> (Atto.takeWhile isSpaceChar
- *> Atto.takeWhile1 (`notElem` [' ', '\n', '#']))
-
--- | Parser for variable name in declaration (lazy set, @var = x@)
---
--- >>> Atto.parseOnly lazyVar "CFLAGS=-c -Wall"
--- Right "CFLAGS"
-lazyVar :: Parser B.ByteString
-lazyVar = Atto.takeWhile1 (`notElem` ['=', '\n', '#']) <* Atto.char8 '='
-
--- | Parser for variable name in declaration (immediate set, @var := x@)
---
--- >>> Atto.parseOnly immVar "CFLAGS:=-c -Wall"
--- Right "CFLAGS"
-immVar :: Parser B.ByteString
-immVar = Atto.takeWhile1 (`notElem` [':', '\n', '#']) <* Atto.string ":="
+dependency = Dependency <$> (sameLine <|> newLine)
+ where
+ sameLine =
+ Atto.takeWhile (== ' ')
+ *> Atto.takeWhile1 (`notElem` [' ', '\n', '#', '\\'])
+ newLine =
+ Atto.takeWhile (== ' ')
+ *> Atto.char '\\'
+ *> Atto.char '\n'
+ *> (sameLine <|> newLine)
-- | Parser for a comment (the comment starts with the hashtag)
--
-- >>> Atto.parseOnly comment "# I AM A COMMENT"
-- Right " I AM A COMMENT"
-comment :: Parser B.ByteString
-comment = Atto.char8 '#' *> Atto.takeWhile (/= '\n')
+comment :: Parser T.Text
+comment = Atto.char '#' *> Atto.takeWhile (/= '\n')
-- | Consume a newline character (@'\n'@)
nextLine :: Parser ()
-nextLine = Atto.takeWhile (/= '\n') *> Atto.char8 '\n' *> pure ()
+nextLine = Atto.takeWhile (/= '\n') *> Atto.char '\n' *> pure ()
-- | Consume an empty line (potentially containing spaces and/or tabs).
--
@@ -92,11 +167,35 @@
emptyLine :: Parser ()
emptyLine = Atto.takeWhile (`elem` ['\t', ' ']) *>
many' comment *>
- Atto.char8 '\n' *>
+ Atto.char '\n' *>
pure ()
-isSpaceChar :: Char -> Bool
-isSpaceChar c = c == ' '
+toLineEnd :: Parser T.Text
+toLineEnd = Atto.takeWhile (`notElem` ['\n', '#'])
+
+-- | Get the contents until the end of the (potentially multi) line. Multiple
+-- lines are separated by a @\\@ char and individual lines will be stripped and
+-- spaces will be interspersed.
+--
+-- The final @\n@ character is consumed.
+--
+-- >>> Atto.parseOnly toEscapedLineEnd "foo bar \\\n baz"
+-- Right "foo bar baz"
+--
+-- >>> Atto.parseOnly toEscapedLineEnd "foo \t\\\n bar \\\n baz \\\n \t"
+-- Right "foo bar baz"
+toEscapedLineEnd :: Parser T.Text
+toEscapedLineEnd = (T.unwords . filter (not . T.null)) <$> go
+ where
+ go = do
+ l <- toLineEnd <* (void (Atto.char '\n') <|> pure ())
+ case T.stripSuffix "\\" l of
+ Nothing -> return [T.strip l]
+ Just l' -> (T.strip l':) <$> go
+
+-------------------------------------------------------------------------------
+-- Helpers
+-------------------------------------------------------------------------------
-toLineEnd1 :: Parser B.ByteString
-toLineEnd1 = Atto.takeWhile1 (`notElem` ['\n', '#'])
+stripped :: Parser T.Text -> Parser T.Text
+stripped = fmap T.strip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/src/Data/Makefile/Parse.hs new/makefile-1.0.0.4/src/Data/Makefile/Parse.hs
--- old/makefile-0.1.1.0/src/Data/Makefile/Parse.hs 2016-07-01 17:29:08.000000000 +0200
+++ new/makefile-1.0.0.4/src/Data/Makefile/Parse.hs 2017-04-29 12:29:28.000000000 +0200
@@ -3,15 +3,18 @@
module Data.Makefile.Parse
( I.parseMakefile
, I.parseAsMakefile
+ , I.parseMakefileContents
, I.makefile
, I.entry
, I.assignment
+ , I.variableName
+ , I.assignmentType
, I.rule
, I.command
, I.target
, I.dependency
- , I.lazyVar
- , I.immVar
- , I.comment) where
+ , I.comment
+ , I.toEscapedLineEnd
+ ) where
import qualified Data.Makefile.Parse.Internal as I
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/src/Data/Makefile/Render/Internal.hs new/makefile-1.0.0.4/src/Data/Makefile/Render/Internal.hs
--- old/makefile-0.1.1.0/src/Data/Makefile/Render/Internal.hs 2017-02-17 22:19:13.000000000 +0100
+++ new/makefile-1.0.0.4/src/Data/Makefile/Render/Internal.hs 2017-04-15 22:41:21.000000000 +0200
@@ -3,31 +3,42 @@
module Data.Makefile.Render.Internal where
import Data.Makefile
import Data.Monoid
-import qualified Data.ByteString.Lazy as B
-import Data.ByteString.Builder
-import qualified Data.ByteString.Lazy.Char8 as BL
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.IO as TL
+import Data.Text.Lazy.Builder
writeMakefile :: FilePath -> Makefile -> IO ()
writeMakefile f m = do
let s = encodeMakefile m
- BL.writeFile f s
+ TL.writeFile f s
-encodeMakefile :: Makefile -> B.ByteString
-encodeMakefile = toLazyByteString . renderMakefile
+encodeMakefile :: Makefile -> TL.Text
+encodeMakefile = toLazyText . renderMakefile
renderMakefile :: Makefile -> Builder
-renderMakefile (Makefile es ) = mconcat [renderEntry e <> charUtf8 '\n' | e <- es]
+renderMakefile (Makefile es ) = mconcat [renderEntry e <> singleton '\n' | e <- es]
renderEntry :: Entry -> Builder
-renderEntry (Assignment key value ) = byteString key <> charUtf8 '=' <> byteString value
+renderEntry (Assignment RecursiveAssign key value ) =
+ fromText key <> singleton '=' <> fromText value
+renderEntry (Assignment SimpleAssign key value ) =
+ fromText key <> fromText ":=" <> fromText value
+renderEntry (Assignment SimplePosixAssign key value ) =
+ fromText key <> fromText "::=" <> fromText value
+renderEntry (Assignment ConditionalAssign key value ) =
+ fromText key <> fromText "?=" <> fromText value
+renderEntry (Assignment ShellAssign key value ) =
+ fromText key <> fromText "!=" <> fromText value
+renderEntry (Assignment AppendAssign key value ) =
+ fromText key <> fromText "+=" <> fromText value
renderEntry (Rule (Target t) ds cmds) =
- byteString t <> charUtf8 ':' <>
- mconcat [charUtf8 ' ' <> renderDep d | d <- ds] <>
- charUtf8 '\n' <>
- mconcat [renderCmd cmd <> charUtf8 '\n' | cmd <- cmds]
+ fromText t <> singleton ':' <>
+ mconcat [singleton ' ' <> renderDep d | d <- ds] <>
+ singleton '\n' <>
+ mconcat [renderCmd cmd <> singleton '\n' | cmd <- cmds]
renderDep :: Dependency -> Builder
-renderDep (Dependency dep ) = byteString dep
+renderDep (Dependency dep ) = fromText dep
renderCmd :: Command -> Builder
-renderCmd (Command cmd ) = charUtf8 '\t' <> byteString cmd
+renderCmd (Command cmd ) = singleton '\t' <> fromText cmd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/src/Data/Makefile.hs new/makefile-1.0.0.4/src/Data/Makefile.hs
--- old/makefile-0.1.1.0/src/Data/Makefile.hs 2016-07-11 11:57:16.000000000 +0200
+++ new/makefile-1.0.0.4/src/Data/Makefile.hs 2017-04-29 12:31:28.000000000 +0200
@@ -22,9 +22,10 @@
@
Makefile {
entries =
- [ Assignment "hello " " world"
- , Rule (Target "foo") [Dependency "bar"] [Command "baz"] ]
- })
+ [ Assignment RecursiveAssign "hello" "world"
+ , Rule (Target "foo") [Dependency "bar"] [Command "baz"]
+ ]
+ }
@
-}
@@ -33,7 +34,7 @@
import Data.String (IsString)
-import qualified Data.ByteString as B
+import qualified Data.Text as T
-- | A Makefile object, a list of makefile entries
@@ -42,13 +43,29 @@
-- | A makefile entry, either a rule @(target: dep1 dep1; commands)@ or a
-- variable assignment (@hello = world@ or @hello := world@)
data Entry = Rule Target [Dependency] [Command]
- | Assignment B.ByteString B.ByteString deriving (Show, Eq)
+ | Assignment AssignmentType T.Text T.Text
+ deriving (Show, Eq)
+
+data AssignmentType
+ = RecursiveAssign
+ -- ^ foo = bar
+ | SimpleAssign
+ -- ^ foo := bar
+ | SimplePosixAssign
+ -- ^ foo ::= bar
+ | ConditionalAssign
+ -- ^ foo ?= bar
+ | ShellAssign
+ -- ^ foo != bar
+ | AppendAssign
+ -- ^ foo += bar
+ deriving (Show, Eq, Enum, Bounded)
-- | Makefile target (@foo@ in the example above)
-newtype Target = Target B.ByteString deriving (Show, Eq, IsString)
+newtype Target = Target T.Text deriving (Show, Eq, IsString)
-- | Target dependency (@bar@ in the example above)
-newtype Dependency = Dependency B.ByteString deriving (Show, Eq, IsString)
+newtype Dependency = Dependency T.Text deriving (Show, Eq, IsString)
-- | Command (@baz@ in the example above)
-newtype Command = Command B.ByteString deriving (Show, Eq, IsString)
+newtype Command = Command T.Text deriving (Show, Eq, IsString)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makefile-0.1.1.0/src/Test.hs new/makefile-1.0.0.4/src/Test.hs
--- old/makefile-0.1.1.0/src/Test.hs 2017-02-17 22:19:13.000000000 +0100
+++ new/makefile-1.0.0.4/src/Test.hs 2017-04-15 22:41:21.000000000 +0200
@@ -5,12 +5,39 @@
import "Glob" System.FilePath.Glob (glob)
import Test.DocTest (doctest)
+import Data.Monoid
import Control.Monad
-import Data.ByteString hiding (any)
import Data.Makefile
import Data.Makefile.Parse
import Data.Makefile.Render
+import Test.QuickCheck
+import qualified Data.Text as T
+import qualified Data.Text.Lazy as TL
+
+instance Arbitrary Target where
+ arbitrary = pure $ Target "foo"
+
+instance Arbitrary Dependency where
+ arbitrary = pure $ Dependency "bar"
+
+instance Arbitrary Command where
+ arbitrary = pure $ Command "baz"
+
+instance Arbitrary AssignmentType where
+ arbitrary =
+ elements [minBound..maxBound]
+
+instance Arbitrary Entry where
+ arbitrary =
+ oneof
+ [ Rule <$> arbitrary <*> arbitrary <*> arbitrary
+ , Assignment <$> arbitrary <*> pure "foo" <*> pure "bar"
+ ]
+
+instance Arbitrary Makefile where
+ arbitrary = Makefile <$> arbitrary
+
main :: IO ()
main = do
@@ -66,23 +93,150 @@
withMakefile "test-data/basic/Makefile2" $ \m -> do
writeMakefile "test-data/basic/_Makefile2" m
withMakefile "test-data/basic/_Makefile2" $ \mm -> assertMakefile m mm
+ withMakefileContents
+ "foo = bar"
+ (assertAssignments [("foo", "bar")])
+ withMakefileContents "foo: bar" (assertTargets ["foo"])
+ withMakefileContents
+ "foo : bar"
+ (assertTargets ["foo"])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var="
+ , "foo: bar"
+ ]
+ )
+ (assertMakefile
+ Makefile
+ { entries =
+ [ Assignment RecursiveAssign "var" ""
+ , Rule "foo" ["bar"] []
+ ]
+ }
+ )
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar" ]
+ )
+ (assertAssignments [("var", "foo bar")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar\\"
+ , "baz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar \\"
+ , "baz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar\\"
+ , " baz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar \\"
+ , " baz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar \\"
+ , "\tbaz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "var=foo bar \t \\"
+ , " \t baz"
+ ]
+ )
+ (assertAssignments [("var", "foo bar baz")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "SUBDIRS=anna bspt cacheprof \\"
+ , " compress compress2 fem"
+ ]
+ )
+ (assertAssignments
+ [("SUBDIRS", "anna bspt cacheprof compress compress2 fem")])
+ withMakefileContents
+ (T.pack $ unlines
+ [ "foo: anna bspt cacheprof \\"
+ , " compress compress2 fem"
+ ]
+ )
+ (assertMakefile
+ Makefile
+ { entries =
+ [ Rule
+ "foo"
+ [ "anna"
+ , "bspt"
+ , "cacheprof"
+ , "compress"
+ , "compress2"
+ , "fem"
+ ] []
+ ]
+ }
+ )
+ withMakefileContents
+ (T.pack $ unlines
+ [ "foo:"
+ , "\tcd dir/ && \\"
+ , " ls"
+ ]
+ )
+ (assertMakefile
+ Makefile
+ { entries =
+ [ Rule "foo" [] ["cd dir/ && ls"]
+ ]
+ }
+ )
+ Success{} <- quickCheckResult prop_encodeDecode
+ return ()
+
+prop_encodeDecode :: Makefile -> Bool
+prop_encodeDecode m =
+ (fromRight $ parseMakefileContents $ TL.toStrict $ encodeMakefile m) == m
+
+withMakefileContents :: T.Text -> (Makefile -> IO ()) -> IO ()
+withMakefileContents contents a =
+ a $ fromRight (parseMakefileContents contents)
withMakefile :: FilePath -> (Makefile -> IO ()) -> IO ()
withMakefile f a = fromRight <$> parseAsMakefile f >>= a
assertMakefile :: Makefile -> Makefile -> IO ()
-assertMakefile m1 m2 = if (m1 == m2) then return () else error "Makefiles mismatch!"
+assertMakefile m1 m2 =
+ unless (m1 == m2)
+ $ error $ unwords
+ [ "Makefiles mismatch!"
+ , "got " <> show m1
+ , "and " <> show m2
+ ]
assertTargets :: [Target] -> Makefile -> IO ()
assertTargets ts m = mapM_ (`assertTarget` m) ts
-assertAssignments :: [(ByteString, ByteString)] -> Makefile -> IO ()
+assertAssignments :: [(T.Text, T.Text)] -> Makefile -> IO ()
assertAssignments as m = mapM_ (`assertAssignment` m) as
-assertAssignment :: (ByteString, ByteString) -> Makefile -> IO ()
+assertAssignment :: (T.Text, T.Text) -> Makefile -> IO ()
assertAssignment (n, v) (Makefile m) = unless (any hasAssignment m) $
error ("Assignment " ++ show (n, v) ++ " wasn't found in Makefile " ++ show m)
- where hasAssignment (Assignment n' v') = n == n' && v == v'
+ where hasAssignment (Assignment _ n' v') = n == n' && v == v'
hasAssignment _ = False
assertTarget :: Target -> Makefile -> IO ()
1
0
Hello community,
here is the log from the commit of package ghc-logging-facade for openSUSE:Factory checked in at 2017-08-31 20:48:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-logging-facade (Old)
and /work/SRC/openSUSE:Factory/.ghc-logging-facade.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-logging-facade"
Thu Aug 31 20:48:19 2017 rev:3 rq:513426 version:0.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-logging-facade/ghc-logging-facade.changes 2016-12-06 14:25:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-logging-facade.new/ghc-logging-facade.changes 2017-08-31 20:48:20.431861240 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:34 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.3.0.
+
+-------------------------------------------------------------------
Old:
----
logging-facade-0.1.1.tar.gz
logging-facade.cabal
New:
----
logging-facade-0.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-logging-facade.spec ++++++
--- /var/tmp/diff_new_pack.afI0dZ/_old 2017-08-31 20:48:21.291740541 +0200
+++ /var/tmp/diff_new_pack.afI0dZ/_new 2017-08-31 20:48:21.299739419 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-logging-facade
#
-# 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,17 +19,16 @@
%global pkg_name logging-facade
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.1
+Version: 0.3.0
Release: 0
Summary: Simple logging abstraction that allows multiple back-ends
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-call-stack-devel
BuildRequires: ghc-rpm-macros
-BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-transformers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
@@ -52,7 +51,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ logging-facade-0.1.1.tar.gz -> logging-facade-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/LICENSE new/logging-facade-0.3.0/LICENSE
--- old/logging-facade-0.1.1/LICENSE 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/LICENSE 2017-06-01 15:24:19.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2014 Simon Hengel <sol(a)typeful.net>
+Copyright (c) 2014-2017 Simon Hengel <sol(a)typeful.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/logging-facade.cabal new/logging-facade-0.3.0/logging-facade.cabal
--- old/logging-facade-0.1.1/logging-facade.cabal 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/logging-facade.cabal 2017-06-01 15:24:19.000000000 +0200
@@ -1,10 +1,16 @@
+-- This file has been generated from package.yaml by hpack version 0.17.0.
+--
+-- see: https://github.com/sol/hpack
+
name: logging-facade
-version: 0.1.1
+version: 0.3.0
synopsis: Simple logging abstraction that allows multiple back-ends
description: Simple logging abstraction that allows multiple back-ends
+homepage: https://github.com/sol/logging-facade#readme
+bug-reports: https://github.com/sol/logging-facade/issues
license: MIT
license-file: LICENSE
-copyright: (c) 2014 Simon Hengel
+copyright: (c) 2014-2017 Simon Hengel
author: Simon Hengel <sol(a)typeful.net>
maintainer: Simon Hengel <sol(a)typeful.net>
build-type: Simple
@@ -17,24 +23,30 @@
library
ghc-options: -Wall
- hs-source-dirs: src
+ hs-source-dirs:
+ src
exposed-modules:
System.Logging.Facade
- System.Logging.Facade.Sink
System.Logging.Facade.Class
+ System.Logging.Facade.Sink
System.Logging.Facade.Types
+ other-modules:
+ Paths_logging_facade
build-depends:
base == 4.*
+ , call-stack
, transformers
- , template-haskell
default-language: Haskell2010
test-suite spec
type: exitcode-stdio-1.0
ghc-options: -Wall
- hs-source-dirs: test
+ hs-source-dirs:
+ test
main-is: Spec.hs
other-modules:
+ Helper
+ System.Logging.Facade.SinkSpec
System.Logging.FacadeSpec
build-depends:
base == 4.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/src/System/Logging/Facade/Sink.hs new/logging-facade-0.3.0/src/System/Logging/Facade/Sink.hs
--- old/logging-facade-0.1.1/src/System/Logging/Facade/Sink.hs 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/src/System/Logging/Facade/Sink.hs 2017-06-01 15:24:19.000000000 +0200
@@ -1,13 +1,18 @@
+{-# LANGUAGE CPP #-}
module System.Logging.Facade.Sink (
LogSink
, defaultLogSink
-, setLogSink
, getLogSink
+, setLogSink
+, swapLogSink
+, withLogSink
) where
+import Control.Concurrent
import Data.IORef
import System.IO
import System.IO.Unsafe (unsafePerformIO)
+import Control.Exception
import System.Logging.Facade.Types
@@ -16,7 +21,7 @@
-- use the unsafePerformIO hack to share one sink across a process
logSink :: IORef LogSink
-logSink = unsafePerformIO (newIORef defaultLogSink)
+logSink = unsafePerformIO (defaultLogSink >>= newIORef)
{-# NOINLINE logSink #-}
-- | Return the global log sink.
@@ -27,9 +32,22 @@
setLogSink :: LogSink -> IO ()
setLogSink = atomicWriteIORef logSink
--- | A log sink that writes log messages to `stderr`
-defaultLogSink :: LogSink
-defaultLogSink record = hPutStrLn stderr output
+-- | Return the global log sink and set it to a new value in one atomic
+-- operation.
+swapLogSink :: LogSink -> IO LogSink
+swapLogSink new = atomicModifyIORef logSink $ \old -> (new, old)
+
+-- | Set the global log sink to a specified value, run given action, and
+-- finally restore the global log sink to its previous value.
+withLogSink :: LogSink -> IO () -> IO ()
+withLogSink sink action = bracket (swapLogSink sink) setLogSink (const action)
+
+-- | A thread-safe log sink that writes log messages to `stderr`
+defaultLogSink :: IO LogSink
+defaultLogSink = defaultLogSink_ `fmap` newMVar ()
+
+defaultLogSink_ :: MVar () -> LogSink
+defaultLogSink_ mvar record = withMVar mvar (\() -> hPutStrLn stderr output)
where
level = logRecordLevel record
mLocation = logRecordLocation record
@@ -40,3 +58,10 @@
formatLocation :: Location -> ShowS
formatLocation loc = showString (locationFile loc) . colon . shows (locationLine loc) . colon . shows (locationColumn loc)
where colon = showString ":"
+
+#if !MIN_VERSION_base(4,6,0)
+atomicWriteIORef :: IORef a -> a -> IO ()
+atomicWriteIORef ref a = do
+ x <- atomicModifyIORef ref (\_ -> (a, ()))
+ x `seq` return ()
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/src/System/Logging/Facade/Types.hs new/logging-facade-0.3.0/src/System/Logging/Facade/Types.hs
--- old/logging-facade-0.1.1/src/System/Logging/Facade/Types.hs 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/src/System/Logging/Facade/Types.hs 2017-06-01 15:24:19.000000000 +0200
@@ -1,7 +1,7 @@
module System.Logging.Facade.Types where
data LogLevel = TRACE | DEBUG | INFO | WARN | ERROR
- deriving (Eq, Show, Ord, Bounded, Enum)
+ deriving (Eq, Show, Read, Ord, Bounded, Enum)
data Location = Location {
locationPackage :: String
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/src/System/Logging/Facade.hs new/logging-facade-0.3.0/src/System/Logging/Facade.hs
--- old/logging-facade-0.1.1/src/System/Logging/Facade.hs 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/src/System/Logging/Facade.hs 2017-06-01 15:24:19.000000000 +0200
@@ -1,8 +1,5 @@
-{-# LANGUAGE CPP #-}
-#if MIN_VERSION_base(4,8,1)
-#define HAS_SOURCE_LOCATIONS
-{-# LANGUAGE ImplicitParams #-}
-#endif
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE ConstraintKinds #-}
-- |
-- This module is intended to be imported qualified:
--
@@ -22,49 +19,36 @@
) where
import Prelude hiding (log, error)
+import Data.CallStack
import System.Logging.Facade.Types
import System.Logging.Facade.Class
-#ifdef HAS_SOURCE_LOCATIONS
-#if ! MIN_VERSION_base(4,9,0)
-import GHC.SrcLoc
-#endif
-import GHC.Stack
-#define with_loc (?loc :: CallStack) =>
-#else
-#define with_loc
-#endif
-
-- | Produce a log message with specified log level.
-log :: with_loc Logging m => LogLevel -> String -> m ()
+log :: (HasCallStack, Logging m) => LogLevel -> String -> m ()
log level message = consumeLogRecord (LogRecord level location message)
- where
- location :: Maybe Location
-#ifdef HAS_SOURCE_LOCATIONS
- location = case reverse (getCallStack ?loc) of
- (_, loc) : _ -> Just $ Location (srcLocPackage loc) (srcLocModule loc) (srcLocFile loc) (srcLocStartLine loc) (srcLocStartCol loc)
- _ -> Nothing
-#else
- location = Nothing
-#endif
+
+location :: HasCallStack => Maybe Location
+location = case reverse callStack of
+ (_, loc) : _ -> Just $ Location (srcLocPackage loc) (srcLocModule loc) (srcLocFile loc) (srcLocStartLine loc) (srcLocStartCol loc)
+ _ -> Nothing
-- | Produce a log message with log level `TRACE`.
-trace :: with_loc Logging m => String -> m ()
+trace :: (HasCallStack, Logging m) => String -> m ()
trace = log TRACE
-- | Produce a log message with log level `DEBUG`.
-debug :: with_loc Logging m => String -> m ()
+debug :: (HasCallStack, Logging m) => String -> m ()
debug = log DEBUG
-- | Produce a log message with log level `INFO`.
-info :: with_loc Logging m => String -> m ()
+info :: (HasCallStack, Logging m) => String -> m ()
info = log INFO
-- | Produce a log message with log level `WARN`.
-warn :: with_loc Logging m => String -> m ()
+warn :: (HasCallStack, Logging m) => String -> m ()
warn = log WARN
-- | Produce a log message with log level `ERROR`.
-error :: with_loc Logging m => String -> m ()
+error :: (HasCallStack, Logging m) => String -> m ()
error = log ERROR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/test/Helper.hs new/logging-facade-0.3.0/test/Helper.hs
--- old/logging-facade-0.1.1/test/Helper.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/logging-facade-0.3.0/test/Helper.hs 2017-06-01 15:24:19.000000000 +0200
@@ -0,0 +1,17 @@
+module Helper (
+ module Test.Hspec
+, logSinkSpy
+) where
+
+import Test.Hspec
+import Data.IORef
+
+import System.Logging.Facade.Types
+import System.Logging.Facade.Sink
+
+logSinkSpy :: IO (IO [LogRecord], LogSink)
+logSinkSpy = do
+ ref <- newIORef []
+ let spy :: LogSink
+ spy record = modifyIORef ref (record {logRecordLocation = Nothing} :)
+ return (readIORef ref, spy)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/test/System/Logging/Facade/SinkSpec.hs new/logging-facade-0.3.0/test/System/Logging/Facade/SinkSpec.hs
--- old/logging-facade-0.1.1/test/System/Logging/Facade/SinkSpec.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/logging-facade-0.3.0/test/System/Logging/Facade/SinkSpec.hs 2017-06-01 15:24:19.000000000 +0200
@@ -0,0 +1,25 @@
+module System.Logging.Facade.SinkSpec (main, spec) where
+
+import Helper
+
+import System.Logging.Facade
+import System.Logging.Facade.Types
+import System.Logging.Facade.Sink
+
+main :: IO ()
+main = hspec spec
+
+spec :: Spec
+spec = do
+ describe "withLogSink" $ do
+ it "sets the global log sink to specified value before running specified action" $ do
+ (logRecords, spy) <- logSinkSpy
+ withLogSink spy (info "some log message")
+ logRecords `shouldReturn` [LogRecord INFO Nothing "some log message"]
+
+ it "restores the original log sink when done" $ do
+ (logRecords, spy) <- logSinkSpy
+ setLogSink spy
+ withLogSink (\_ -> return ()) (return ())
+ info "some log message"
+ logRecords `shouldReturn` [LogRecord INFO Nothing "some log message"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logging-facade-0.1.1/test/System/Logging/FacadeSpec.hs new/logging-facade-0.3.0/test/System/Logging/FacadeSpec.hs
--- old/logging-facade-0.1.1/test/System/Logging/FacadeSpec.hs 2016-02-21 05:05:49.000000000 +0100
+++ new/logging-facade-0.3.0/test/System/Logging/FacadeSpec.hs 2017-06-01 15:24:19.000000000 +0200
@@ -1,7 +1,6 @@
module System.Logging.FacadeSpec (main, spec) where
-import Test.Hspec
-import Data.IORef
+import Helper
import System.Logging.Facade.Types
import System.Logging.Facade.Sink
@@ -14,9 +13,6 @@
spec = do
describe "info" $ do
it "writes a log message with log level INFO" $ do
- ref <- newIORef []
- let captureLogMessage :: LogSink
- captureLogMessage record = modifyIORef ref (record {logRecordLocation = Nothing} :)
- setLogSink captureLogMessage
- info "some log message"
- readIORef ref `shouldReturn` [LogRecord INFO Nothing "some log message"]
+ (logRecords, spy) <- logSinkSpy
+ withLogSink spy (info "some log message")
+ logRecords `shouldReturn` [LogRecord INFO Nothing "some log message"]
1
0
Hello community,
here is the log from the commit of package ghc-log-elasticsearch for openSUSE:Factory checked in at 2017-08-31 20:48:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-log-elasticsearch (Old)
and /work/SRC/openSUSE:Factory/.ghc-log-elasticsearch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-log-elasticsearch"
Thu Aug 31 20:48:16 2017 rev:2 rq:513424 version:0.9.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-log-elasticsearch/ghc-log-elasticsearch.changes 2017-05-10 20:45:26.257855554 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-log-elasticsearch.new/ghc-log-elasticsearch.changes 2017-08-31 20:48:18.084190775 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:12 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.9.0.1.
+
+-------------------------------------------------------------------
Old:
----
log-elasticsearch-0.7.tar.gz
log-elasticsearch.cabal
New:
----
log-elasticsearch-0.9.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-log-elasticsearch.spec ++++++
--- /var/tmp/diff_new_pack.ENWmEM/_old 2017-08-31 20:48:18.912074568 +0200
+++ /var/tmp/diff_new_pack.ENWmEM/_new 2017-08-31 20:48:18.924072884 +0200
@@ -18,14 +18,13 @@
%global pkg_name log-elasticsearch
Name: ghc-%{pkg_name}
-Version: 0.7
+Version: 0.9.0.1
Release: 0
Summary: Structured logging solution (Elasticsearch back end)
License: BSD-3-Clause
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-aeson-pretty-devel
@@ -34,6 +33,7 @@
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-http-client-devel
+BuildRequires: ghc-http-client-tls-devel
BuildRequires: ghc-log-base-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-semigroups-devel
@@ -62,7 +62,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -82,5 +81,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc CHANGELOG.md README.md
%changelog
++++++ log-elasticsearch-0.7.tar.gz -> log-elasticsearch-0.9.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/CHANGELOG.md new/log-elasticsearch-0.9.0.1/CHANGELOG.md
--- old/log-elasticsearch-0.7/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/CHANGELOG.md 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,16 @@
+# log-elasticsearch-0.9.0.1 (2017-06-19)
+* 'withElasticSearchLogger' no longer fails when the Elasticsearch server is down.
+
+# log-elasticsearch-0.9.0.0 (2017-05-04)
+* Now works with bloodhound-0.14.0.0 (#30).
+
+# log-elasticsearch-0.8.1 (2017-03-27)
+* Log.Backend.ElasticSearch.Internal now exports 'EsUsername' and
+ 'EsPassword'.
+
+# log-elasticsearch-0.8 (2017-03-16)
+* Made ElasticSearchConfig an abstract type (#27).
+* Added support for HTTPS and basic auth (#26).
+
+# log-elasticsearch-0.7 (2016-11-25)
+* Initial release (split from the log package).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/README.md new/log-elasticsearch-0.9.0.1/README.md
--- old/log-elasticsearch-0.7/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/README.md 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,3 @@
+# log-elasticsearch [![Hackage version](https://img.shields.io/hackage/v/log-elasticsearch.svg?label=Hacka… [![Build Status](https://secure.travis-ci.org/scrive/log.svg?branch=master)](http://…
+
+Elasticsearch back end for the `log` library.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/log-elasticsearch.cabal new/log-elasticsearch-0.9.0.1/log-elasticsearch.cabal
--- old/log-elasticsearch-0.7/log-elasticsearch.cabal 2016-11-25 10:08:48.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/log-elasticsearch.cabal 2017-06-20 18:17:46.000000000 +0200
@@ -1,5 +1,5 @@
name: log-elasticsearch
-version: 0.7
+version: 0.9.0.1
synopsis: Structured logging solution (Elasticsearch back end)
description: Elasticsearch back end for the 'log' library.
@@ -17,23 +17,33 @@
category: System
build-type: Simple
cabal-version: >=1.10
-tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+extra-source-files: CHANGELOG.md, README.md
+tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
Source-repository head
Type: git
Location: https://github.com/scrive/log.git
library
- exposed-modules: Log.Backend.ElasticSearch
+ exposed-modules: Log.Backend.ElasticSearch.V1
+ Log.Backend.ElasticSearch.V1.Internal
+ Log.Backend.ElasticSearch.V1.Lens
+ Log.Backend.ElasticSearch.V5
+ Log.Backend.ElasticSearch.V5.Internal
+ Log.Backend.ElasticSearch.V5.Lens
+ Log.Backend.ElasticSearch
+ Log.Backend.ElasticSearch.Lens
+ Log.Backend.ElasticSearch.Internal
build-depends: base <5,
log-base >= 0.7,
aeson >=0.11.0.0,
aeson-pretty >=0.8.2,
bytestring,
base64-bytestring,
- bloodhound >= 0.11.1,
+ bloodhound >= 0.13 && < 0.15,
deepseq,
http-client,
+ http-client-tls,
semigroups,
text,
text-show >= 2,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/Internal.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/Internal.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/Internal.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.Internal
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1.Internal ) where
+
+import Log.Backend.ElasticSearch.V1.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/Lens.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/Lens.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/Lens.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.Lens
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1.Lens ) where
+
+import Log.Backend.ElasticSearch.V1.Lens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1/Internal.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Internal.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Internal.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,31 @@
+module Log.Backend.ElasticSearch.V1.Internal
+ (ElasticSearchConfig(..)
+ ,defaultElasticSearchConfig
+ ,EsUsername(..)
+ ,EsPassword(..))
+where
+
+import Database.V1.Bloodhound hiding (Status)
+import Prelude
+import qualified Data.Text as T
+
+-- | Configuration for the Elasticsearch 'Logger'. See
+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.ht…>
+-- for the explanation of terms.
+data ElasticSearchConfig = ElasticSearchConfig {
+ esServer :: !T.Text -- ^ Elasticsearch server address.
+ , esIndex :: !T.Text -- ^ Elasticsearch index name.
+ , esMapping :: !T.Text -- ^ Elasticsearch mapping name.
+ , esLogin :: Maybe (EsUsername, EsPassword) -- ^ Elasticsearch basic authentication username and password.
+ , esLoginInsecure :: !Bool -- ^ Allow basic authentication over non-TLS connections.
+ } deriving (Eq, Show)
+
+-- | Sensible defaults for 'ElasticSearchConfig'.
+defaultElasticSearchConfig :: ElasticSearchConfig
+defaultElasticSearchConfig = ElasticSearchConfig {
+ esServer = "http://localhost:9200",
+ esIndex = "logs",
+ esMapping = "log",
+ esLogin = Nothing,
+ esLoginInsecure = False
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1/Lens.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Lens.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Lens.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,40 @@
+{-# LANGUAGE RankNTypes #-}
+-- | Lensified version of "Log.Backend.ElasticSearch".
+module Log.Backend.ElasticSearch.V1.Lens (
+ I.ElasticSearchConfig
+ , esServer
+ , esIndex
+ , esMapping
+ , esLogin
+ , esLoginInsecure
+ , I.defaultElasticSearchConfig
+ , I.withElasticSearchLogger
+ ) where
+
+import Database.V1.Bloodhound hiding (Status)
+import Prelude
+import qualified Data.Text as T
+import qualified Log.Backend.ElasticSearch.V1 as I
+import qualified Log.Backend.ElasticSearch.V1.Internal ()
+
+type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
+
+-- | Elasticsearch server address.
+esServer :: Lens' I.ElasticSearchConfig T.Text
+esServer f esc = fmap (\x -> esc { I.esServer = x }) $ f (I.esServer esc)
+
+-- | Elasticsearch index name.
+esIndex :: Lens' I.ElasticSearchConfig T.Text
+esIndex f esc = fmap (\x -> esc { I.esIndex = x }) $ f (I.esIndex esc)
+
+-- | Elasticsearch mapping name.
+esMapping :: Lens' I.ElasticSearchConfig T.Text
+esMapping f esc = fmap (\x -> esc { I.esMapping = x }) $ f (I.esMapping esc)
+
+-- | Elasticsearch basic authentication username and password.
+esLogin :: Lens' I.ElasticSearchConfig (Maybe (EsUsername, EsPassword))
+esLogin f esc = fmap (\x -> esc { I.esLogin = x }) $ f (I.esLogin esc)
+
+-- | Allow basic authentication over non-TLS connections.
+esLoginInsecure :: Lens' I.ElasticSearchConfig Bool
+esLoginInsecure f esc = fmap (\x -> esc { I.esLoginInsecure = x }) $ f (I.esLoginInsecure esc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V1.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V1.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,254 @@
+-- | Elasticsearch logging back-end.
+module Log.Backend.ElasticSearch.V1 (
+ ElasticSearchConfig
+ , esServer
+ , esIndex
+ , esMapping
+ , esLogin
+ , esLoginInsecure
+ , defaultElasticSearchConfig
+ , withElasticSearchLogger
+ , elasticSearchLogger
+ ) where
+
+import Control.Applicative
+import Control.Arrow (second)
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import Control.Monad.IO.Class
+import Data.Aeson
+import Data.Aeson.Encode.Pretty
+import Data.Bits
+import Data.IORef
+import Data.Maybe (isJust)
+import Data.Semigroup
+import Data.Time
+import Data.Time.Clock.POSIX
+import Data.Word
+import Database.V1.Bloodhound hiding (Status)
+import Log
+import Log.Internal.Logger
+import Network.HTTP.Client
+import Network.HTTP.Client.TLS (tlsManagerSettings)
+import Prelude
+import System.IO
+import TextShow
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Base64 as B64
+import qualified Data.ByteString.Lazy.Char8 as BSL
+import qualified Data.HashMap.Strict as H
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Traversable as F
+import qualified Data.Vector as V
+
+import Log.Backend.ElasticSearch.V1.Internal
+
+----------------------------------------
+-- | Create an 'elasticSearchLogger' for the duration of the given
+-- action, and shut it down afterwards, making sure that all buffered
+-- messages are actually written to the Elasticsearch store.
+withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r)
+ -> IO r
+withElasticSearchLogger conf randGen act = do
+ logger <- elasticSearchLogger conf randGen
+ withLogger logger act
+
+{-# DEPRECATED elasticSearchLogger "Use 'withElasticSearchLogger' instead!" #-}
+
+-- | Start an asynchronous logger thread that stores messages using
+-- Elasticsearch.
+--
+-- Please use 'withElasticSearchLogger' instead, which is more
+-- exception-safe (see the note attached to 'mkBulkLogger').
+elasticSearchLogger ::
+ ElasticSearchConfig -- ^ Configuration.
+ -> IO Word32 -- ^ Generate a random 32-bit word for use in
+ -- document IDs.
+ -> IO Logger
+elasticSearchLogger ElasticSearchConfig{..} genRandomWord = do
+ checkElasticSearchLogin
+ checkElasticSearchConnection
+ indexRef <- newIORef $ IndexName T.empty
+ mkBulkLogger "ElasticSearch" (\msgs -> do
+ now <- getCurrentTime
+ oldIndex <- readIORef indexRef
+ -- Bloodhound doesn't support letting ES autogenerate IDs, so let's generate
+ -- them ourselves. An ID of a log message is 12 bytes (4 bytes: random, 4
+ -- bytes: current time as epoch, 4 bytes: insertion order) encoded as
+ -- Base64. This makes eventual collisions practically impossible.
+ baseID <- (<>)
+ <$> (littleEndianRep <$> liftIO genRandomWord)
+ <*> pure (littleEndianRep . floor $ timeToDouble now)
+ retryOnException . runBH_ $ do
+ -- Elasticsearch index names are additionally indexed by date so that each
+ -- day is logged to a separate index to make log management easier.
+ let index = IndexName $ T.concat [
+ esIndex
+ , "-"
+ , T.pack $ formatTime defaultTimeLocale "%F" now
+ ]
+ when (oldIndex /= index) $ do
+ -- There is an obvious race condition in the presence of more than one
+ -- logger instance running, but it's irrelevant as attempting to create
+ -- index that already exists is harmless.
+ indexExists' <- indexExists index
+ unless indexExists' $ do
+ -- Bloodhound is weird and won't let us create index using default
+ -- settings, so pass these as the default ones.
+ let indexSettings = IndexSettings {
+ indexShards = ShardCount 4
+ , indexReplicas = ReplicaCount 1
+ }
+ void $ createIndex indexSettings index
+ reply <- putMapping index mapping LogsMapping
+ when (not $ isSuccess reply) $ do
+ error $ "ElasticSearch: error while creating mapping: "
+ <> T.unpack (T.decodeUtf8 . BSL.toStrict . jsonToBSL
+ $ decodeReply reply)
+ liftIO $ writeIORef indexRef index
+ let jsonMsgs = V.fromList $ map (toJsonMsg now) $ zip [1..] msgs
+ reply <- bulk $ V.map (toBulk index baseID) jsonMsgs
+ -- Try to parse parts of reply to get information about log messages that
+ -- failed to be inserted for some reason.
+ let replyBody = decodeReply reply
+ result = do
+ Object response <- return replyBody
+ Bool hasErrors <- "errors" `H.lookup` response
+ Array jsonItems <- "items" `H.lookup` response
+ items <- F.forM jsonItems $ \v -> do
+ Object item <- return v
+ Object index_ <- "index" `H.lookup` item
+ return index_
+ guard $ V.length items == V.length jsonMsgs
+ return (hasErrors, items)
+ case result of
+ Nothing -> liftIO . BSL.putStrLn
+ $ "ElasticSearch: unexpected response: " <> jsonToBSL replyBody
+ Just (hasErrors, items) -> when hasErrors $ do
+ -- If any message failed to be inserted because of type mismatch, go
+ -- back to them, replace their data with elastic search error and put
+ -- old data into its own namespace to work around insertion errors.
+ let failed = V.findIndices (H.member "error") items
+ dummyMsgs <- V.forM failed $ \n -> do
+ dataNamespace <- liftIO genRandomWord
+ let modifyData oldData = object [
+ "__es_error" .= H.lookup "error" (items V.! n)
+ , "__es_modified" .= True
+ , ("__data_" <> showt dataNamespace) .= oldData
+ ]
+ return . second (H.adjust modifyData "data") $ jsonMsgs V.! n
+ -- Attempt to put modified messages and ignore any further errors.
+ void $ bulk (V.map (toBulk index baseID) dummyMsgs))
+ (elasticSearchSync indexRef)
+ where
+ server = Server esServer
+ mapping = MappingName esMapping
+
+ elasticSearchSync :: IORef IndexName -> IO ()
+ elasticSearchSync indexRef = do
+ indexName <- readIORef indexRef
+ void . runBH_ $ refreshIndex indexName
+
+ checkElasticSearchLogin :: IO ()
+ checkElasticSearchLogin =
+ when (isJust esLogin
+ && not esLoginInsecure
+ && not ("https:" `T.isPrefixOf` esServer)) $
+ error $ "ElasticSearch: insecure login: "
+ <> "Attempting to send login credentials over an insecure connection. "
+ <> "Set esLoginInsecure = True to disable this check."
+
+ checkElasticSearchConnection :: IO ()
+ checkElasticSearchConnection = try (void $ runBH_ listIndices) >>= \case
+ Left (ex::HttpException) ->
+ hPutStrLn stderr $ "ElasticSearch: unexpected error: " <> show ex
+ <> " (is ElasticSearch server running?)"
+ Right () -> return ()
+
+ retryOnException :: forall r. IO r -> IO r
+ retryOnException m = try m >>= \case
+ Left (ex::SomeException) -> do
+ putStrLn $ "ElasticSearch: unexpected error: "
+ <> show ex <> ", retrying in 10 seconds"
+ threadDelay $ 10 * 1000000
+ retryOnException m
+ Right result -> return result
+
+ timeToDouble :: UTCTime -> Double
+ timeToDouble = realToFrac . utcTimeToPOSIXSeconds
+
+ runBH_ :: forall r. BH IO r -> IO r
+ runBH_ f = do
+ mgr <- newManager tlsManagerSettings
+ let hook = maybe return (uncurry basicAuthHook) esLogin
+ let env = (mkBHEnv server mgr) { bhRequestHook = hook }
+ runBH env f
+
+
+ jsonToBSL :: Value -> BSL.ByteString
+ jsonToBSL = encodePretty' defConfig { confIndent = Spaces 2 }
+
+ toJsonMsg :: UTCTime -> (Word32, LogMessage)
+ -> (Word32, H.HashMap T.Text Value)
+ toJsonMsg now (n, msg) = (n, H.union jMsg $ H.fromList [
+ ("insertion_order", toJSON n)
+ , ("insertion_time", toJSON now)
+ ])
+ where
+ Object jMsg = toJSON msg
+
+ mkDocId :: BS.ByteString -> Word32 -> DocId
+ mkDocId baseID insertionOrder = DocId . T.decodeUtf8
+ . B64.encode $ BS.concat [
+ baseID
+ , littleEndianRep insertionOrder
+ ]
+
+ toBulk :: IndexName -> BS.ByteString -> (Word32, H.HashMap T.Text Value)
+ -> BulkOperation
+ toBulk index baseID (n, obj) =
+ BulkIndex index mapping (mkDocId baseID n) $ Object obj
+
+data LogsMapping = LogsMapping
+instance ToJSON LogsMapping where
+ toJSON LogsMapping = object [
+ "properties" .= object [
+ "insertion_order" .= object [
+ "type" .= ("integer"::T.Text)
+ ]
+ , "insertion_time" .= object [
+ "type" .= ("date"::T.Text)
+ , "format" .= ("date_time"::T.Text)
+ ]
+ , "time" .= object [
+ "type" .= ("date"::T.Text)
+ , "format" .= ("date_time"::T.Text)
+ ]
+ , "domain" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "level" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "component" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "message" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ ]
+ ]
+
+----------------------------------------
+
+littleEndianRep :: Word32 -> BS.ByteString
+littleEndianRep = fst . BS.unfoldrN 4 step
+ where
+ step n = Just (fromIntegral $ n .&. 0xff, n `shiftR` 8)
+
+decodeReply :: Reply -> Value
+decodeReply reply = case eitherDecode' $ responseBody reply of
+ Right body -> body
+ Left err -> object ["decoding_error" .= err]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5/Internal.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Internal.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Internal.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,31 @@
+module Log.Backend.ElasticSearch.V5.Internal
+ (ElasticSearchConfig(..)
+ ,defaultElasticSearchConfig
+ ,EsUsername(..)
+ ,EsPassword(..))
+where
+
+import Database.V5.Bloodhound hiding (Status)
+import Prelude
+import qualified Data.Text as T
+
+-- | Configuration for the Elasticsearch 'Logger'. See
+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.ht…>
+-- for the explanation of terms.
+data ElasticSearchConfig = ElasticSearchConfig {
+ esServer :: !T.Text -- ^ Elasticsearch server address.
+ , esIndex :: !T.Text -- ^ Elasticsearch index name.
+ , esMapping :: !T.Text -- ^ Elasticsearch mapping name.
+ , esLogin :: Maybe (EsUsername, EsPassword) -- ^ Elasticsearch basic authentication username and password.
+ , esLoginInsecure :: !Bool -- ^ Allow basic authentication over non-TLS connections.
+ } deriving (Eq, Show)
+
+-- | Sensible defaults for 'ElasticSearchConfig'.
+defaultElasticSearchConfig :: ElasticSearchConfig
+defaultElasticSearchConfig = ElasticSearchConfig {
+ esServer = "http://localhost:9200",
+ esIndex = "logs",
+ esMapping = "log",
+ esLogin = Nothing,
+ esLoginInsecure = False
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5/Lens.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Lens.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Lens.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,40 @@
+{-# LANGUAGE RankNTypes #-}
+-- | Lensified version of "Log.Backend.ElasticSearch".
+module Log.Backend.ElasticSearch.V5.Lens (
+ I.ElasticSearchConfig
+ , esServer
+ , esIndex
+ , esMapping
+ , esLogin
+ , esLoginInsecure
+ , I.defaultElasticSearchConfig
+ , I.withElasticSearchLogger
+ ) where
+
+import Database.V5.Bloodhound hiding (Status)
+import Prelude
+import qualified Data.Text as T
+import qualified Log.Backend.ElasticSearch.V5 as I
+import qualified Log.Backend.ElasticSearch.V5.Internal ()
+
+type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
+
+-- | Elasticsearch server address.
+esServer :: Lens' I.ElasticSearchConfig T.Text
+esServer f esc = fmap (\x -> esc { I.esServer = x }) $ f (I.esServer esc)
+
+-- | Elasticsearch index name.
+esIndex :: Lens' I.ElasticSearchConfig T.Text
+esIndex f esc = fmap (\x -> esc { I.esIndex = x }) $ f (I.esIndex esc)
+
+-- | Elasticsearch mapping name.
+esMapping :: Lens' I.ElasticSearchConfig T.Text
+esMapping f esc = fmap (\x -> esc { I.esMapping = x }) $ f (I.esMapping esc)
+
+-- | Elasticsearch basic authentication username and password.
+esLogin :: Lens' I.ElasticSearchConfig (Maybe (EsUsername, EsPassword))
+esLogin f esc = fmap (\x -> esc { I.esLogin = x }) $ f (I.esLogin esc)
+
+-- | Allow basic authentication over non-TLS connections.
+esLoginInsecure :: Lens' I.ElasticSearchConfig Bool
+esLoginInsecure f esc = fmap (\x -> esc { I.esLoginInsecure = x }) $ f (I.esLoginInsecure esc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch/V5.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch/V5.hs 2017-06-20 18:17:46.000000000 +0200
@@ -0,0 +1,254 @@
+-- | Elasticsearch logging back-end.
+module Log.Backend.ElasticSearch.V5 (
+ ElasticSearchConfig
+ , esServer
+ , esIndex
+ , esMapping
+ , esLogin
+ , esLoginInsecure
+ , defaultElasticSearchConfig
+ , withElasticSearchLogger
+ , elasticSearchLogger
+ ) where
+
+import Control.Applicative
+import Control.Arrow (second)
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import Control.Monad.IO.Class
+import Data.Aeson
+import Data.Aeson.Encode.Pretty
+import Data.Bits
+import Data.IORef
+import Data.Maybe (isJust)
+import Data.Semigroup
+import Data.Time
+import Data.Time.Clock.POSIX
+import Data.Word
+import Database.V5.Bloodhound hiding (Status)
+import Log
+import Log.Internal.Logger
+import Network.HTTP.Client
+import Network.HTTP.Client.TLS (tlsManagerSettings)
+import Prelude
+import System.IO
+import TextShow
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Base64 as B64
+import qualified Data.ByteString.Lazy.Char8 as BSL
+import qualified Data.HashMap.Strict as H
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Traversable as F
+import qualified Data.Vector as V
+
+import Log.Backend.ElasticSearch.V5.Internal
+
+----------------------------------------
+-- | Create an 'elasticSearchLogger' for the duration of the given
+-- action, and shut it down afterwards, making sure that all buffered
+-- messages are actually written to the Elasticsearch store.
+withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r)
+ -> IO r
+withElasticSearchLogger conf randGen act = do
+ logger <- elasticSearchLogger conf randGen
+ withLogger logger act
+
+{-# DEPRECATED elasticSearchLogger "Use 'withElasticSearchLogger' instead!" #-}
+
+-- | Start an asynchronous logger thread that stores messages using
+-- Elasticsearch.
+--
+-- Please use 'withElasticSearchLogger' instead, which is more
+-- exception-safe (see the note attached to 'mkBulkLogger').
+elasticSearchLogger ::
+ ElasticSearchConfig -- ^ Configuration.
+ -> IO Word32 -- ^ Generate a random 32-bit word for use in
+ -- document IDs.
+ -> IO Logger
+elasticSearchLogger ElasticSearchConfig{..} genRandomWord = do
+ checkElasticSearchLogin
+ checkElasticSearchConnection
+ indexRef <- newIORef $ IndexName T.empty
+ mkBulkLogger "ElasticSearch" (\msgs -> do
+ now <- getCurrentTime
+ oldIndex <- readIORef indexRef
+ -- Bloodhound doesn't support letting ES autogenerate IDs, so let's generate
+ -- them ourselves. An ID of a log message is 12 bytes (4 bytes: random, 4
+ -- bytes: current time as epoch, 4 bytes: insertion order) encoded as
+ -- Base64. This makes eventual collisions practically impossible.
+ baseID <- (<>)
+ <$> (littleEndianRep <$> liftIO genRandomWord)
+ <*> pure (littleEndianRep . floor $ timeToDouble now)
+ retryOnException . runBH_ $ do
+ -- Elasticsearch index names are additionally indexed by date so that each
+ -- day is logged to a separate index to make log management easier.
+ let index = IndexName $ T.concat [
+ esIndex
+ , "-"
+ , T.pack $ formatTime defaultTimeLocale "%F" now
+ ]
+ when (oldIndex /= index) $ do
+ -- There is an obvious race condition in the presence of more than one
+ -- logger instance running, but it's irrelevant as attempting to create
+ -- index that already exists is harmless.
+ indexExists' <- indexExists index
+ unless indexExists' $ do
+ -- Bloodhound is weird and won't let us create index using default
+ -- settings, so pass these as the default ones.
+ let indexSettings = IndexSettings {
+ indexShards = ShardCount 4
+ , indexReplicas = ReplicaCount 1
+ }
+ void $ createIndex indexSettings index
+ reply <- putMapping index mapping LogsMapping
+ when (not $ isSuccess reply) $ do
+ error $ "ElasticSearch: error while creating mapping: "
+ <> T.unpack (T.decodeUtf8 . BSL.toStrict . jsonToBSL
+ $ decodeReply reply)
+ liftIO $ writeIORef indexRef index
+ let jsonMsgs = V.fromList $ map (toJsonMsg now) $ zip [1..] msgs
+ reply <- bulk $ V.map (toBulk index baseID) jsonMsgs
+ -- Try to parse parts of reply to get information about log messages that
+ -- failed to be inserted for some reason.
+ let replyBody = decodeReply reply
+ result = do
+ Object response <- return replyBody
+ Bool hasErrors <- "errors" `H.lookup` response
+ Array jsonItems <- "items" `H.lookup` response
+ items <- F.forM jsonItems $ \v -> do
+ Object item <- return v
+ Object index_ <- "index" `H.lookup` item
+ return index_
+ guard $ V.length items == V.length jsonMsgs
+ return (hasErrors, items)
+ case result of
+ Nothing -> liftIO . BSL.putStrLn
+ $ "ElasticSearch: unexpected response: " <> jsonToBSL replyBody
+ Just (hasErrors, items) -> when hasErrors $ do
+ -- If any message failed to be inserted because of type mismatch, go
+ -- back to them, replace their data with elastic search error and put
+ -- old data into its own namespace to work around insertion errors.
+ let failed = V.findIndices (H.member "error") items
+ dummyMsgs <- V.forM failed $ \n -> do
+ dataNamespace <- liftIO genRandomWord
+ let modifyData oldData = object [
+ "__es_error" .= H.lookup "error" (items V.! n)
+ , "__es_modified" .= True
+ , ("__data_" <> showt dataNamespace) .= oldData
+ ]
+ return . second (H.adjust modifyData "data") $ jsonMsgs V.! n
+ -- Attempt to put modified messages and ignore any further errors.
+ void $ bulk (V.map (toBulk index baseID) dummyMsgs))
+ (elasticSearchSync indexRef)
+ where
+ server = Server esServer
+ mapping = MappingName esMapping
+
+ elasticSearchSync :: IORef IndexName -> IO ()
+ elasticSearchSync indexRef = do
+ indexName <- readIORef indexRef
+ void . runBH_ $ refreshIndex indexName
+
+ checkElasticSearchLogin :: IO ()
+ checkElasticSearchLogin =
+ when (isJust esLogin
+ && not esLoginInsecure
+ && not ("https:" `T.isPrefixOf` esServer)) $
+ error $ "ElasticSearch: insecure login: "
+ <> "Attempting to send login credentials over an insecure connection. "
+ <> "Set esLoginInsecure = True to disable this check."
+
+ checkElasticSearchConnection :: IO ()
+ checkElasticSearchConnection = try (void $ runBH_ listIndices) >>= \case
+ Left (ex::HttpException) ->
+ hPutStrLn stderr $ "ElasticSearch: unexpected error: " <> show ex
+ <> " (is ElasticSearch server running?)"
+ Right () -> return ()
+
+ retryOnException :: forall r. IO r -> IO r
+ retryOnException m = try m >>= \case
+ Left (ex::SomeException) -> do
+ putStrLn $ "ElasticSearch: unexpected error: "
+ <> show ex <> ", retrying in 10 seconds"
+ threadDelay $ 10 * 1000000
+ retryOnException m
+ Right result -> return result
+
+ timeToDouble :: UTCTime -> Double
+ timeToDouble = realToFrac . utcTimeToPOSIXSeconds
+
+ runBH_ :: forall r. BH IO r -> IO r
+ runBH_ f = do
+ mgr <- newManager tlsManagerSettings
+ let hook = maybe return (uncurry basicAuthHook) esLogin
+ let env = (mkBHEnv server mgr) { bhRequestHook = hook }
+ runBH env f
+
+
+ jsonToBSL :: Value -> BSL.ByteString
+ jsonToBSL = encodePretty' defConfig { confIndent = Spaces 2 }
+
+ toJsonMsg :: UTCTime -> (Word32, LogMessage)
+ -> (Word32, H.HashMap T.Text Value)
+ toJsonMsg now (n, msg) = (n, H.union jMsg $ H.fromList [
+ ("insertion_order", toJSON n)
+ , ("insertion_time", toJSON now)
+ ])
+ where
+ Object jMsg = toJSON msg
+
+ mkDocId :: BS.ByteString -> Word32 -> DocId
+ mkDocId baseID insertionOrder = DocId . T.decodeUtf8
+ . B64.encode $ BS.concat [
+ baseID
+ , littleEndianRep insertionOrder
+ ]
+
+ toBulk :: IndexName -> BS.ByteString -> (Word32, H.HashMap T.Text Value)
+ -> BulkOperation
+ toBulk index baseID (n, obj) =
+ BulkIndex index mapping (mkDocId baseID n) $ Object obj
+
+data LogsMapping = LogsMapping
+instance ToJSON LogsMapping where
+ toJSON LogsMapping = object [
+ "properties" .= object [
+ "insertion_order" .= object [
+ "type" .= ("integer"::T.Text)
+ ]
+ , "insertion_time" .= object [
+ "type" .= ("date"::T.Text)
+ , "format" .= ("date_time"::T.Text)
+ ]
+ , "time" .= object [
+ "type" .= ("date"::T.Text)
+ , "format" .= ("date_time"::T.Text)
+ ]
+ , "domain" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "level" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "component" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ , "message" .= object [
+ "type" .= ("string"::T.Text)
+ ]
+ ]
+ ]
+
+----------------------------------------
+
+littleEndianRep :: Word32 -> BS.ByteString
+littleEndianRep = fst . BS.unfoldrN 4 step
+ where
+ step n = Just (fromIntegral $ n .&. 0xff, n `shiftR` 8)
+
+decodeReply :: Reply -> Value
+decodeReply reply = case eitherDecode' $ responseBody reply of
+ Right body -> body
+ Left err -> object ["decoding_error" .= err]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch.hs new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch.hs
--- old/log-elasticsearch-0.7/src/Log/Backend/ElasticSearch.hs 2016-11-25 10:08:48.000000000 +0100
+++ new/log-elasticsearch-0.9.0.1/src/Log/Backend/ElasticSearch.hs 2017-06-20 18:17:46.000000000 +0200
@@ -1,248 +1,5 @@
--- | Elasticsearch logging back-end.
-module Log.Backend.ElasticSearch (
- ElasticSearchConfig(..)
- , defaultElasticSearchConfig
- , withElasticSearchLogger
- , elasticSearchLogger
+module Log.Backend.ElasticSearch
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1 ) where
- ) where
-
-import Control.Applicative
-import Control.Arrow (second)
-import Control.Concurrent
-import Control.Exception
-import Control.Monad
-import Control.Monad.IO.Class
-import Data.Aeson
-import Data.Aeson.Encode.Pretty
-import Data.Bits
-import Data.IORef
-import Data.Semigroup
-import Data.Time
-import Data.Time.Clock.POSIX
-import Data.Word
-import Database.Bloodhound hiding (Status)
-import Log
-import Log.Internal.Logger
-import Network.HTTP.Client
-import Prelude
-import TextShow
-import qualified Data.ByteString as BS
-import qualified Data.ByteString.Base64 as B64
-import qualified Data.ByteString.Lazy.Char8 as BSL
-import qualified Data.HashMap.Strict as H
-import qualified Data.Text as T
-import qualified Data.Text.Encoding as T
-import qualified Data.Traversable as F
-import qualified Data.Vector as V
-
--- | Configuration for the Elasticsearch 'Logger'. See
--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.ht…>
--- for the explanation of terms.
-data ElasticSearchConfig = ElasticSearchConfig {
- esServer :: !T.Text -- ^ Elasticsearch server address.
- , esIndex :: !T.Text -- ^ Elasticsearch index name.
- , esMapping :: !T.Text -- ^ Elasticsearch mapping name.
- } deriving (Eq, Show)
-
--- | Sensible defaults for 'ElasticSearchConfig'.
-defaultElasticSearchConfig :: ElasticSearchConfig
-defaultElasticSearchConfig = ElasticSearchConfig {
- esServer = "http://localhost:9200",
- esIndex = "logs",
- esMapping = "log"
- }
-
-
-----------------------------------------
--- | Create an 'elasticSearchLogger' for the duration of the given
--- action, and shut it down afterwards, making sure that all buffered
--- messages are actually written to the Elasticsearch store.
-withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r)
- -> IO r
-withElasticSearchLogger conf randGen act = do
- logger <- elasticSearchLogger conf randGen
- withLogger logger act
-
-{-# DEPRECATED elasticSearchLogger "Use 'withElasticSearchLogger' instead!" #-}
-
--- | Start an asynchronous logger thread that stores messages using
--- Elasticsearch.
---
--- Please use 'withElasticSearchLogger' instead, which is more
--- exception-safe (see the note attached to 'mkBulkLogger').
-elasticSearchLogger ::
- ElasticSearchConfig -- ^ Configuration.
- -> IO Word32 -- ^ Generate a random 32-bit word for use in
- -- document IDs.
- -> IO Logger
-elasticSearchLogger ElasticSearchConfig{..} genRandomWord = do
- checkElasticSearchConnection
- indexRef <- newIORef $ IndexName T.empty
- mkBulkLogger "ElasticSearch" (\msgs -> do
- now <- getCurrentTime
- oldIndex <- readIORef indexRef
- -- Bloodhound doesn't support letting ES autogenerate IDs, so let's generate
- -- them ourselves. An ID of a log message is 12 bytes (4 bytes: random, 4
- -- bytes: current time as epoch, 4 bytes: insertion order) encoded as
- -- Base64. This makes eventual collisions practically impossible.
- baseID <- (<>)
- <$> (littleEndianRep <$> liftIO genRandomWord)
- <*> pure (littleEndianRep . floor $ timeToDouble now)
- retryOnException . runBH_ $ do
- -- Elasticsearch index names are additionally indexed by date so that each
- -- day is logged to a separate index to make log management easier.
- let index = IndexName $ T.concat [
- esIndex
- , "-"
- , T.pack $ formatTime defaultTimeLocale "%F" now
- ]
- when (oldIndex /= index) $ do
- -- There is an obvious race condition in the presence of more than one
- -- logger instance running, but it's irrelevant as attempting to create
- -- index that already exists is harmless.
- indexExists' <- indexExists index
- unless indexExists' $ do
- -- Bloodhound is weird and won't let us create index using default
- -- settings, so pass these as the default ones.
- let indexSettings = IndexSettings {
- indexShards = ShardCount 4
- , indexReplicas = ReplicaCount 1
- }
- void $ createIndex indexSettings index
- reply <- putMapping index mapping LogsMapping
- when (not $ isSuccess reply) $ do
- error $ "ElasticSearch: error while creating mapping: "
- <> T.unpack (T.decodeUtf8 . BSL.toStrict . jsonToBSL
- $ decodeReply reply)
- liftIO $ writeIORef indexRef index
- let jsonMsgs = V.fromList $ map (toJsonMsg now) $ zip [1..] msgs
- reply <- bulk $ V.map (toBulk index baseID) jsonMsgs
- -- Try to parse parts of reply to get information about log messages that
- -- failed to be inserted for some reason.
- let replyBody = decodeReply reply
- result = do
- Object response <- return replyBody
- Bool hasErrors <- "errors" `H.lookup` response
- Array jsonItems <- "items" `H.lookup` response
- items <- F.forM jsonItems $ \v -> do
- Object item <- return v
- Object index_ <- "index" `H.lookup` item
- return index_
- guard $ V.length items == V.length jsonMsgs
- return (hasErrors, items)
- case result of
- Nothing -> liftIO . BSL.putStrLn
- $ "ElasticSearch: unexpected response: " <> jsonToBSL replyBody
- Just (hasErrors, items) -> when hasErrors $ do
- -- If any message failed to be inserted because of type mismatch, go
- -- back to them, replace their data with elastic search error and put
- -- old data into its own namespace to work around insertion errors.
- let failed = V.findIndices (H.member "error") items
- dummyMsgs <- V.forM failed $ \n -> do
- dataNamespace <- liftIO genRandomWord
- let modifyData oldData = object [
- "__es_error" .= H.lookup "error" (items V.! n)
- , "__es_modified" .= True
- , ("__data_" <> showt dataNamespace) .= oldData
- ]
- return . second (H.adjust modifyData "data") $ jsonMsgs V.! n
- -- Attempt to put modified messages and ignore any further errors.
- void $ bulk (V.map (toBulk index baseID) dummyMsgs))
- (elasticSearchSync indexRef)
- where
- server = Server esServer
- mapping = MappingName esMapping
-
- elasticSearchSync :: IORef IndexName -> IO ()
- elasticSearchSync indexRef = do
- indexName <- readIORef indexRef
- void . runBH_ $ refreshIndex indexName
-
- checkElasticSearchConnection :: IO ()
- checkElasticSearchConnection = try (void $ runBH_ listIndices) >>= \case
- Left (ex::HttpException) -> error $ "ElasticSearch: unexpected error: "
- <> show ex
- <> " (is ElasticSearch server running?)"
- Right () -> return ()
-
- retryOnException :: forall r. IO r -> IO r
- retryOnException m = try m >>= \case
- Left (ex::SomeException) -> do
- putStrLn $ "ElasticSearch: unexpected error: "
- <> show ex <> ", retrying in 10 seconds"
- threadDelay $ 10 * 1000000
- retryOnException m
- Right result -> return result
-
- timeToDouble :: UTCTime -> Double
- timeToDouble = realToFrac . utcTimeToPOSIXSeconds
-
- runBH_ :: forall r. BH IO r -> IO r
- runBH_ = withBH defaultManagerSettings server
-
- jsonToBSL :: Value -> BSL.ByteString
- jsonToBSL = encodePretty' defConfig { confIndent = Spaces 2 }
-
- toJsonMsg :: UTCTime -> (Word32, LogMessage)
- -> (Word32, H.HashMap T.Text Value)
- toJsonMsg now (n, msg) = (n, H.union jMsg $ H.fromList [
- ("insertion_order", toJSON n)
- , ("insertion_time", toJSON now)
- ])
- where
- Object jMsg = toJSON msg
-
- mkDocId :: BS.ByteString -> Word32 -> DocId
- mkDocId baseID insertionOrder = DocId . T.decodeUtf8
- . B64.encode $ BS.concat [
- baseID
- , littleEndianRep insertionOrder
- ]
-
- toBulk :: IndexName -> BS.ByteString -> (Word32, H.HashMap T.Text Value)
- -> BulkOperation
- toBulk index baseID (n, obj) =
- BulkIndex index mapping (mkDocId baseID n) $ Object obj
-
-data LogsMapping = LogsMapping
-instance ToJSON LogsMapping where
- toJSON LogsMapping = object [
- "properties" .= object [
- "insertion_order" .= object [
- "type" .= ("integer"::T.Text)
- ]
- , "insertion_time" .= object [
- "type" .= ("date"::T.Text)
- , "format" .= ("date_time"::T.Text)
- ]
- , "time" .= object [
- "type" .= ("date"::T.Text)
- , "format" .= ("date_time"::T.Text)
- ]
- , "domain" .= object [
- "type" .= ("string"::T.Text)
- ]
- , "level" .= object [
- "type" .= ("string"::T.Text)
- ]
- , "component" .= object [
- "type" .= ("string"::T.Text)
- ]
- , "message" .= object [
- "type" .= ("string"::T.Text)
- ]
- ]
- ]
-
-----------------------------------------
-
-littleEndianRep :: Word32 -> BS.ByteString
-littleEndianRep = fst . BS.unfoldrN 4 step
- where
- step n = Just (fromIntegral $ n .&. 0xff, n `shiftR` 8)
-
-decodeReply :: Reply -> Value
-decodeReply reply = case eitherDecode' $ responseBody reply of
- Right body -> body
- Left err -> object ["decoding_error" .= err]
+import Log.Backend.ElasticSearch.V1
1
0
Hello community,
here is the log from the commit of package ghc-log for openSUSE:Factory checked in at 2017-08-31 20:48:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-log (Old)
and /work/SRC/openSUSE:Factory/.ghc-log.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-log"
Thu Aug 31 20:48:15 2017 rev:3 rq:513423 version:0.9.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-log/ghc-log.changes 2017-05-18 20:50:53.489487369 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-log.new/ghc-log.changes 2017-08-31 20:48:15.852504030 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:02 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.9.0.1.
+
+-------------------------------------------------------------------
Old:
----
log-0.7.tar.gz
log.cabal
New:
----
log-0.9.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-log.spec ++++++
--- /var/tmp/diff_new_pack.mCGgeq/_old 2017-08-31 20:48:16.728381086 +0200
+++ /var/tmp/diff_new_pack.mCGgeq/_new 2017-08-31 20:48:16.732380524 +0200
@@ -19,14 +19,13 @@
%global pkg_name log
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.7
+Version: 0.9.0.1
Release: 0
Summary: Structured logging solution with multiple backends
License: BSD-3-Clause
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-log-base-devel
BuildRequires: ghc-log-elasticsearch-devel
@@ -74,7 +73,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -97,5 +95,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc CHANGELOG.md README.md
%changelog
++++++ log-0.7.tar.gz -> log-0.9.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/CHANGELOG.md new/log-0.9.0.1/CHANGELOG.md
--- old/log-0.7/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/CHANGELOG.md 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,40 @@
+# log-0.9.0.0 (2017-05-04)
+* Updated the Elasticsearch back-end to work with bloodhound-0.14.0.0 (#30).
+* The following modules are now deprecated: Log.Backend.ElasticSearch,
+ Log.Backend.ElasticSearch.Internal,
+ Log.Backend.ElasticSearch.Lens. Use V1/V5 variants directly (#30).
+
+# log-0.8 (2017-03-16)
+* Added a few MTL class instances (#28).
+* Made ElasticSearchConfig an abstract type (#27).
+* Added support for HTTPS and basic auth to log-elasticsearch (#26).
+
+# log-0.7 (2016-11-25)
+* Split into four libraries (log, log-base, log-postgres,
+ log-elasticsearch).
+* Improved documentation (#22).
+* Implement 'toEncoding' directly in 'ToJSON' instances (#21).
+
+# log-0.6 (2016-11-22)
+* Moved 'withLogger' to 'Log.Internal.Logger'.
+
+# log-0.5.7 (2016-11-22)
+* Remove the dependency on 'cond'.
+* Fix formatting in 'mkBulkLogger' haddocks (#16).
+* Generalise the types of 'logAttention', 'logInfo' and 'logTrace'
+ (#17).
+
+# log-0.5.5 (2016-11-16)
+* Add an in-memory logging backend for testing (#13).
+* Fix the deprecation message for stdout logger.
+
+# log-0.5.4 (2016-10-21)
+* New logger creation API, which is harder to misuse.
+* Remove the use of finalisers in favour of the new logger API.
+* Fix a JSON serialisation issue affecting the Elasticsearch back-end.
+* Make the Elasticsearch back-end compatible with Elasticsearch 1.x.
+* Fix a synchronisation issue affecting the Elasticsearch back-end.
+* Add a test suite and Travis-based CI.
+
+# log-0.1.0
+* Initial version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/README.md new/log-0.9.0.1/README.md
--- old/log-0.7/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/README.md 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,38 @@
+# log [![Hackage version](https://img.shields.io/hackage/v/log.svg?label=Hackage)](https://h… [![Build Status](https://secure.travis-ci.org/scrive/log.svg?branch=master)](http://…
+
+A library that provides a way to record structured log messages with
+multiple back ends.
+
+Supported back ends:
+
+* Standard output
+* Elasticsearch
+* PostgreSQL
+
+The `log` library provides Elasticsearch and PostgreSQL back ends. If
+you only need one of those, use `log-base` and `log-elasticsearch` or
+`log-postgres`.
+
+## Example
+
+```haskell
+{-# LANGUAGE OverloadedStrings #-}
+
+module Main where
+
+import Log
+import Log.Backend.ElasticSearch.V5
+
+import System.Random
+
+main :: IO ()
+main = do
+ let config = defaultElasticSearchConfig {
+ esServer = "http://localhost:9200",
+ esIndex = "logs",
+ esMapping = "log"
+ }
+ withElasticSearchLogger config randomIO $ \logger ->
+ runLogT "main" logger $ do
+ logTrace_ "foo"
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/bench/Bench.hs new/log-0.9.0.1/bench/Bench.hs
--- old/log-0.7/bench/Bench.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/bench/Bench.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,65 @@
+module Main where
+
+import Log
+import Log.Backend.ElasticSearch.V5
+import Log.Backend.PostgreSQL
+
+import Control.Concurrent
+import Control.Monad
+import Control.Monad.Base
+import Control.Monad.IO.Class
+import Database.PostgreSQL.PQTypes
+import Data.Monoid
+import System.Environment
+import System.Random
+import TextShow
+
+import qualified Data.Text as T
+import qualified System.Remote.Monitoring as EKG
+
+-- Usage:
+--
+-- 1. (Optional) Start elasticsearch/postgres
+-- 2. Run the benchmark exe with the appropriate argument ('postgres'/'elastic').
+-- 3. Open htop and/or localhost:8000 in the browser
+-- 4. Stop elasticsearch/postgres
+-- 5. Observe the memory allocation behaviour.
+
+main :: IO ()
+main = do
+ void $ EKG.forkServer "localhost" 8000
+ args <- getArgs
+ case args of
+ ["postgres"] -> benchPostgres defConnString
+ ["postgres", connString] -> benchPostgres (T.pack connString)
+ ["elastic"] -> benchElastic
+ _ -> benchElastic
+
+defConnString :: T.Text
+defConnString = "postgresql://user:password@localhost/log-postgresql-bench"
+
+benchPostgres :: T.Text -> IO ()
+benchPostgres connString = do
+ putStrLn "postgres"
+ ConnectionSource connSource <- poolSource def { csConnInfo = connString } 1 10 1
+ withPgLogger connSource $
+ \logger -> forever $ benchLogger logger
+
+benchElastic :: IO ()
+benchElastic = do
+ putStrLn "elastic"
+ let config = defaultElasticSearchConfig
+ withElasticSearchLogger config randomIO $
+ \logger -> forever $ benchLogger logger
+
+
+benchLogger :: (MonadIO m, MonadTime m, MonadBase IO m) => Logger -> m ()
+benchLogger logger= do
+ liftIO $ putStrLn "writing 100 000 log messages..."
+
+ runLogT "log-bench-elasticsearch" logger $
+ forM_ [0..10000] $ \(i :: Int) ->
+ logTrace_ ("kaboozle kaboozle kaboozle kaboozle kaboozle " <> showt i)
+
+ liftIO $ putStrLn "sleeping for 1 s..."
+ liftIO $ threadDelay 1000000 {- 1 sec -}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/log.cabal new/log-0.9.0.1/log.cabal
--- old/log-0.7/log.cabal 2016-11-25 10:09:31.000000000 +0100
+++ new/log-0.9.0.1/log.cabal 2017-06-20 18:22:15.000000000 +0200
@@ -1,5 +1,5 @@
name: log
-version: 0.7
+version: 0.9.0.1
synopsis: Structured logging solution with multiple backends
description: A library that provides a way to record structured
@@ -25,7 +25,8 @@
category: System
build-type: Simple
cabal-version: >=1.10
-tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+extra-source-files: CHANGELOG.md, README.md
+tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
Source-repository head
Type: git
@@ -34,6 +35,14 @@
library
exposed-modules: Log,
Log.Backend.ElasticSearch,
+ Log.Backend.ElasticSearch.Internal,
+ Log.Backend.ElasticSearch.Lens,
+ Log.Backend.ElasticSearch.V1,
+ Log.Backend.ElasticSearch.V1.Internal,
+ Log.Backend.ElasticSearch.V1.Lens,
+ Log.Backend.ElasticSearch.V5,
+ Log.Backend.ElasticSearch.V5.Internal,
+ Log.Backend.ElasticSearch.V5.Lens,
Log.Backend.PostgreSQL,
Log.Backend.StandardOutput,
Log.Backend.StandardOutput.Bulk,
@@ -45,9 +54,9 @@
Log.Monad
build-depends: base <5,
- log-base >= 0.7,
- log-elasticsearch >= 0.7,
- log-postgres >= 0.7
+ log-base >= 0.7.1.1 && < 0.9,
+ log-elasticsearch >= 0.9.0.1 && < 0.10,
+ log-postgres >= 0.7.0.1 && < 0.9
hs-source-dirs: src
@@ -104,3 +113,22 @@
default-extensions: BangPatterns
, OverloadedStrings
, RecordWildCards
+
+benchmark log-bench
+ type: exitcode-stdio-1.0
+ build-depends: base,
+ ekg,
+ log,
+ hpqtypes,
+ random,
+ text,
+ text-show,
+ transformers,
+ transformers-base
+ hs-source-dirs: bench
+ main-is: Bench.hs
+ ghc-options: -Wall -threaded "-with-rtsopts=-T -sstderr"
+ default-language: Haskell2010
+ default-extensions: OverloadedStrings,
+ FlexibleContexts,
+ ScopedTypeVariables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/Internal.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/Internal.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/Internal.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.Internal
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1.Internal ) where
+
+import Log.Backend.ElasticSearch.V1.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/Lens.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/Lens.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/Lens.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.Lens
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1.Lens ) where
+
+import Log.Backend.ElasticSearch.V1.Lens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V1/Internal.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Internal.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V1/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Internal.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V1.Internal (
+ module Log.Backend.ElasticSearch.V1.Internal
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V1.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V1/Lens.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Lens.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V1/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1/Lens.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V1.Lens (
+ module Log.Backend.ElasticSearch.V1.Lens
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V1.Lens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V1.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V1.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V1.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V1 (
+ module Log.Backend.ElasticSearch.V1
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V5/Internal.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Internal.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V5/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Internal.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V5.Internal (
+ module Log.Backend.ElasticSearch.V5.Internal
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V5.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V5/Lens.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Lens.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V5/Lens.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5/Lens.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V5.Lens (
+ module Log.Backend.ElasticSearch.V5.Lens
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V5.Lens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch/V5.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch/V5.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch/V5.hs 2017-06-20 18:22:15.000000000 +0200
@@ -0,0 +1,5 @@
+module Log.Backend.ElasticSearch.V5 (
+ module Log.Backend.ElasticSearch.V5
+ ) where
+
+import "log-elasticsearch" Log.Backend.ElasticSearch.V5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/src/Log/Backend/ElasticSearch.hs new/log-0.9.0.1/src/Log/Backend/ElasticSearch.hs
--- old/log-0.7/src/Log/Backend/ElasticSearch.hs 2016-11-25 10:09:31.000000000 +0100
+++ new/log-0.9.0.1/src/Log/Backend/ElasticSearch.hs 2017-06-20 18:22:15.000000000 +0200
@@ -1,5 +1,5 @@
-module Log.Backend.ElasticSearch (
- module Log.Backend.ElasticSearch
- ) where
+module Log.Backend.ElasticSearch
+ {-# DEPRECATED "Use directly Log.Backend.ElasticSearch.V1 or V5" #-}
+ ( module Log.Backend.ElasticSearch.V1 ) where
-import "log-elasticsearch" Log.Backend.ElasticSearch
+import Log.Backend.ElasticSearch.V1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/test/IntegrationTest.hs new/log-0.9.0.1/test/IntegrationTest.hs
--- old/log-0.7/test/IntegrationTest.hs 2016-11-25 10:09:31.000000000 +0100
+++ new/log-0.9.0.1/test/IntegrationTest.hs 2017-06-20 18:22:15.000000000 +0200
@@ -3,7 +3,7 @@
import Log
import Log.Backend.StandardOutput
import Log.Backend.StandardOutput.Bulk
-import Log.Backend.ElasticSearch
+import Log.Backend.ElasticSearch.V5
import Test.ElasticSearch
import Data.List
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/test/Test/ElasticSearch.hs new/log-0.9.0.1/test/Test/ElasticSearch.hs
--- old/log-0.7/test/Test/ElasticSearch.hs 2016-11-25 10:09:31.000000000 +0100
+++ new/log-0.9.0.1/test/Test/ElasticSearch.hs 2017-06-20 18:22:15.000000000 +0200
@@ -6,13 +6,13 @@
,refreshTestIndex)
where
-import Log.Backend.ElasticSearch
+import Log.Backend.ElasticSearch.V5
import Control.Monad
import Data.Aeson
import Data.Text (Text)
import Data.Time
-import Database.Bloodhound
+import Database.V5.Bloodhound
import Network.HTTP.Client
import Test.Tasty.HUnit
@@ -25,11 +25,11 @@
defaultElasticSearchTestConfig :: ElasticSearchConfig
-> IO ElasticSearchTestConfig
-defaultElasticSearchTestConfig ElasticSearchConfig{..} = do
+defaultElasticSearchTestConfig esc = do
now <- getCurrentTime
- let testServer = Server esServer
+ let testServer = Server (esServer esc)
testIndex = IndexName $ T.concat
- [ esIndex
+ [ esIndex esc
, "-"
, T.pack $ formatTime defaultTimeLocale "%F" now
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/log-0.7/test/Test.hs new/log-0.9.0.1/test/Test.hs
--- old/log-0.7/test/Test.hs 2016-11-25 10:09:31.000000000 +0100
+++ new/log-0.9.0.1/test/Test.hs 2017-06-20 18:22:15.000000000 +0200
@@ -1,7 +1,7 @@
module Main where
import Log
-import Log.Backend.ElasticSearch
+import Log.Backend.ElasticSearch.V5
import Test.ElasticSearch
import System.Random
1
0
Hello community,
here is the log from the commit of package ghc-linear-accelerate for openSUSE:Factory checked in at 2017-08-31 20:48:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-linear-accelerate (Old)
and /work/SRC/openSUSE:Factory/.ghc-linear-accelerate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-linear-accelerate"
Thu Aug 31 20:48:13 2017 rev:2 rq:513422 version:0.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-linear-accelerate/ghc-linear-accelerate.changes 2016-11-02 12:33:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-linear-accelerate.new/ghc-linear-accelerate.changes 2017-08-31 20:48:14.560685358 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:50 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.4.
+
+-------------------------------------------------------------------
Old:
----
linear-accelerate-0.2.tar.gz
New:
----
linear-accelerate-0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-linear-accelerate.spec ++++++
--- /var/tmp/diff_new_pack.52ZEOA/_old 2017-08-31 20:48:15.588541081 +0200
+++ /var/tmp/diff_new_pack.52ZEOA/_new 2017-08-31 20:48:15.600539397 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-linear-accelerate
#
-# 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,25 +17,29 @@
%global pkg_name linear-accelerate
+%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.2
+Version: 0.4
Release: 0
-Summary: Instances to use linear vector spaces on accelerate backends
+Summary: Lifting linear vector spaces into Accelerate
License: BSD-3-Clause
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-accelerate-devel
+BuildRequires: ghc-cabal-doctest-devel
+BuildRequires: ghc-distributive-devel
BuildRequires: ghc-lens-devel
BuildRequires: ghc-linear-devel
BuildRequires: ghc-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
+%if %{with tests}
+BuildRequires: ghc-doctest-devel
+%endif
%description
-Instances to use linear vector spaces on accelerate backends.
+Lifting linear vector spaces into Accelerate.
%package devel
Summary: Haskell %{pkg_name} library development files
@@ -52,14 +56,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
+%check
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ linear-accelerate-0.2.tar.gz -> linear-accelerate-0.4.tar.gz ++++++
++++ 2419 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-libsystemd-journal for openSUSE:Factory checked in at 2017-08-31 20:48:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-libsystemd-journal (Old)
and /work/SRC/openSUSE:Factory/.ghc-libsystemd-journal.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-libsystemd-journal"
Thu Aug 31 20:48:10 2017 rev:2 rq:513419 version:1.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-libsystemd-journal/ghc-libsystemd-journal.changes 2017-04-12 18:07:33.303439324 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-libsystemd-journal.new/ghc-libsystemd-journal.changes 2017-08-31 20:48:12.089032296 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:30 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.4.2.
+
+-------------------------------------------------------------------
Old:
----
libsystemd-journal-1.4.1.tar.gz
libsystemd-journal.cabal
New:
----
libsystemd-journal-1.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-libsystemd-journal.spec ++++++
--- /var/tmp/diff_new_pack.pOQyap/_old 2017-08-31 20:48:12.928914404 +0200
+++ /var/tmp/diff_new_pack.pOQyap/_new 2017-08-31 20:48:12.932913843 +0200
@@ -18,14 +18,13 @@
%global pkg_name libsystemd-journal
Name: ghc-%{pkg_name}
-Version: 1.4.1
+Version: 1.4.2
Release: 0
Summary: Haskell bindings to libsystemd-journal
License: BSD-3-Clause
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-bytestring-devel
BuildRequires: ghc-hashable-devel
@@ -63,7 +62,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ libsystemd-journal-1.4.1.tar.gz -> libsystemd-journal-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsystemd-journal-1.4.1/Changelog.md new/libsystemd-journal-1.4.2/Changelog.md
--- old/libsystemd-journal-1.4.1/Changelog.md 2016-11-04 18:33:20.000000000 +0100
+++ new/libsystemd-journal-1.4.2/Changelog.md 2017-07-24 14:18:20.000000000 +0200
@@ -1,3 +1,7 @@
+# 1.4.2
+
+* Updated `base` upper bound
+
# 1.4.1
* Updated `base` upper bound
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsystemd-journal-1.4.1/libsystemd-journal.cabal new/libsystemd-journal-1.4.2/libsystemd-journal.cabal
--- old/libsystemd-journal-1.4.1/libsystemd-journal.cabal 2016-11-04 18:33:20.000000000 +0100
+++ new/libsystemd-journal-1.4.2/libsystemd-journal.cabal 2017-07-24 14:18:20.000000000 +0200
@@ -1,5 +1,5 @@
name: libsystemd-journal
-version: 1.4.1
+version: 1.4.2
synopsis: Haskell bindings to libsystemd-journal
homepage: http://github.com/ocharles/libsystemd-journal
license: BSD3
@@ -16,7 +16,19 @@
library
exposed-modules: Systemd.Journal
- build-depends: base >=4.6 && <4.10, bytestring >= 0.9.1, pipes >= 4.0, pipes-safe >= 2.0, text >= 0.1 && < 1.3, transformers >= 0.3, unix-bytestring >= 0.3.2 && < 0.4, vector >= 0.4 && < 0.12, uuid, unordered-containers >= 0.1 && < 0.3, hashable >= 1.1.2.5, hsyslog, uniplate >= 1.6
+ build-depends: base >=4.6 && <4.11
+ , bytestring >= 0.9.1
+ , pipes >= 4.0
+ , pipes-safe >= 2.0
+ , text >= 0.1 && < 1.3
+ , transformers >= 0.3
+ , unix-bytestring >= 0.3.2 && < 0.4
+ , vector >= 0.4 && < 0.13
+ , uuid
+ , unordered-containers >= 0.1 && < 0.3
+ , hashable >= 1.1.2.5
+ , hsyslog
+ , uniplate >= 1.6
hs-source-dirs: src
default-language: Haskell2010
pkgconfig-depends: libsystemd >= 209
1
0
Hello community,
here is the log from the commit of package ghc-lens for openSUSE:Factory checked in at 2017-08-31 20:48:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-lens (Old)
and /work/SRC/openSUSE:Factory/.ghc-lens.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-lens"
Thu Aug 31 20:48:08 2017 rev:6 rq:513418 version:4.15.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-lens/ghc-lens.changes 2017-03-20 17:07:33.230889989 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-lens.new/ghc-lens.changes 2017-08-31 20:48:10.285285481 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:54 UTC 2017 - psimons(a)suse.com
+
+- Update to version 4.15.3.
+
+-------------------------------------------------------------------
Old:
----
lens-4.15.1.tar.gz
lens.cabal
New:
----
lens-4.15.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-lens.spec ++++++
--- /var/tmp/diff_new_pack.9nKcwS/_old 2017-08-31 20:48:11.161162538 +0200
+++ /var/tmp/diff_new_pack.9nKcwS/_new 2017-08-31 20:48:11.165161976 +0200
@@ -19,19 +19,19 @@
%global pkg_name lens
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 4.15.1
+Version: 4.15.3
Release: 0
Summary: Lenses, Folds and Traversals
-License: BSD-3-Clause
+License: BSD-2-Clause
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/4.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-base-orphans-devel
BuildRequires: ghc-bifunctors-devel
BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-cabal-doctest-devel
BuildRequires: ghc-comonad-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-contravariant-devel
@@ -51,6 +51,7 @@
BuildRequires: ghc-tagged-devel
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-text-devel
+BuildRequires: ghc-th-abstraction-devel
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-unordered-containers-devel
@@ -170,7 +171,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ lens-4.15.1.tar.gz -> lens-4.15.3.tar.gz ++++++
++++ 4181 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-language-c-quote for openSUSE:Factory checked in at 2017-08-31 20:48:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-language-c-quote (Old)
and /work/SRC/openSUSE:Factory/.ghc-language-c-quote.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-language-c-quote"
Thu Aug 31 20:48:07 2017 rev:2 rq:513415 version:0.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-language-c-quote/ghc-language-c-quote.changes 2017-05-16 14:40:41.792717566 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-language-c-quote.new/ghc-language-c-quote.changes 2017-08-31 20:48:07.829630174 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:08:14 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.12.
+
+-------------------------------------------------------------------
Old:
----
language-c-quote-0.11.7.3.tar.gz
language-c-quote.cabal
New:
----
language-c-quote-0.12.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-language-c-quote.spec ++++++
--- /var/tmp/diff_new_pack.zj43V4/_old 2017-08-31 20:48:08.997466248 +0200
+++ /var/tmp/diff_new_pack.zj43V4/_new 2017-08-31 20:48:09.001465687 +0200
@@ -19,14 +19,13 @@
%global pkg_name language-c-quote
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.11.7.3
+Version: 0.12
Release: 0
Summary: C/CUDA/OpenCL/Objective-C quasiquoting library
License: BSD-3-Clause
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: alex
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
@@ -70,7 +69,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ language-c-quote-0.11.7.3.tar.gz -> language-c-quote-0.12.tar.gz ++++++
++++ 13330 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-language-c for openSUSE:Factory checked in at 2017-08-31 20:48:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-language-c (Old)
and /work/SRC/openSUSE:Factory/.ghc-language-c.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-language-c"
Thu Aug 31 20:48:03 2017 rev:4 rq:513414 version:0.6.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-language-c/ghc-language-c.changes 2016-07-20 09:21:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-language-c.new/ghc-language-c.changes 2017-08-31 20:48:03.638218507 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:03:57 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.6.1.
+
+-------------------------------------------------------------------
Old:
----
language-c-0.5.0.tar.gz
New:
----
language-c-0.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-language-c.spec ++++++
--- /var/tmp/diff_new_pack.4II13z/_old 2017-08-31 20:48:04.518095001 +0200
+++ /var/tmp/diff_new_pack.4II13z/_new 2017-08-31 20:48:04.522094441 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-language-c
#
-# 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,15 +17,15 @@
%global pkg_name language-c
+%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.5.0
+Version: 0.6.1
Release: 0
Summary: Analysis and generation of C code
License: BSD-3-Clause
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-# Begin cabal-rpm deps:
BuildRequires: alex
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
@@ -39,12 +39,11 @@
BuildRequires: ghc-syb-devel
BuildRequires: happy
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
Language C is a haskell library for the analysis and generation of C code.
It features a complete, well tested parser and pretty printer for all of C99
-and a large set of GNU extensions.
+and a large set of C11 and clang/GNU extensions.
%package devel
Summary: Haskell %{pkg_name} library development files
@@ -60,14 +59,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
+%check
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ language-c-0.5.0.tar.gz -> language-c-0.6.1.tar.gz ++++++
++++ 11041 lines of diff (skipped)
1
0