openSUSE Commits
Threads by month
- ----- 2025 -----
- February
- 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
February 2017
- 1 participants
- 1918 discussions
Hello community,
here is the log from the commit of package python-novaclient for openSUSE:Factory checked in at 2017-02-21 13:46:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-novaclient (Old)
and /work/SRC/openSUSE:Factory/.python-novaclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-novaclient"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-…
[View More]novaclient/python-novaclient.changes 2016-10-23 12:52:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-novaclient.new/python-novaclient.changes 2017-02-21 13:46:28.297112573 +0100
@@ -1,0 +2,87 @@
+Mon Feb 13 17:07:48 UTC 2017 - cloud-devel(a)suse.de
+
+- update to version 7.1.0:
+ - Add release not for fixing token auth method
+ - Fixed the __ne__ implementation in base.Resource
+ - Use more specific asserts in tests
+ - Allow multiple tag add/delete from cli
+ - Enable coverage report in console output
+ - Make _console() public
+ - Fix "Message object do not support addition".
+ - Fix help strings
+ - Blacklist rather than whitelist autodoc modules
+ - Fix functional tests to deal with multiple networks
+ - Replaces uuid.uuid4 with uuidutils.generate_uuid()
+ - ListExtResource given in place of ListExtManager
+ - x-openstack-request-id logged twice in logs
+ - Pass relevant parameters to Token based authentication
+ - Updated from global requirements
+ - Add support for showing aggregate UUIDs (v2.41)
+ - Add profiling support to novaclient
+
+-------------------------------------------------------------------
+Mon Feb 13 12:55:11 UTC 2017 - cloud-devel(a)suse.de
+
+- update to version 7.0.0:
+ - Use upper-constraints when running tox
+ - Clarify meaning of project_id var
+ - Remove unused helper volume methods in v2 shell
+ - Fix doc generation errors
+ - Update docs for instructions on deprecating commands
+ - Rename interface to endpoint_type
+ - Add version pin for image list function
+ - Deprecate connection_pool variable
+ - Enable release notes translation
+ - Add version pin for image related function
+ - Microversion 2.39 - Simple tenant usage pagination
+ - Clean up requests-mock usage
+ - Correct copy/paste errors in help
+ - Update reno for stable/newton
+ - Remove unused code
+ - Microversion 2.40 - Simple tenant usage pagination
+ - Fix incorrect output of "nova show" for long user data
+ - Fix 'UnicodeEncodeError' for unicode values
+ - Show team and repo badges on README
+ - Usage missing from generated docs
+ - Replace six.iteritems() with .items()
+ - Add some missing modules in API reference
+ - Fix the description of hypervisors.list
+ - Change fake server id as str to fit real server id type
+ - Rename api_key to password
+ - Rename bypass_url to endpoint_override
+ - Remove internal attribute access from shell
+ - Fix can't process the resource with name 'help'
+ - modified the description of service.list
+ - Replace oslo_utils.timeutils.isotime
+ - [proxy-api] microversion 2.39 deprecates image-metadata proxy API
+ - Restict usage *args for novaclient.client.Client
+ - Transmit all auth related vars from cli to inner methods
+ - Make SessionClient interface similar to HTTPClient
+ - Add Python 3.5 classifier and venv
+ - Add min-disk and min-ram filters to list flavors
+ - Revert "Microversion 2.39 - Simple tenant usage pagination"
+ - Add limit and offset to server-groups list
+ - Remove all code related to HTTPClient
+ - Modify use of assertTrue(A in B)
+ - Move all extensions from contrib dir
+ - Introduce helper for checking args deprecation
+ - Clarify some release notes prior to the 7.0.0 release
+ - Add timezone disclaimer to docstring
+ - Sort arguments for client's methods
+ - Remove unused test code
+ - Remove redundant args of _construct_http_client
+ - Remove support for non-keystone auth systems
+ - Remove deprecated commands
+ - Replace requests mocking with requests-mock
+ - Check source_type and destination_type when booting with bdm provided
+ - Make "policy" a mandatory argument for server-group-create
+ - Fix import statement order
+ - Deprecate proxy_token and proxy_tenant_id args
+ - Deprecate volume_service_name argument
+ - Create keystone session instance if not present
+ - CONF.osapi_max_limit -> CONF.api.max_limit
+ - Bump client microversion to 2.38
+ - Updated from global requirements
+ - remove variable '_' from tests
+
+-------------------------------------------------------------------
Old:
----
python-novaclient-6.0.0.tar.gz
New:
----
python-novaclient-7.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-novaclient.spec ++++++
--- /var/tmp/diff_new_pack.kfhXPP/_old 2017-02-21 13:46:28.821038659 +0100
+++ /var/tmp/diff_new_pack.kfhXPP/_new 2017-02-21 13:46:28.821038659 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-novaclient
#
-# 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,7 +17,7 @@
Name: python-novaclient
-Version: 6.0.0
+Version: 7.1.0
Release: 0
Summary: Python API and CLI for OpenStack Nova
License: Apache-2.0
@@ -29,25 +29,26 @@
BuildRequires: python-cinderclient >= 1.6.0
BuildRequires: python-devel
BuildRequires: python-fixtures >= 3.0.0
-BuildRequires: python-glanceclient >= 2.3.0
-BuildRequires: python-keystoneclient >= 2.0.0
+BuildRequires: python-glanceclient >= 2.5.0
+BuildRequires: python-keystoneclient >= 3.8.0
BuildRequires: python-mock >= 2.0
-BuildRequires: python-os-client-config >= 1.13.1
-BuildRequires: python-pbr >= 1.6
-BuildRequires: python-requests-mock >= 1.0
+BuildRequires: python-os-client-config >= 1.22.0
+BuildRequires: python-osprofiler >= 1.4.0
+BuildRequires: python-pbr >= 1.8
+BuildRequires: python-requests-mock >= 1.1
BuildRequires: python-setuptools >= 16.0
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testscenarios >= 0.4
BuildRequires: python-testtools >= 1.4.0
Requires: openssl
Requires: python-Babel >= 2.3.4
-Requires: python-PrettyTable >= 0.7
+Requires: python-PrettyTable >= 0.7.1
Requires: python-iso8601 >= 0.1.11
-Requires: python-keystoneauth1 >= 2.10.0
+Requires: python-keystoneauth1 >= 2.17.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
-Requires: python-oslo.utils >= 3.16.0
-Requires: python-pbr >= 1.6
+Requires: python-oslo.utils >= 3.18.0
+Requires: python-pbr >= 1.8
Requires: python-requests >= 2.10.0
Requires: python-setuptools >= 16.0
Requires: python-simplejson >= 2.2.0
@@ -63,7 +64,7 @@
Summary: Documentation for OpenStack Nova API Client
Group: Documentation
BuildRequires: python-Sphinx
-BuildRequires: python-oslosphinx >= 2.5.0
+BuildRequires: python-oslosphinx >= 4.7.0
BuildRequires: python-reno >= 1.8.0
%description doc
@@ -78,11 +79,12 @@
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-fixtures >= 3.0.0
-Requires: python-glanceclient >= 2.3.0
-Requires: python-keystoneclient >= 2.0.0
+Requires: python-glanceclient >= 2.5.0
+Requires: python-keystoneclient >= 3.8.0
Requires: python-mock >= 2.0
-Requires: python-os-client-config >= 1.13.1
-Requires: python-requests-mock >= 1.0
+Requires: python-os-client-config >= 1.22.0
+Requires: python-osprofiler >= 1.4.0
+Requires: python-requests-mock >= 1.1
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 1.4.0
@@ -96,6 +98,7 @@
%prep
%autosetup -n %{name}-%{version}
+%py_req_cleanup
%build
%py2_build
++++++ _service ++++++
--- /var/tmp/diff_new_pack.kfhXPP/_old 2017-02-21 13:46:28.853034145 +0100
+++ /var/tmp/diff_new_pack.kfhXPP/_new 2017-02-21 13:46:28.853034145 +0100
@@ -1,14 +1,12 @@
<services>
<service mode="disabled" name="renderspec">
- <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/ope…</param>
+ <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/ocata/open…</param>
<param name="output-name">python-novaclient.spec</param>
- <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/glo…</param>
+ <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/ocata/glob…</param>
+ <param name="changelog-email">cloud-devel(a)suse.de</param>
+ <param name="changelog-provider">gh,openstack,python-novaclient</param>
</service>
<service mode="disabled" name="download_files">
- <param name="changesgenerate">enable</param>
- </service>
- <service name="refresh_patches" mode="disabled">
- <param name="changesgenerate">enable</param>
</service>
<service name="format_spec_file" mode="disabled"/>
</services>
++++++ python-novaclient-6.0.0.tar.gz -> python-novaclient-7.1.0.tar.gz ++++++
++++ 12889 lines of diff (skipped)
[View Less]
1
0
Hello community,
here is the log from the commit of package highlighting-kate for openSUSE:Factory checked in at 2017-02-21 13:46:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/highlighting-kate (Old)
and /work/SRC/openSUSE:Factory/.highlighting-kate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "highlighting-kate"
Changes:
--------
--- /work/SRC/openSUSE:Factory/…
[View More]highlighting-kate/highlighting-kate.changes 2016-10-19 13:05:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.highlighting-kate.new/highlighting-kate.changes 2017-02-21 13:46:22.597916596 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:18 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.6.4 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
highlighting-kate-0.6.3.tar.gz
New:
----
highlighting-kate-0.6.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ highlighting-kate.spec ++++++
--- /var/tmp/diff_new_pack.VreY6q/_old 2017-02-21 13:46:23.237826320 +0100
+++ /var/tmp/diff_new_pack.VreY6q/_new 2017-02-21 13:46:23.237826320 +0100
@@ -1,7 +1,7 @@
#
# spec file for package highlighting-kate
#
-# 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,7 +19,7 @@
%global pkg_name highlighting-kate
%bcond_with tests
Name: %{pkg_name}
-Version: 0.6.3
+Version: 0.6.4
Release: 0
Summary: Syntax highlighting
License: GPL-2.0
@@ -50,6 +50,7 @@
syntax descriptions (<http://kate-editor.org/>), so any syntax supported by
Kate can be added. An (optional) command-line program is provided, along with a
utility for generating new parsers from Kate XML syntax descriptions.
+__This library has been deprecated. Please use skylighting instead.__.
%package -n ghc-%{name}
Summary: Haskell %{name} library
@@ -78,7 +79,7 @@
%install
%ghc_lib_install
-%ghc_fix_dynamic_rpath %{pkg_name}
+%ghc_fix_rpath %{pkg_name}-%{version}
%check
%cabal_test
++++++ highlighting-kate-0.6.3.tar.gz -> highlighting-kate-0.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/README.md new/highlighting-kate-0.6.4/README.md
--- old/highlighting-kate-0.6.3/README.md 2016-07-22 06:56:57.000000000 +0200
+++ new/highlighting-kate-0.6.4/README.md 2017-01-31 11:31:49.000000000 +0100
@@ -1,25 +1,19 @@
highlighting-kate
------------------
+=================
+
+**This library has been deprecated. Please use skylighting
+instead
+([Hackage](https://hackage.haskell.org/package/skylighting)
+|
+[GitHub](https://github.com/jgm/skylighting)).**
A Haskell source code highlighting library, based
on Kate's syntax description files (http://kate-editor.org/)
now [part of the KDE Framework's "KTextEditor" component](http://kate-editor.org/2013/11/11/kate-on-5-the-future-of-ktexte….
It can produce both HTML and LaTeX output.
-Currently, the following languages/formats are supported:
-Abc Actionscript Ada Agda Alert Alert_indent Apache Asn1 Asp Awk
-Bash Bibtex Boo C Changelog Clojure Cmake Coffee Coldfusion
-Commonlisp Cpp Cs Css Curry D Diff Djangotemplate Dockerfile Dot
-Doxygen Doxygenlua Dtd Eiffel Elixir Email Erlang Fasm Fortran
-Fsharp Gcc Glsl Gnuassembler Go Hamlet Haskell Haxe Html Idris
-Ini Isocpp Java Javadoc Javascript Json Jsp Julia Kotlin Latex
-Lex Lilypond LiterateCurry LiterateHaskell Llvm Lua M4 Makefile
-Mandoc Markdown Mathematica Matlab Maxima Mediawiki Metafont
-Mips Modelines Modula2 Modula3 Monobasic Nasm Noweb Objectivec
-Objectivecpp Ocaml Octave Opencl Pascal Perl Php Pike Postscript
-Prolog Pure Python R Relaxng Relaxngcompact Rest Rhtml Roff Ruby
-Rust Scala Scheme Sci Sed Sgml Sql SqlMysql SqlPostgresql Tcl
-Tcsh Texinfo Verilog Vhdl Xml Xorg Xslt Xul Yacc Yaml Zsh
+Building
+--------
To install, use the [stack] tool:
@@ -51,7 +45,15 @@
executable, use `--flag highlighting-kate:-executable` with the
`stack` commands above.
-To run `highlighting-kate`, specify the language name using -s:
+Using
+-----
+
+If you want to use highlighting-kate as a library in a Haskell
+program, see the API documentation at
+<https://hackage.haskell.org/package/highlighting-kate>.
+
+To run the `highlighting-kate` program, specify the language
+name using `-s`:
highlighting-kate -s haskell highlighting-kate.hs > example.html
@@ -69,6 +71,9 @@
Alert, Error). For more fine-grained highlighting, users may wish to
create their own CSS files that use language-specific classes.
+Adding syntax definitions
+-------------------------
+
The parsers in Text/Highlighting/Kate/Syntax were automatically generated
from the Kate syntax definitions in the xml directory. You may modify
the xml files in this directory, or add new ones, and then regenerate
@@ -89,7 +94,7 @@
src/syntax/data
There is information on the syntax highlighting definitions at
-<http://docs.kde.org/stable/en/applications/kate/highlight.html>. See also
+<https://docs.kde.org/stable5/en/applications/katepart/highlight.html>. See also
<http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/>.
Thanks are due to all the authors of these syntax definitions.
@@ -103,6 +108,3 @@
- php.xml: Added fallthrough so `<?php` prefix not needed.
- tcsh.xml: Replace invalid character assignment(?) of regex '\s' with ' '.
-- base report bugs on the GitHub issue tracker:
-<https://github.com/jgm/highlighting-kate/issues>.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/Text/Highlighting/Kate/Syntax/Ats.hs new/highlighting-kate-0.6.4/Text/Highlighting/Kate/Syntax/Ats.hs
--- old/highlighting-kate-0.6.3/Text/Highlighting/Kate/Syntax/Ats.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/highlighting-kate-0.6.4/Text/Highlighting/Kate/Syntax/Ats.hs 2017-01-19 14:25:26.000000000 +0100
@@ -0,0 +1,164 @@
+{- This module was generated from data in the Kate syntax
+ highlighting file ats.xml, version 0.01, by Kiwamu Okabe (kiwamu(a)debian.or.jp) -}
+
+module Text.Highlighting.Kate.Syntax.Ats
+ (highlight, parseExpression, syntaxName, syntaxExtensions)
+where
+import Text.Highlighting.Kate.Types
+import Text.Highlighting.Kate.Common
+import Text.ParserCombinators.Parsec hiding (State)
+import Control.Monad.State
+import Data.Char (isSpace)
+import qualified Data.Set as Set
+
+-- | Full name of language.
+syntaxName :: String
+syntaxName = "ATS"
+
+-- | Filename extensions for this language.
+syntaxExtensions :: String
+syntaxExtensions = "*.dats;*.sats;*.hats"
+
+-- | Highlight source code using this syntax definition.
+highlight :: String -> [SourceLine]
+highlight input = evalState (mapM parseSourceLine $ lines input) startingState
+
+parseSourceLine :: String -> State SyntaxState SourceLine
+parseSourceLine = mkParseSourceLine (parseExpression Nothing)
+
+-- | Parse an expression using appropriate local context.
+parseExpression :: Maybe (String,String)
+ -> KateParser Token
+parseExpression mbcontext = do
+ (lang,cont) <- maybe currentContext return mbcontext
+ result <- parseRules (lang,cont)
+ optional $ do eof
+ updateState $ \st -> st{ synStPrevChar = '\n' }
+ pEndLine
+ return result
+
+startingState = SyntaxState {synStContexts = [("ATS","Normal")], synStLineNumber = 0, synStPrevChar = '\n', synStPrevNonspace = False, synStContinuation = False, synStCaseSensitive = True, synStKeywordCaseSensitive = True, synStCaptures = []}
+
+pEndLine = do
+ updateState $ \st -> st{ synStPrevNonspace = False }
+ context <- currentContext
+ contexts <- synStContexts `fmap` getState
+ st <- getState
+ if length contexts >= 2
+ then case context of
+ _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False }
+ ("ATS","Normal") -> return ()
+ ("ATS","Rest-of-file Comment") -> return ()
+ ("ATS","Multiline Comment") -> return ()
+ ("ATS","Multiline C-style Comment") -> return ()
+ ("ATS","Singleline C++ style Comment") -> (popContext) >> pEndLine
+ ("ATS","String Context") -> return ()
+ ("ATS","Termination Metrics Context") -> return ()
+ ("ATS","Function Keyword Context") -> return ()
+ ("ATS","Universal Context") -> return ()
+ ("ATS","Existential Context") -> return ()
+ _ -> return ()
+ else return ()
+
+withAttribute attr txt = do
+ when (null txt) $ fail "Parser matched no text"
+ updateState $ \st -> st { synStPrevChar = last txt
+ , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) }
+ return (attr, txt)
+
+list_keywords = Set.fromList $ words $ "abstype abst0ype absprop absview absvtype absviewtype absvt0ype absviewt0ype and as assume begin break continue classdec datasort datatype dataprop dataview datavtype dataviewtype do dynload else end exception extern extype extval if in infix infixl infixr prefix postfix let local macdef macrodef nonfix overload of op rec scase sif sortdef sta stacst stadef stavar staload symelim symintr then try tkindef type typedef propdef viewdef vtypedef viewtypedef val prval var prvar when where for while with withtype withprop withview withvtype withviewtype"
+list_special_keywords = Set.fromList $ words $ "$arrpsz $arrptrsize $delay $ldelay $effmask $effmask_ntm $effmask_exn $effmask_ref $effmask_wrt $effmask_all $extern $extkind $extype $extype_struct $extval $lst $lst_t $lst_vt $list $list_t $list_vt $rec $rec_t $rec_vt $record $record_t $record_vt $tup $tup_t $tup_vt $tuple $tuple_t $tuple_vt $raise $showtype $myfilename $mylocation $myfunction #assert #define #elif #elifdef #elifndef #else #endif #error #if #ifdef #ifndef #include #print #then #undef"
+list_function_keywords = Set.fromList $ words $ "fn fnx fun prfn prfun praxi castfn implmnt implement primplmnt primplement lam llam fix"
+
+regex_'60'5cs'2a'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c0377'5f'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a = compileRegex True "`\\s*[A-Za-z\\0300-\\0326\\0330-\\0366\\0370-\\0377_][A-Za-z\\0300-\\0326\\0330-\\0366\\0370-\\03770-9_']*"
+regex_'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c0377'5f'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a = compileRegex True "[A-Za-z\\0300-\\0326\\0330-\\0366\\0370-\\0377_][A-Za-z\\0300-\\0326\\0330-\\0366\\0370-\\03770-9_']*"
+regex_'7e'3f0'5bxX'5d'5b0'2d9A'2dFa'2df'5f'5d'2b = compileRegex True "~?0[xX][0-9A-Fa-f_]+"
+regex_'7e'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'28'28'5c'2e'28'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'3f'28'5beE'5d'5b'2d'2b'5d'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'3f'29'7c'28'5beE'5d'5b'2d'2b'5d'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'29 = compileRegex True "~?[0-9][0-9_]*((\\.([0-9][0-9_]*)?([eE][-+]?[0-9][0-9_]*)?)|([eE][-+]?[0-9][0-9_]*))"
+regex_'7e'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a = compileRegex True "~?[0-9][0-9_]*"
+regex_'28'5c'5c'5bntbr'27'22'5c'5c'5d'7c'5c'5c'5b0'2d9'5d'7b3'7d'7c'5c'5cx'5b0'2d9A'2dFa'2df'5d'7b2'7d'29 = compileRegex True "(\\\\[ntbr'\"\\\\]|\\\\[0-9]{3}|\\\\x[0-9A-Fa-f]{2})"
+regex_'5c'5c'24 = compileRegex True "\\\\$"
+
+parseRules ("ATS","Normal") =
+ (((pString False "////" >>= withAttribute CommentTok) >>~ pushContext ("ATS","Rest-of-file Comment"))
+ <|>
+ ((pDetect2Chars False '(' '*' >>= withAttribute CommentTok) >>~ pushContext ("ATS","Multiline Comment"))
+ <|>
+ ((pDetect2Chars False '/' '*' >>= withAttribute CommentTok) >>~ pushContext ("ATS","Multiline C-style Comment"))
+ <|>
+ ((pDetect2Chars False '/' '/' >>= withAttribute CommentTok) >>~ pushContext ("ATS","Singleline C++ style Comment"))
+ <|>
+ ((pDetect2Chars False '.' '<' >>= withAttribute DataTypeTok) >>~ pushContext ("ATS","Termination Metrics Context"))
+ <|>
+ ((pRegExpr regex_'60'5cs'2a'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c0377'5f'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a >>= withAttribute DataTypeTok))
+ <|>
+ ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_keywords >>= withAttribute KeywordTok))
+ <|>
+ ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_function_keywords >>= withAttribute KeywordTok) >>~ pushContext ("ATS","Function Keyword Context"))
+ <|>
+ ((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_special_keywords >>= withAttribute DataTypeTok))
+ <|>
+ ((pRegExpr regex_'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c0377'5f'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a >>= withAttribute NormalTok))
+ <|>
+ ((pRegExpr regex_'7e'3f0'5bxX'5d'5b0'2d9A'2dFa'2df'5f'5d'2b >>= withAttribute BaseNTok))
+ <|>
+ ((pRegExpr regex_'7e'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'28'28'5c'2e'28'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'3f'28'5beE'5d'5b'2d'2b'5d'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'3f'29'7c'28'5beE'5d'5b'2d'2b'5d'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a'29'29 >>= withAttribute FloatTok))
+ <|>
+ ((pRegExpr regex_'7e'3f'5b0'2d9'5d'5b0'2d9'5f'5d'2a >>= withAttribute DecValTok))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Normal")) >> pDefault >>= withAttribute NormalTok))
+
+parseRules ("ATS","Rest-of-file Comment") =
+ (currentContext >>= \x -> guard (x == ("ATS","Rest-of-file Comment")) >> pDefault >>= withAttribute CommentTok)
+
+parseRules ("ATS","Multiline Comment") =
+ (((pDetect2Chars False '*' ')' >>= withAttribute CommentTok) >>~ (popContext))
+ <|>
+ ((pDetect2Chars False '(' '*' >>= withAttribute CommentTok) >>~ pushContext ("ATS","Multiline Comment"))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Multiline Comment")) >> pDefault >>= withAttribute CommentTok))
+
+parseRules ("ATS","Multiline C-style Comment") =
+ (((pDetect2Chars False '*' '/' >>= withAttribute CommentTok) >>~ (popContext))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Multiline C-style Comment")) >> pDefault >>= withAttribute CommentTok))
+
+parseRules ("ATS","Singleline C++ style Comment") =
+ (currentContext >>= \x -> guard (x == ("ATS","Singleline C++ style Comment")) >> pDefault >>= withAttribute CommentTok)
+
+parseRules ("ATS","String Context") =
+ (((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
+ <|>
+ ((pRegExpr regex_'28'5c'5c'5bntbr'27'22'5c'5c'5d'7c'5c'5c'5b0'2d9'5d'7b3'7d'7c'5c'5cx'5b0'2d9A'2dFa'2df'5d'7b2'7d'29 >>= withAttribute NormalTok))
+ <|>
+ ((pRegExpr regex_'5c'5c'24 >>= withAttribute NormalTok))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","String Context")) >> pDefault >>= withAttribute StringTok))
+
+parseRules ("ATS","Termination Metrics Context") =
+ (((pDetect2Chars False '>' '.' >>= withAttribute DataTypeTok) >>~ (popContext))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Termination Metrics Context")) >> pDefault >>= withAttribute DataTypeTok))
+
+parseRules ("ATS","Function Keyword Context") =
+ (((pDetectChar False '=' >>= withAttribute NormalTok) >>~ (popContext))
+ <|>
+ ((pDetectChar False '{' >>= withAttribute DataTypeTok) >>~ pushContext ("ATS","Universal Context"))
+ <|>
+ ((pDetectChar False '[' >>= withAttribute DataTypeTok) >>~ pushContext ("ATS","Existential Context"))
+ <|>
+ ((parseRules ("ATS","Normal")))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Function Keyword Context")) >> pDefault >>= withAttribute NormalTok))
+
+parseRules ("ATS","Universal Context") =
+ (((pDetectChar False '}' >>= withAttribute DataTypeTok) >>~ (popContext))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Universal Context")) >> pDefault >>= withAttribute DataTypeTok))
+
+parseRules ("ATS","Existential Context") =
+ (((pDetectChar False ']' >>= withAttribute DataTypeTok) >>~ (popContext))
+ <|>
+ (currentContext >>= \x -> guard (x == ("ATS","Existential Context")) >> pDefault >>= withAttribute DataTypeTok))
+
+
+parseRules x = parseRules ("ATS","Normal") <|> fail ("Unknown context" ++ show x)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/Text/Highlighting/Kate/Syntax.hs new/highlighting-kate-0.6.4/Text/Highlighting/Kate/Syntax.hs
--- old/highlighting-kate-0.6.3/Text/Highlighting/Kate/Syntax.hs 2016-09-18 18:06:41.000000000 +0200
+++ new/highlighting-kate-0.6.4/Text/Highlighting/Kate/Syntax.hs 2017-01-19 14:25:30.000000000 +0100
@@ -27,6 +27,7 @@
import qualified Text.Highlighting.Kate.Syntax.Apache as Apache
import qualified Text.Highlighting.Kate.Syntax.Asn1 as Asn1
import qualified Text.Highlighting.Kate.Syntax.Asp as Asp
+import qualified Text.Highlighting.Kate.Syntax.Ats as Ats
import qualified Text.Highlighting.Kate.Syntax.Awk as Awk
import qualified Text.Highlighting.Kate.Syntax.Bash as Bash
import qualified Text.Highlighting.Kate.Syntax.Bibtex as Bibtex
@@ -142,15 +143,15 @@
-- | List of supported languages.
languages :: [String]
-languages = ["Abc","Actionscript","Ada","Agda","Alert","Alert_indent","Apache","Asn1","Asp","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Dockerfile","Dot","Doxygen","Doxygenlua","Dtd","Eiffel","Elixir","Email","Erlang","Fasm","Fortran","Fsharp","Gcc","Glsl","Gnuassembler","Go","Hamlet","Haskell","Haxe","Html","Idris","Ini","Isocpp","Java","Javadoc","Javascript","Json","Jsp","Julia","Kotlin","Latex","Lex","Lilypond","LiterateCurry","LiterateHaskell","Llvm","Lua","M4","Makefile","Mandoc","Markdown","Mathematica","Matlab","Maxima","Mediawiki","Metafont","Mips","Modelines","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Opencl","Pascal","Perl","Php","Pike","Postscript","Prolog","Pure","Python","R","Relaxng","Relaxngcompact","Rest","Rhtml","Roff","Ruby","Rust","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Tcsh","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml","Zsh"]
+languages = ["Abc","Actionscript","Ada","Agda","Alert","Alert_indent","Apache","Asn1","Asp","Ats","Awk","Bash","Bibtex","Boo","C","Changelog","Clojure","Cmake","Coffee","Coldfusion","Commonlisp","Cpp","Cs","Css","Curry","D","Diff","Djangotemplate","Dockerfile","Dot","Doxygen","Doxygenlua","Dtd","Eiffel","Elixir","Email","Erlang","Fasm","Fortran","Fsharp","Gcc","Glsl","Gnuassembler","Go","Hamlet","Haskell","Haxe","Html","Idris","Ini","Isocpp","Java","Javadoc","Javascript","Json","Jsp","Julia","Kotlin","Latex","Lex","Lilypond","LiterateCurry","LiterateHaskell","Llvm","Lua","M4","Makefile","Mandoc","Markdown","Mathematica","Matlab","Maxima","Mediawiki","Metafont","Mips","Modelines","Modula2","Modula3","Monobasic","Nasm","Noweb","Objectivec","Objectivecpp","Ocaml","Octave","Opencl","Pascal","Perl","Php","Pike","Postscript","Prolog","Pure","Python","R","Relaxng","Relaxngcompact","Rest","Rhtml","Roff","Ruby","Rust","Scala","Scheme","Sci","Sed","Sgml","Sql","SqlMysql","SqlPostgresql","Tcl","Tcsh","Texinfo","Verilog","Vhdl","Xml","Xorg","Xslt","Xul","Yacc","Yaml","Zsh"]
-- | List of language extensions.
languageExtensions :: [(String, String)]
-languageExtensions = [("Abc", Abc.syntaxExtensions), ("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Agda", Agda.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Dockerfile", Dockerfile.syntaxExtensions), ("Dot", Dot.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Elixir", Elixir.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fasm", Fasm.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gcc", Gcc.syntaxExtensions), ("Glsl", Glsl.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Hamlet", Hamlet.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Idris", Idris.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Isocpp", Isocpp.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Kotlin", Kotlin.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("Lilypond", Lilypond.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Llvm", Llvm.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("M4", M4.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Markdown", Markdown.syntaxExtensions), ("Mathematica", Mathematica.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Mediawiki", Mediawiki.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modelines", Modelines.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Opencl", Opencl.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Pure", Pure.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxng", Relaxng.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rest", Rest.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Roff", Roff.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Rust", Rust.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Tcsh", Tcsh.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions), ("Zsh", Zsh.syntaxExtensions)]
+languageExtensions = [("Abc", Abc.syntaxExtensions), ("Actionscript", Actionscript.syntaxExtensions), ("Ada", Ada.syntaxExtensions), ("Agda", Agda.syntaxExtensions), ("Alert", Alert.syntaxExtensions), ("Alert_indent", Alert_indent.syntaxExtensions), ("Apache", Apache.syntaxExtensions), ("Asn1", Asn1.syntaxExtensions), ("Asp", Asp.syntaxExtensions), ("Ats", Ats.syntaxExtensions), ("Awk", Awk.syntaxExtensions), ("Bash", Bash.syntaxExtensions), ("Bibtex", Bibtex.syntaxExtensions), ("Boo", Boo.syntaxExtensions), ("C", C.syntaxExtensions), ("Changelog", Changelog.syntaxExtensions), ("Clojure", Clojure.syntaxExtensions), ("Cmake", Cmake.syntaxExtensions), ("Coffee", Coffee.syntaxExtensions), ("Coldfusion", Coldfusion.syntaxExtensions), ("Commonlisp", Commonlisp.syntaxExtensions), ("Cpp", Cpp.syntaxExtensions), ("Cs", Cs.syntaxExtensions), ("Css", Css.syntaxExtensions), ("Curry", Curry.syntaxExtensions), ("D", D.syntaxExtensions), ("Diff", Diff.syntaxExtensions), ("Djangotemplate", Djangotemplate.syntaxExtensions), ("Dockerfile", Dockerfile.syntaxExtensions), ("Dot", Dot.syntaxExtensions), ("Doxygen", Doxygen.syntaxExtensions), ("Doxygenlua", Doxygenlua.syntaxExtensions), ("Dtd", Dtd.syntaxExtensions), ("Eiffel", Eiffel.syntaxExtensions), ("Elixir", Elixir.syntaxExtensions), ("Email", Email.syntaxExtensions), ("Erlang", Erlang.syntaxExtensions), ("Fasm", Fasm.syntaxExtensions), ("Fortran", Fortran.syntaxExtensions), ("Fsharp", Fsharp.syntaxExtensions), ("Gcc", Gcc.syntaxExtensions), ("Glsl", Glsl.syntaxExtensions), ("Gnuassembler", Gnuassembler.syntaxExtensions), ("Go", Go.syntaxExtensions), ("Hamlet", Hamlet.syntaxExtensions), ("Haskell", Haskell.syntaxExtensions), ("Haxe", Haxe.syntaxExtensions), ("Html", Html.syntaxExtensions), ("Idris", Idris.syntaxExtensions), ("Ini", Ini.syntaxExtensions), ("Isocpp", Isocpp.syntaxExtensions), ("Java", Java.syntaxExtensions), ("Javadoc", Javadoc.syntaxExtensions), ("Javascript", Javascript.syntaxExtensions), ("Json", Json.syntaxExtensions), ("Jsp", Jsp.syntaxExtensions), ("Julia", Julia.syntaxExtensions), ("Kotlin", Kotlin.syntaxExtensions), ("Latex", Latex.syntaxExtensions), ("Lex", Lex.syntaxExtensions), ("Lilypond", Lilypond.syntaxExtensions), ("LiterateCurry", LiterateCurry.syntaxExtensions), ("LiterateHaskell", LiterateHaskell.syntaxExtensions), ("Llvm", Llvm.syntaxExtensions), ("Lua", Lua.syntaxExtensions), ("M4", M4.syntaxExtensions), ("Makefile", Makefile.syntaxExtensions), ("Mandoc", Mandoc.syntaxExtensions), ("Markdown", Markdown.syntaxExtensions), ("Mathematica", Mathematica.syntaxExtensions), ("Matlab", Matlab.syntaxExtensions), ("Maxima", Maxima.syntaxExtensions), ("Mediawiki", Mediawiki.syntaxExtensions), ("Metafont", Metafont.syntaxExtensions), ("Mips", Mips.syntaxExtensions), ("Modelines", Modelines.syntaxExtensions), ("Modula2", Modula2.syntaxExtensions), ("Modula3", Modula3.syntaxExtensions), ("Monobasic", Monobasic.syntaxExtensions), ("Nasm", Nasm.syntaxExtensions), ("Noweb", Noweb.syntaxExtensions), ("Objectivec", Objectivec.syntaxExtensions), ("Objectivecpp", Objectivecpp.syntaxExtensions), ("Ocaml", Ocaml.syntaxExtensions), ("Octave", Octave.syntaxExtensions), ("Opencl", Opencl.syntaxExtensions), ("Pascal", Pascal.syntaxExtensions), ("Perl", Perl.syntaxExtensions), ("Php", Php.syntaxExtensions), ("Pike", Pike.syntaxExtensions), ("Postscript", Postscript.syntaxExtensions), ("Prolog", Prolog.syntaxExtensions), ("Pure", Pure.syntaxExtensions), ("Python", Python.syntaxExtensions), ("R", R.syntaxExtensions), ("Relaxng", Relaxng.syntaxExtensions), ("Relaxngcompact", Relaxngcompact.syntaxExtensions), ("Rest", Rest.syntaxExtensions), ("Rhtml", Rhtml.syntaxExtensions), ("Roff", Roff.syntaxExtensions), ("Ruby", Ruby.syntaxExtensions), ("Rust", Rust.syntaxExtensions), ("Scala", Scala.syntaxExtensions), ("Scheme", Scheme.syntaxExtensions), ("Sci", Sci.syntaxExtensions), ("Sed", Sed.syntaxExtensions), ("Sgml", Sgml.syntaxExtensions), ("Sql", Sql.syntaxExtensions), ("SqlMysql", SqlMysql.syntaxExtensions), ("SqlPostgresql", SqlPostgresql.syntaxExtensions), ("Tcl", Tcl.syntaxExtensions), ("Tcsh", Tcsh.syntaxExtensions), ("Texinfo", Texinfo.syntaxExtensions), ("Verilog", Verilog.syntaxExtensions), ("Vhdl", Vhdl.syntaxExtensions), ("Xml", Xml.syntaxExtensions), ("Xorg", Xorg.syntaxExtensions), ("Xslt", Xslt.syntaxExtensions), ("Xul", Xul.syntaxExtensions), ("Yacc", Yacc.syntaxExtensions), ("Yaml", Yaml.syntaxExtensions), ("Zsh", Zsh.syntaxExtensions)]
-- | List of full names of languages.
languageFullNames :: [(String, String)]
-languageFullNames = [("Abc", Abc.syntaxName), ("Actionscript", Actionscript.syntaxName), ("Ada", Ada.syntaxName), ("Agda", Agda.syntaxName), ("Alert", Alert.syntaxName), ("Alert_indent", Alert_indent.syntaxName), ("Apache", Apache.syntaxName), ("Asn1", Asn1.syntaxName), ("Asp", Asp.syntaxName), ("Awk", Awk.syntaxName), ("Bash", Bash.syntaxName), ("Bibtex", Bibtex.syntaxName), ("Boo", Boo.syntaxName), ("C", C.syntaxName), ("Changelog", Changelog.syntaxName), ("Clojure", Clojure.syntaxName), ("Cmake", Cmake.syntaxName), ("Coffee", Coffee.syntaxName), ("Coldfusion", Coldfusion.syntaxName), ("Commonlisp", Commonlisp.syntaxName), ("Cpp", Cpp.syntaxName), ("Cs", Cs.syntaxName), ("Css", Css.syntaxName), ("Curry", Curry.syntaxName), ("D", D.syntaxName), ("Diff", Diff.syntaxName), ("Djangotemplate", Djangotemplate.syntaxName), ("Dockerfile", Dockerfile.syntaxName), ("Dot", Dot.syntaxName), ("Doxygen", Doxygen.syntaxName), ("Doxygenlua", Doxygenlua.syntaxName), ("Dtd", Dtd.syntaxName), ("Eiffel", Eiffel.syntaxName), ("Elixir", Elixir.syntaxName), ("Email", Email.syntaxName), ("Erlang", Erlang.syntaxName), ("Fasm", Fasm.syntaxName), ("Fortran", Fortran.syntaxName), ("Fsharp", Fsharp.syntaxName), ("Gcc", Gcc.syntaxName), ("Glsl", Glsl.syntaxName), ("Gnuassembler", Gnuassembler.syntaxName), ("Go", Go.syntaxName), ("Hamlet", Hamlet.syntaxName), ("Haskell", Haskell.syntaxName), ("Haxe", Haxe.syntaxName), ("Html", Html.syntaxName), ("Idris", Idris.syntaxName), ("Ini", Ini.syntaxName), ("Isocpp", Isocpp.syntaxName), ("Java", Java.syntaxName), ("Javadoc", Javadoc.syntaxName), ("Javascript", Javascript.syntaxName), ("Json", Json.syntaxName), ("Jsp", Jsp.syntaxName), ("Julia", Julia.syntaxName), ("Kotlin", Kotlin.syntaxName), ("Latex", Latex.syntaxName), ("Lex", Lex.syntaxName), ("Lilypond", Lilypond.syntaxName), ("LiterateCurry", LiterateCurry.syntaxName), ("LiterateHaskell", LiterateHaskell.syntaxName), ("Llvm", Llvm.syntaxName), ("Lua", Lua.syntaxName), ("M4", M4.syntaxName), ("Makefile", Makefile.syntaxName), ("Mandoc", Mandoc.syntaxName), ("Markdown", Markdown.syntaxName), ("Mathematica", Mathematica.syntaxName), ("Matlab", Matlab.syntaxName), ("Maxima", Maxima.syntaxName), ("Mediawiki", Mediawiki.syntaxName), ("Metafont", Metafont.syntaxName), ("Mips", Mips.syntaxName), ("Modelines", Modelines.syntaxName), ("Modula2", Modula2.syntaxName), ("Modula3", Modula3.syntaxName), ("Monobasic", Monobasic.syntaxName), ("Nasm", Nasm.syntaxName), ("Noweb", Noweb.syntaxName), ("Objectivec", Objectivec.syntaxName), ("Objectivecpp", Objectivecpp.syntaxName), ("Ocaml", Ocaml.syntaxName), ("Octave", Octave.syntaxName), ("Opencl", Opencl.syntaxName), ("Pascal", Pascal.syntaxName), ("Perl", Perl.syntaxName), ("Php", Php.syntaxName), ("Pike", Pike.syntaxName), ("Postscript", Postscript.syntaxName), ("Prolog", Prolog.syntaxName), ("Pure", Pure.syntaxName), ("Python", Python.syntaxName), ("R", R.syntaxName), ("Relaxng", Relaxng.syntaxName), ("Relaxngcompact", Relaxngcompact.syntaxName), ("Rest", Rest.syntaxName), ("Rhtml", Rhtml.syntaxName), ("Roff", Roff.syntaxName), ("Ruby", Ruby.syntaxName), ("Rust", Rust.syntaxName), ("Scala", Scala.syntaxName), ("Scheme", Scheme.syntaxName), ("Sci", Sci.syntaxName), ("Sed", Sed.syntaxName), ("Sgml", Sgml.syntaxName), ("Sql", Sql.syntaxName), ("SqlMysql", SqlMysql.syntaxName), ("SqlPostgresql", SqlPostgresql.syntaxName), ("Tcl", Tcl.syntaxName), ("Tcsh", Tcsh.syntaxName), ("Texinfo", Texinfo.syntaxName), ("Verilog", Verilog.syntaxName), ("Vhdl", Vhdl.syntaxName), ("Xml", Xml.syntaxName), ("Xorg", Xorg.syntaxName), ("Xslt", Xslt.syntaxName), ("Xul", Xul.syntaxName), ("Yacc", Yacc.syntaxName), ("Yaml", Yaml.syntaxName), ("Zsh", Zsh.syntaxName)]
+languageFullNames = [("Abc", Abc.syntaxName), ("Actionscript", Actionscript.syntaxName), ("Ada", Ada.syntaxName), ("Agda", Agda.syntaxName), ("Alert", Alert.syntaxName), ("Alert_indent", Alert_indent.syntaxName), ("Apache", Apache.syntaxName), ("Asn1", Asn1.syntaxName), ("Asp", Asp.syntaxName), ("Ats", Ats.syntaxName), ("Awk", Awk.syntaxName), ("Bash", Bash.syntaxName), ("Bibtex", Bibtex.syntaxName), ("Boo", Boo.syntaxName), ("C", C.syntaxName), ("Changelog", Changelog.syntaxName), ("Clojure", Clojure.syntaxName), ("Cmake", Cmake.syntaxName), ("Coffee", Coffee.syntaxName), ("Coldfusion", Coldfusion.syntaxName), ("Commonlisp", Commonlisp.syntaxName), ("Cpp", Cpp.syntaxName), ("Cs", Cs.syntaxName), ("Css", Css.syntaxName), ("Curry", Curry.syntaxName), ("D", D.syntaxName), ("Diff", Diff.syntaxName), ("Djangotemplate", Djangotemplate.syntaxName), ("Dockerfile", Dockerfile.syntaxName), ("Dot", Dot.syntaxName), ("Doxygen", Doxygen.syntaxName), ("Doxygenlua", Doxygenlua.syntaxName), ("Dtd", Dtd.syntaxName), ("Eiffel", Eiffel.syntaxName), ("Elixir", Elixir.syntaxName), ("Email", Email.syntaxName), ("Erlang", Erlang.syntaxName), ("Fasm", Fasm.syntaxName), ("Fortran", Fortran.syntaxName), ("Fsharp", Fsharp.syntaxName), ("Gcc", Gcc.syntaxName), ("Glsl", Glsl.syntaxName), ("Gnuassembler", Gnuassembler.syntaxName), ("Go", Go.syntaxName), ("Hamlet", Hamlet.syntaxName), ("Haskell", Haskell.syntaxName), ("Haxe", Haxe.syntaxName), ("Html", Html.syntaxName), ("Idris", Idris.syntaxName), ("Ini", Ini.syntaxName), ("Isocpp", Isocpp.syntaxName), ("Java", Java.syntaxName), ("Javadoc", Javadoc.syntaxName), ("Javascript", Javascript.syntaxName), ("Json", Json.syntaxName), ("Jsp", Jsp.syntaxName), ("Julia", Julia.syntaxName), ("Kotlin", Kotlin.syntaxName), ("Latex", Latex.syntaxName), ("Lex", Lex.syntaxName), ("Lilypond", Lilypond.syntaxName), ("LiterateCurry", LiterateCurry.syntaxName), ("LiterateHaskell", LiterateHaskell.syntaxName), ("Llvm", Llvm.syntaxName), ("Lua", Lua.syntaxName), ("M4", M4.syntaxName), ("Makefile", Makefile.syntaxName), ("Mandoc", Mandoc.syntaxName), ("Markdown", Markdown.syntaxName), ("Mathematica", Mathematica.syntaxName), ("Matlab", Matlab.syntaxName), ("Maxima", Maxima.syntaxName), ("Mediawiki", Mediawiki.syntaxName), ("Metafont", Metafont.syntaxName), ("Mips", Mips.syntaxName), ("Modelines", Modelines.syntaxName), ("Modula2", Modula2.syntaxName), ("Modula3", Modula3.syntaxName), ("Monobasic", Monobasic.syntaxName), ("Nasm", Nasm.syntaxName), ("Noweb", Noweb.syntaxName), ("Objectivec", Objectivec.syntaxName), ("Objectivecpp", Objectivecpp.syntaxName), ("Ocaml", Ocaml.syntaxName), ("Octave", Octave.syntaxName), ("Opencl", Opencl.syntaxName), ("Pascal", Pascal.syntaxName), ("Perl", Perl.syntaxName), ("Php", Php.syntaxName), ("Pike", Pike.syntaxName), ("Postscript", Postscript.syntaxName), ("Prolog", Prolog.syntaxName), ("Pure", Pure.syntaxName), ("Python", Python.syntaxName), ("R", R.syntaxName), ("Relaxng", Relaxng.syntaxName), ("Relaxngcompact", Relaxngcompact.syntaxName), ("Rest", Rest.syntaxName), ("Rhtml", Rhtml.syntaxName), ("Roff", Roff.syntaxName), ("Ruby", Ruby.syntaxName), ("Rust", Rust.syntaxName), ("Scala", Scala.syntaxName), ("Scheme", Scheme.syntaxName), ("Sci", Sci.syntaxName), ("Sed", Sed.syntaxName), ("Sgml", Sgml.syntaxName), ("Sql", Sql.syntaxName), ("SqlMysql", SqlMysql.syntaxName), ("SqlPostgresql", SqlPostgresql.syntaxName), ("Tcl", Tcl.syntaxName), ("Tcsh", Tcsh.syntaxName), ("Texinfo", Texinfo.syntaxName), ("Verilog", Verilog.syntaxName), ("Vhdl", Vhdl.syntaxName), ("Xml", Xml.syntaxName), ("Xorg", Xorg.syntaxName), ("Xslt", Xslt.syntaxName), ("Xul", Xul.syntaxName), ("Yacc", Yacc.syntaxName), ("Yaml", Yaml.syntaxName), ("Zsh", Zsh.syntaxName)]
languageShortNames :: [(String, String)]
languageShortNames =
@@ -174,7 +175,7 @@
-- extension (if unique).
-- The parsers read the input lazily and parse line by line;
-- results are returned immediately.
--- Supported languages: @abc@, @actionscript@, @ada@, @agda@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @dockerfile@, @dot@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @elixir@, @email@, @erlang@, @fasm@, @fortran@, @fsharp@, @gcc@, @glsl@, @gnuassembler@, @go@, @hamlet@, @haskell@, @haxe@, @html@, @idris@, @ini@, @isocpp@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @kotlin@, @latex@, @lex@, @lilypond@, @literatecurry@, @literatehaskell@, @llvm@, @lua@, @m4@, @makefile@, @mandoc@, @markdown@, @mathematica@, @matlab@, @maxima@, @mediawiki@, @metafont@, @mips@, @modelines@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @opencl@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @pure@, @python@, @r@, @relaxng@, @relaxngcompact@, @rest@, @rhtml@, @roff@, @ruby@, @rust@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @tcsh@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@, @zsh@.
+-- Supported languages: @abc@, @actionscript@, @ada@, @agda@, @alert@, @alert_indent@, @apache@, @asn1@, @asp@, @ats@, @awk@, @bash@, @bibtex@, @boo@, @c@, @changelog@, @clojure@, @cmake@, @coffee@, @coldfusion@, @commonlisp@, @cpp@, @cs@, @css@, @curry@, @d@, @diff@, @djangotemplate@, @dockerfile@, @dot@, @doxygen@, @doxygenlua@, @dtd@, @eiffel@, @elixir@, @email@, @erlang@, @fasm@, @fortran@, @fsharp@, @gcc@, @glsl@, @gnuassembler@, @go@, @hamlet@, @haskell@, @haxe@, @html@, @idris@, @ini@, @isocpp@, @java@, @javadoc@, @javascript@, @json@, @jsp@, @julia@, @kotlin@, @latex@, @lex@, @lilypond@, @literatecurry@, @literatehaskell@, @llvm@, @lua@, @m4@, @makefile@, @mandoc@, @markdown@, @mathematica@, @matlab@, @maxima@, @mediawiki@, @metafont@, @mips@, @modelines@, @modula2@, @modula3@, @monobasic@, @nasm@, @noweb@, @objectivec@, @objectivecpp@, @ocaml@, @octave@, @opencl@, @pascal@, @perl@, @php@, @pike@, @postscript@, @prolog@, @pure@, @python@, @r@, @relaxng@, @relaxngcompact@, @rest@, @rhtml@, @roff@, @ruby@, @rust@, @scala@, @scheme@, @sci@, @sed@, @sgml@, @sql@, @sqlmysql@, @sqlpostgresql@, @tcl@, @tcsh@, @texinfo@, @verilog@, @vhdl@, @xml@, @xorg@, @xslt@, @xul@, @yacc@, @yaml@, @zsh@.
highlightAs :: String -- ^ Language syntax (e.g. "haskell") or extension (e.g. "hs").
-> String -- ^ Source code to highlight
-> [SourceLine] -- ^ List of highlighted source lines
@@ -199,6 +200,7 @@
"apache" -> Apache.highlight
"asn1" -> Asn1.highlight
"asp" -> Asp.highlight
+ "ats" -> Ats.highlight
"awk" -> Awk.highlight
"bash" -> Bash.highlight
"bibtex" -> Bibtex.highlight
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/changelog new/highlighting-kate-0.6.4/changelog
--- old/highlighting-kate-0.6.3/changelog 2016-07-22 06:56:57.000000000 +0200
+++ new/highlighting-kate-0.6.4/changelog 2017-01-31 11:29:12.000000000 +0100
@@ -1,3 +1,15 @@
+highlighting-kate 0.6.4 (31 Jan 2017)
+
+ * Add deprecation notice.
+ * Extend bounds for blaze-html (Simon Jacobi).
+ * Added syntax ats (Kiwamu Okabe).
+ * Added xml/language.dtd to cabal file.
+ * Update link to kate syntax highlighting documentation (Hadley Wickham).
+
+highlighting-kate 0.6.3 (18 Sep 2016)
+
+ * Updated kate syntax definitions and rebuilt parsers.
+
highlighting-kate 0.6.2.1 (01 Jul 2016)
* Use `#pop` instead of `#stay` if `fallthrough` is true but
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/highlighting-kate.cabal new/highlighting-kate-0.6.4/highlighting-kate.cabal
--- old/highlighting-kate-0.6.3/highlighting-kate.cabal 2016-09-18 20:19:02.000000000 +0200
+++ new/highlighting-kate-0.6.4/highlighting-kate.cabal 2017-01-31 11:30:23.000000000 +0100
@@ -1,5 +1,5 @@
Name: highlighting-kate
-Version: 0.6.3
+Version: 0.6.4
Cabal-Version: >= 1.10
Build-Type: Simple
Category: Text
@@ -13,6 +13,9 @@
with a utility for generating new parsers from Kate
XML syntax descriptions.
+ __This library has been deprecated.
+ Please use skylighting instead.__
+
License: GPL
License-file: LICENSE
Author: John MacFarlane
@@ -27,6 +30,7 @@
css/hk-kate.css
css/hk-pyg.css
css/hk-tango.css
+ xml/language.dtd
xml/*.xml
xml/*.xml.patch
tests/abc.ada
@@ -98,7 +102,7 @@
Library
Build-Depends: base >= 4.4 && < 5, containers,
- parsec, mtl, blaze-html >= 0.4.2 && < 0.9,
+ parsec, mtl, blaze-html >= 0.4.2 && < 0.10,
utf8-string
if flag(pcre-light)
Build-depends: pcre-light >= 0.4 && < 0.5, bytestring
@@ -122,6 +126,7 @@
Text.Highlighting.Kate.Syntax.Apache
Text.Highlighting.Kate.Syntax.Asn1
Text.Highlighting.Kate.Syntax.Asp
+ Text.Highlighting.Kate.Syntax.Ats
Text.Highlighting.Kate.Syntax.Awk
Text.Highlighting.Kate.Syntax.Bash
Text.Highlighting.Kate.Syntax.Bibtex
@@ -245,7 +250,7 @@
Executable highlighting-kate
Main-Is: highlighting-kate.hs
- Build-Depends: base, containers, blaze-html >= 0.4.2 && < 0.9, filepath,
+ Build-Depends: base, containers, blaze-html >= 0.4.2 && < 0.10, filepath,
highlighting-kate
Hs-Source-Dirs: extra
Default-Language: Haskell98
@@ -267,5 +272,5 @@
Main-Is: test-highlighting-kate.hs
Hs-Source-Dirs: tests
build-depends: base >= 4, directory, highlighting-kate, filepath,
- process, Diff, containers, blaze-html >= 0.4.2 && < 0.9
+ process, Diff, containers, blaze-html >= 0.4.2 && < 0.10
default-language: Haskell98
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/xml/ats.xml new/highlighting-kate-0.6.4/xml/ats.xml
--- old/highlighting-kate-0.6.3/xml/ats.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/highlighting-kate-0.6.4/xml/ats.xml 2016-12-09 14:38:39.000000000 +0100
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd"
+[
+<!-- Regular expresion constants: -->
+<!ENTITY LETTER "A-Za-z\0300-\0326\0330-\0366\0370-\0377"> <!-- Latin-1 letters. -->
+<!ENTITY IDENT "[&LETTER;_][&LETTER;0-9_']*"> <!-- ATS identifiers. -->
+<!ENTITY ESC "(\\[ntbr'"\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- ATS character code escapes. -->
+<!ENTITY DEC "[0-9][0-9_]*"> <!-- Decimal digits with underscores. -->
+]>
+<language name="ATS" version="0.01" kateversion="2.4" section="Sources" extensions="*.dats;*.sats;*.hats" mimetype="" author="Kiwamu Okabe (kiwamu(a)debian.or.jp)" license="LGPL">
+ <highlighting>
+ <list name="keywords">
+ <item> abstype </item>
+ <item> abst0ype </item>
+ <item> absprop </item>
+ <item> absview </item>
+ <item> absvtype </item>
+ <item> absviewtype </item>
+ <item> absvt0ype </item>
+ <item> absviewt0ype </item>
+ <item> and </item>
+ <item> as </item>
+ <item> assume </item>
+ <item> begin </item>
+ <item> break </item>
+ <item> continue </item>
+ <item> classdec </item>
+ <item> datasort </item>
+ <item> datatype </item>
+ <item> dataprop </item>
+ <item> dataview </item>
+ <item> datavtype </item>
+ <item> dataviewtype </item>
+ <item> do </item>
+ <item> dynload </item>
+ <item> else </item>
+ <item> end </item>
+ <item> exception </item>
+ <item> extern </item>
+ <item> extype </item>
+ <item> extval </item>
+ <item> if </item>
+ <item> in </item>
+ <item> infix </item>
+ <item> infixl </item>
+ <item> infixr </item>
+ <item> prefix </item>
+ <item> postfix </item>
+ <item> let </item>
+ <item> local </item>
+ <item> macdef </item>
+ <item> macrodef </item>
+ <item> nonfix </item>
+ <item> overload </item>
+ <item> of </item>
+ <item> op </item>
+ <item> rec </item>
+ <item> scase </item>
+ <item> sif </item>
+ <item> sortdef </item>
+ <item> sta </item>
+ <item> stacst </item>
+ <item> stadef </item>
+ <item> stavar </item>
+ <item> staload </item>
+ <item> symelim </item>
+ <item> symintr </item>
+ <item> then </item>
+ <item> try </item>
+ <item> tkindef </item>
+ <item> type </item>
+ <item> typedef </item>
+ <item> propdef </item>
+ <item> viewdef </item>
+ <item> vtypedef </item>
+ <item> viewtypedef </item>
+ <item> val </item>
+ <item> prval </item>
+ <item> var </item>
+ <item> prvar </item>
+ <item> when </item>
+ <item> where </item>
+ <item> for </item>
+ <item> while </item>
+ <item> with </item>
+ <item> withtype </item>
+ <item> withprop </item>
+ <item> withview </item>
+ <item> withvtype </item>
+ <item> withviewtype </item>
+ </list>
+ <list name="special keywords">
+ <item> $arrpsz </item>
+ <item> $arrptrsize </item>
+ <item> $delay </item>
+ <item> $ldelay </item>
+ <item> $effmask </item>
+ <item> $effmask_ntm </item>
+ <item> $effmask_exn </item>
+ <item> $effmask_ref </item>
+ <item> $effmask_wrt </item>
+ <item> $effmask_all </item>
+ <item> $extern </item>
+ <item> $extkind </item>
+ <item> $extype </item>
+ <item> $extype_struct </item>
+ <item> $extval </item>
+ <item> $lst </item>
+ <item> $lst_t </item>
+ <item> $lst_vt </item>
+ <item> $list </item>
+ <item> $list_t </item>
+ <item> $list_vt </item>
+ <item> $rec </item>
+ <item> $rec_t </item>
+ <item> $rec_vt </item>
+ <item> $record </item>
+ <item> $record_t </item>
+ <item> $record_vt </item>
+ <item> $tup </item>
+ <item> $tup_t </item>
+ <item> $tup_vt </item>
+ <item> $tuple </item>
+ <item> $tuple_t </item>
+ <item> $tuple_vt </item>
+ <item> $raise </item>
+ <item> $showtype </item>
+ <item> $myfilename </item>
+ <item> $mylocation </item>
+ <item> $myfunction </item>
+ <item> #assert </item>
+ <item> #define </item>
+ <item> #elif </item>
+ <item> #elifdef </item>
+ <item> #elifndef </item>
+ <item> #else </item>
+ <item> #endif </item>
+ <item> #error </item>
+ <item> #if </item>
+ <item> #ifdef </item>
+ <item> #ifndef </item>
+ <item> #include </item>
+ <item> #print </item>
+ <item> #then </item>
+ <item> #undef </item>
+ </list>
+ <list name="function keywords">
+ <item> fn </item>
+ <item> fnx </item>
+ <item> fun </item>
+ <item> prfn </item>
+ <item> prfun </item>
+ <item> praxi </item>
+ <item> castfn </item>
+ <item> implmnt </item>
+ <item> implement </item>
+ <item> primplmnt </item>
+ <item> primplement </item>
+ <item> lam </item>
+ <item> llam </item>
+ <item> fix </item>
+ </list>
+ <contexts>
+ <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
+ <StringDetect attribute="Comment" context="Rest-of-file Comment" String="////" beginRegion="comment" />
+ <Detect2Chars attribute="Comment" context="Multiline Comment" char="(" char1="*" beginRegion="comment" />
+ <Detect2Chars attribute="Comment" context="Multiline C-style Comment" char="/" char1="*" beginRegion="Comment"/>
+ <Detect2Chars attribute="Comment" context="Singleline C++ style Comment" char="/" char1="/"/>
+
+ <Detect2Chars attribute="Termination Metrics" context="Termination Metrics Context" char="." char1="<" />
+
+ <RegExpr attribute="Constructor" context="#stay" String="`\s*&IDENT;"/>
+
+ <!-- Identifiers and keywords. -->
+ <keyword attribute="Keyword" context="#stay" String="keywords" />
+ <keyword attribute="Function Keyword" context="Function Keyword Context" String="function keywords" />
+ <keyword attribute="Special Keyword" context="#stay" String="special keywords" />
+ <RegExpr attribute="Identifier" context="#stay" String="&IDENT;" />
+
+ <!-- Numeric constants. -->
+ <!-- Note that they may contain underscores. -->
+ <RegExpr attribute="Hexadecimal" context="#stay" String="~?0[xX][0-9A-Fa-f_]+" />
+ <RegExpr attribute="Float" context="#stay" String="~?&DEC;((\.(&DEC;)?([eE][-+]?&DEC;)?)|([eE][-+]?&DEC;))" />
+ <RegExpr attribute="Decimal" context="#stay" String="~?&DEC;" />
+ </context>
+
+ <context attribute="Comment" lineEndContext="#stay" name="Rest-of-file Comment"/>
+ <context attribute="Comment" lineEndContext="#stay" name="Multiline Comment">
+ <!-- Support for nested comments -->
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1=")" endRegion="comment" />
+ <Detect2Chars attribute="Comment" context="Multiline Comment" char="(" char1="*" beginRegion="comment" />
+ </context>
+ <context attribute="Comment" lineEndContext="#stay" name="Multiline C-style Comment">
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
+ </context>
+ <context attribute="Comment" lineEndContext="#pop" name="Singleline C++ style Comment"/>
+
+ <context attribute="String" lineEndContext="#stay" name="String Context">
+ <DetectChar attribute="String" context="#pop" char=""" />
+ <RegExpr attribute="Escaped characters" context="#stay" String="&ESC;" />
+ <!-- An underscore at the end of a line in a string indicates -->
+ <!-- that the string will continue on the next line. -->
+ <RegExpr attribute="Escaped characters" context="#stay" String="\\$" />
+ </context>
+
+ <context attribute="Termination Metrics" lineEndContext="#stay" name="Termination Metrics Context">
+ <Detect2Chars attribute="Termination Metrics" context="#pop" char=">" char1="." />
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="Function Keyword Context">
+ <DetectChar attribute="Normal text" context="#pop" char="=" />
+ <DetectChar attribute="Universal" context="Universal Context" char="{" />
+ <DetectChar attribute="Existential" context="Existential Context" char="[" />
+ <IncludeRules context="Normal"/>
+ </context>
+
+ <context attribute="Universal" lineEndContext="#stay" name="Universal Context">
+ <DetectChar attribute="Universal" context="#pop" char="}" />
+ </context>
+
+ <context attribute="Existential" lineEndContext="#stay" name="Existential Context">
+ <DetectChar attribute="Existential" context="#pop" char="]" />
+ </context>
+</contexts>
+
+ <itemDatas>
+ <itemData name="Normal Text" defStyleNum="dsNormal"/>
+ <itemData name="Identifier" defStyleNum="dsNormal"/>
+ <itemData name="Keyword" defStyleNum="dsKeyword"/>
+ <itemData name="Function Keyword" defStyleNum="dsKeyword"/>
+ <itemData name="Special Keyword" defStyleNum="dsDataType"/>
+ <itemData name="Termination Metrics" defStyleNum="dsDataType"/>
+ <itemData name="Universal" defStyleNum="dsDataType"/>
+ <itemData name="Existential" defStyleNum="dsDataType"/>
+ <itemData name="Decimal" defStyleNum="dsDecVal"/>
+ <itemData name="Hexadecimal" defStyleNum="dsBaseN"/>
+ <itemData name="Float" defStyleNum="dsFloat"/>
+ <itemData name="Character" defStyleNum="dsChar"/>
+ <itemData name="String" defStyleNum="dsString"/>
+ <itemData name="Comment" defStyleNum="dsComment"/>
+ <itemData name="Constructor" defStyleNum="dsDataType"/>
+ </itemDatas>
+ </highlighting>
+
+ <general>
+ <keywords casesensitive="1" />
+ <comments>
+ <comment name="singleLine" start="//" />
+ <comment name="multiLine" start="(*" end="*)" />
+ <comment name="multiLine" start="/*" end="*/" />
+ <comment name="multiLine" start="////" end="" />
+ </comments>
+ </general>
+</language>
+<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highlighting-kate-0.6.3/xml/language.dtd new/highlighting-kate-0.6.4/xml/language.dtd
--- old/highlighting-kate-0.6.3/xml/language.dtd 1970-01-01 01:00:00.000000000 +0100
+++ new/highlighting-kate-0.6.4/xml/language.dtd 2016-09-02 12:02:18.000000000 +0200
@@ -0,0 +1,556 @@
+<!--
+ Copyright (c) 2001 Joseph Wenninger <jowenn(a)kde.org>
+ modified (c) 2002 Anders Lund <anders(a)alweb.dk>
+ modified (c) 2003 Simon Huerlimann <simon.huerlimann(a)access.unizh.ch>
+ modified (c) 2005 Dominik Haumann <dhdev(a)gmx.de>
+ modified (c) 2008 Wilbert Berendsen <info(a)wilbertberendsen.nl>
+
+ This file describes the XML format used for syntax highlight descriptions
+ for the Kate text editor (http://kate.kde.org) which is part of the KDE
+ desktop environment (http://www.kde.org)
+ You'll find the "Writing a Kate Highlighting XML File HOWTO" at
+ http://kate.kde.org/doc/hlhowto.php
+
+ This format is identified using the SYSTEM identifier
+ SYSTEM "language.dtd"
+
+ Files using this format should include a DOCTYPE declaration like this:
+ <!DOCTYPE language SYSTEM "language.dtd">
+
+ You can validate your syntax files using checkXML from the development
+ package of kdelibs:
+ checkXML yourSyntax.xml
+ If you see any 'validity error' lines, you should fix them. If you get
+ a lot of 'No template matches' lines, everything's just fine. You've
+ produced a valid syntax file!
+
+ It's also possible to use the (much faster) xmllint which comes with the
+ GNOME (oops:-) XML Library libxml2:
+
+ xmllint - -dtdvalid language.dtd yourSyntax.xml
+ (don't use a space between the two - That's just because XML
+ comments don't allow that:-(
+
+ To use your syntax file, copy it to .kde/share/apps/katepart/syntax/ in
+ your home directory. You have to open a new instance of kwrite/kate to use
+ the new syntax file.
+
+TODO
+ - find a more readable way for the - -dtdvalid stuff, it's just annoying
+ xml comments don't allow it.
+-->
+
+<!-- Entity declarations
+ You can use '&per;' instead of '.'. This seems to be useful in <item> elements.
+
+TODO
+ - Are there any more such pre-defined entities?
+-->
+<!ENTITY per "." >
+
+<!-- Boolean type
+ Attributes that are of type boolean allow the following values:
+ 'true', 'TRUE' and '1' all meaning true,
+ 'false', FALSE' and '0' all meaning false.
+
+ It is encouraged to use 'true' and 'false' instead of the alternatives.
+-->
+<!ENTITY % boolean "true|false|TRUE|FALSE|0|1">
+
+<!-- Default Styles
+ Allowed predefined default styles for itemData, available are:
+ - dsNormal, used for normal text
+ - dsKeyword, used for keywords
+ - dsDataType, used for data types
+ - dsDecVal, used for decimal values
+ - dsBaseN, used for values with a base other than 10
+ - dsFloat, used for float values
+ - dsChar, used for a character
+ - dsString, used for strings
+ - dsComment, used for comments
+ - dsOthers, used for 'other' things
+ - dsAlert, used for warning messages
+ - dsFunction, used for function calls
+ - dsRegionMarker, used for region markers
+ - dsError, used for error highlighting.
+-->
+<!ENTITY % defStyles "dsNormal|dsKeyword|dsDataType|dsDecVal|dsBaseN|dsFloat|dsChar|dsString|dsComment|dsOthers|dsAlert|dsFunction|dsRegionMarker|dsError">
+
+<!-- Language specification
+ name: The name of this syntax description. Used in the Highlightning Mode menu
+ section: The logical group to which this syntax description belongs. Used for sub menus
+ extensions: A file glob or pattern to decide for which documents to use this syntax description
+ style: Attribute style that this highlighter provides to kate scripts [optional]
+ mimetype: A list of mimetypes to decide for which documents to use this syntax description [optional]
+ version: Version number of this syntax description [optional]
+ kateversion: Kate version required for using this file [optional]
+ casesensitive: Whether text is matched case sensitive. [boolean, optional, default=true] FIXME: This is not implemented yet
+ priority: Priority of this language, if more than one are usable for the file [optional]
+ author: Name of author of this hl file [optional]
+ license: License for this hl file [optional]
+ indenter: Name of the Indenter to use for this highlighting mode per default, like "cstyle" [optional]
+ hidden: Should it be hidden in menu [boolean, optional, default=false]
+
+TODO
+ - Which matches are affected by casesensitive? keyword, RegExpr, StringDetect, WordDetect...?
+
+WARNING: due to helper scripts, the language opening tag must be on a
+*single line* and *cannot* be split in multiple lines.
+
+-->
+<!ELEMENT language (highlighting, general?, spellchecking?)>
+<!ATTLIST language
+ name CDATA #REQUIRED
+ section NMTOKEN #REQUIRED
+ extensions CDATA #REQUIRED
+ version CDATA #REQUIRED
+ kateversion CDATA #REQUIRED
+ style CDATA #IMPLIED
+ mimetype CDATA #IMPLIED
+ casesensitive (%boolean;) #IMPLIED
+ priority CDATA #IMPLIED
+ author CDATA #IMPLIED
+ license CDATA #IMPLIED
+ indenter CDATA #IMPLIED
+ hidden (%boolean;) #IMPLIED
+>
+
+<!-- General options -->
+<!ELEMENT general (folding|comments|keywords|indentation|emptyLines)*>
+
+<!-- List of folding
+ indentationsensitive: If true, the code folding is indentation based.
+-->
+<!ELEMENT folding EMPTY>
+<!ATTLIST folding
+ indentationsensitive (%boolean;) #IMPLIED
+>
+
+<!-- List of comments -->
+<!ELEMENT comments (comment)+>
+
+<!-- Comment specification
+ name: Type of this comment. Allowed are 'singleLine' and 'multiLine'
+ start: The comment starts with this string
+ end: The comment ends with this string [optional]
+ region: The region name of the foldable multiline comment. If you have
+ beginRegion="Comment" ... endRegion="Comment" you should use
+ region="Comment". This way uncomment works even if you do not
+ select all the text of the multiline comment.
+ position: only availalbe for type singleLine. Default is column0, to insert
+ the single line comment characters after the whitespaces
+ (= before the first non space) set position to "afterwhitespace"
+-->
+<!ELEMENT comment EMPTY>
+<!ATTLIST comment
+ name (singleLine|multiLine) #REQUIRED
+ start CDATA #REQUIRED
+ end CDATA #IMPLIED
+ region CDATA #IMPLIED
+ position (afterwhitespace) #IMPLIED
+>
+
+<!-- Keyword options
+ casesensitive: Whether keywords are matched case sensitive. [boolean, optional, default=true]
+ weakDeliminator: Add weak deliminators [optional, default: ""]
+ additionalDeliminator: Add deliminators [optional]
+ wordWrapDeliminator: characters that are used to wrap long lines [optional]
+
+-->
+<!ELEMENT keywords EMPTY>
+<!ATTLIST keywords
+ casesensitive (%boolean;) #IMPLIED
+ weakDeliminator CDATA #IMPLIED
+ additionalDeliminator CDATA #IMPLIED
+ wordWrapDeliminator CDATA #IMPLIED
+>
+
+<!-- Indentation options
+ mode: indentation mode to use
+
+TODO
+ - Explain (weak) deliminators
+-->
+<!ELEMENT indentation EMPTY>
+<!ATTLIST indentation
+ mode CDATA #IMPLIED
+>
+
+<!-- Treat lines that match a given regular expression as empty line. This is
+ needed for example in Python for comments (#...), as then the indentation
+ based folding should ignore the line.
+ This is only implemented for indentation based folding. If the folding
+ is not indentation based, the emptyLines are not used.
+-->
+<!ELEMENT emptyLines (emptyLine*)>
+
+<!-- One empty line regular expression.
+ regexpr: The regular expression, example from python: ^\s*#.*$
+ casesensitive: Sets, whether the regular expression match is performed case sesitive
+-->
+<!ELEMENT emptyLine EMPTY>
+<!ATTLIST emptyLine
+ regexpr CDATA #REQUIRED
+ casesensitive (%boolean;) #IMPLIED
+>
+
+
+<!-- Highlighting specification -->
+<!ELEMENT highlighting (list*, contexts, itemDatas)>
+<!ATTLIST highlighting
+>
+
+<!-- List of items
+ name: Name of this list
+-->
+<!ELEMENT list (item)*>
+<!ATTLIST list
+ name CDATA #REQUIRED
+>
+
+<!-- List item
+ contains string used in <keyword>
+-->
+<!ELEMENT item (#PCDATA)>
+
+<!-- List of contexts -->
+<!ELEMENT contexts (context)+>
+
+<!-- context specification
+ name: The name of this context specification. Used in '*Context' attributes [optional]
+ attribute: The name of the ItemData to be used for matching text
+ lineEndContext: Next context if end of line is encountered
+ lineBeginContext: Next context if begin of line is encountered [optional]
+ fallthrough: Use a fallthrough context [optional]
+ fallthroughContext: Fall through to this context [optional]
+ dynamic: Dynamic context [boolean, optional]
+ noIndentationBasedFolding: Python uses indentation based folding. However, Python has parts where
+ it does not use indentation based folding (e.g. for """ strings). In this case
+ switch to an own context and set this attribute to true. Then the indentation
+ based folding will ignore this parts and not change folding markers. [optional]
+
+TODO:
+ - Explain fallthrough.
+ - Do we need fallthrough at all? It could be true, if fallthroughContext is set, false otherwise.
+ - Make lineEndContext optional, defaults to '#stay'. Reasonable?
+-->
+<!ELEMENT context (keyword | Float | HlCOct | HlCHex | HlCFloat | Int | DetectChar | Detect2Chars | AnyChar | StringDetect | WordDetect | RegExpr | LineContinue | HlCStringChar | RangeDetect | HlCChar | IncludeRules | DetectSpaces | DetectIdentifier)*>
+<!ATTLIST context
+ name CDATA #IMPLIED
+ attribute CDATA #REQUIRED
+ lineEndContext CDATA #REQUIRED
+ lineBeginContext CDATA #IMPLIED
+ fallthrough (%boolean;) #IMPLIED
+ fallthroughContext CDATA #IMPLIED
+ dynamic (%boolean;) #IMPLIED
+ noIndentationBasedFolding (%boolean;) #IMPLIED
+>
+
+<!-- Common attributes
+ attribute: The name of the ItemData to be used for matching text
+ context: The name of the context to go to when this rule matches
+ beginRegion: Begin a region of type beginRegion [optional]
+ endRegion: End a region of type endRegion [optional]
+ firstNonSpace: should this rule only match at first non-space char in line?
+ column: should this rule only match at given column in line (column == count of chars in front)
+-->
+<!ENTITY % commonAttributes
+ "attribute CDATA #IMPLIED
+ context CDATA #IMPLIED
+ beginRegion CDATA #IMPLIED
+ endRegion CDATA #IMPLIED
+ lookAhead (%boolean;) #IMPLIED
+ firstNonSpace (%boolean;) #IMPLIED
+ column CDATA #IMPLIED"
+>
+
+<!-- Detect members of a keyword list
+ commonAttributes: Common attributes
+ insensitive: Is this list case-insensitive? [boolean, optional, see note]
+ String: Name of the list
+ weakDelimiter: Use weak deliminator
+
+ By default, case sensitivity is determined from <keywords casesensitive> in
+ <general> (default=true), but can be overridden per-list with 'insensitive'.
+
+TODO:
+ - Should be weakDeliminator
+ - Explain deliminator
+ - Doesn't seem to be supported in highligh.cpp
+-->
+<!ELEMENT keyword EMPTY>
+<!ATTLIST keyword
+ %commonAttributes;
+ insensitive CDATA #IMPLIED
+ String CDATA #REQUIRED
+ weakDelimiter CDATA #IMPLIED
+>
+
+<!-- Detect a floating point number
+ commonAttributes: Common attributes
+ AnyChar is allowed as a child rule. TODO: The source code allows
+ *all* rules to be child rules, shall we change the DTD in some way?
+-->
+<!ELEMENT Float (AnyChar)*>
+<!ATTLIST Float
+ %commonAttributes;
+>
+
+<!-- Detect an octal number
+ commonAttributes: Common attributes
+-->
+<!ELEMENT HlCOct EMPTY>
+<!ATTLIST HlCOct
+ %commonAttributes;
+>
+
+<!-- Detect a hexadecimal number
+ commonAttributes: Common attributes
+-->
+<!ELEMENT HlCHex EMPTY>
+<!ATTLIST HlCHex
+ %commonAttributes;
+>
+
+<!-- Detect a C-style floating point number
+ commonAttributes: Common attributes
+-->
+<!ELEMENT HlCFloat EMPTY>
+<!ATTLIST HlCFloat
+ %commonAttributes;
+>
+
+<!-- Detect C-style character
+ commonAttributes: Common attributes
+
+TODO
+ - Did I get this right?
+-->
+<!ELEMENT HlCChar EMPTY>
+<!ATTLIST HlCChar
+ %commonAttributes;
+>
+
+<!-- Detect an integer number
+ commonAttributes: Common attributes
+ StringDetect is allowed as a child rule. TODO: The source code allows
+ *all* rules to be child rules, shall we change the DTD in some way?
+-->
+<!ELEMENT Int (StringDetect)*>
+<!ATTLIST Int
+ %commonAttributes;
+>
+
+<!-- Detect a single character
+ commonAttributes: Common attributes
+ char: The character to look for
+ dynamic: Uses 0 ... 9 as placeholders for dynamic arguments (in fact, first char of arg...) [boolean, optional, default=false]
+-->
+<!ELEMENT DetectChar EMPTY>
+<!ATTLIST DetectChar
+ %commonAttributes;
+ char CDATA #REQUIRED
+ dynamic (%boolean;) #IMPLIED
+>
+
+<!-- Detect two characters
+ commonAttributes: Common attributes
+ char: The first character
+ char1: The second character
+ dynamic: Uses 0 ... 9 as placeholders for dynamic arguments (in fact, first char of arg...) [boolean, optional, default=false]
+-->
+<!ELEMENT Detect2Chars EMPTY>
+<!ATTLIST Detect2Chars
+ %commonAttributes;
+ char CDATA #REQUIRED
+ char1 CDATA #REQUIRED
+ dynamic (%boolean;) #IMPLIED
+>
+
+<!-- Detect any group of characters
+ commonAttributes: Common attributes
+ String: A string representing the characters to look for
+
+TODO
+ - Description is not descriptive enough, I'm not sure what it exactly does:-(
+-->
+<!ELEMENT AnyChar EMPTY>
+<!ATTLIST AnyChar
+ %commonAttributes;
+ String CDATA #REQUIRED
+>
+
+<!-- Detect a string
+ commonAttributes: Common attributes
+ String: The string to look for
+ insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false]
+ dynamic: Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]
+
+TODO
+ - What's default of insensitive? I'm not sure...
+-->
+<!ELEMENT StringDetect EMPTY>
+<!ATTLIST StringDetect
+ %commonAttributes;
+ String CDATA #REQUIRED
+ insensitive (%boolean;) #IMPLIED
+ dynamic (%boolean;) #IMPLIED
+>
+
+<!-- Detect a word, i.e. a string at word boundaries
+ commonAttributes: Common attributes
+ String: The string to look for
+ insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false]
+ dynamic: Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]
+
+TODO
+ - What's default of insensitive? I'm not sure...
+-->
+<!ELEMENT WordDetect EMPTY>
+<!ATTLIST WordDetect
+ %commonAttributes;
+ String CDATA #REQUIRED
+ insensitive (%boolean;) #IMPLIED
+ dynamic (%boolean;) #IMPLIED
+>
+
+<!-- Detect a match of a regular expression
+ commonAttributes: Common attributes
+ String: The regular expression pattern
+ insensitive: Whether the text is matched case INsensitive. [boolean, optional, default=false]
+ minimal: Wheather to use minimal matching for wild cards in the pattern [boolean, optional, default='false']
+ dynamic: Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]
+-->
+<!ELEMENT RegExpr EMPTY>
+<!ATTLIST RegExpr
+ %commonAttributes;
+ String CDATA #REQUIRED
+ insensitive (%boolean;) #IMPLIED
+ minimal (%boolean;) #IMPLIED
+ dynamic (%boolean;) #IMPLIED
+>
+
+<!-- Detect a line continuation
+ commonAttributes: Common attributes
+-->
+<!ELEMENT LineContinue EMPTY>
+<!ATTLIST LineContinue
+ %commonAttributes;
+>
+
+<!-- Detect a C-style escaped character
+ commonAttributes: Common attributes
+
+TODO:
+ - Did I get this right? Only one character, or a string?
+-->
+<!ELEMENT HlCStringChar EMPTY>
+<!ATTLIST HlCStringChar
+ %commonAttributes;
+>
+
+<!-- Detect a range of characters
+ commonAttributes: Common attributes
+ char: The character starting the range
+ char1: The character terminating the range
+-->
+<!ELEMENT RangeDetect EMPTY>
+<!ATTLIST RangeDetect
+ %commonAttributes;
+ char CDATA #REQUIRED
+ char1 CDATA #REQUIRED
+>
+
+<!-- Include Rules of another context
+ context: The name of the context to include
+ includeAttrib: If this is true, the host context of the IncludeRules
+ will be given the attribute of the source context
+-->
+<!ELEMENT IncludeRules EMPTY>
+<!ATTLIST IncludeRules
+ context CDATA #REQUIRED
+ includeAttrib (%boolean;) #IMPLIED
+>
+
+<!-- Detect all following Spaces
+-->
+<!ELEMENT DetectSpaces EMPTY>
+<!ATTLIST DetectSpaces
+ %commonAttributes;
+>
+
+<!-- Detect an Identifier ( == LETTER(LETTER|NUMBER|_)*)
+ -->
+<!ELEMENT DetectIdentifier EMPTY>
+<!ATTLIST DetectIdentifier
+ %commonAttributes;
+>
+
+<!-- List of attributes -->
+<!ELEMENT itemDatas (itemData)+>
+<!ATTLIST itemDatas
+>
+
+<!-- Attribute specification
+ name CDATA #REQUIRED The name of this attribute
+ defStyleNum CDATA #REQUIRED The index of the default style to use
+ color CDATA #IMPLIED Color for this style, either a hex triplet, a name or some other format recognized by Qt [optional]
+ selColor CDATA #IMPLIED The color for this style when text is selected [optional]
+ italic CDATA #IMPLIED Whether this attribute should be rendered using an italic typeface [optional, boolean, default=false]
+ bold CDATA #IMPLIED Whether this attribute should be renederd using a bold typeface [optional, boolean, default=false]
+ underline CDATA #IMPLIED Whether this attribute should be underlined [optional, boolean, default=false]
+ strikeOut CDATA #IMPLIED Whether this attribute should be striked out [optional, boolean, default=false]
+ backgroundColor CDATA #IMPLIED The background color for this style [optional]
+ selBackgroundColor CDATA #IMPLIED The background color for this style when text is selected [optional]
+ spellChecking CDATA #IMPLIED Whether this attribute should be spell checked [optional, boolean, default=true]
+-->
+<!ELEMENT itemData EMPTY>
+<!ATTLIST itemData
+ name CDATA #REQUIRED
+ defStyleNum (%defStyles;) #REQUIRED
+ color CDATA #IMPLIED
+ selColor CDATA #IMPLIED
+ italic (%boolean;) #IMPLIED
+ bold (%boolean;) #IMPLIED
+ underline (%boolean;) #IMPLIED
+ strikeOut (%boolean;) #IMPLIED
+ backgroundColor CDATA #IMPLIED
+ selBackgroundColor CDATA #IMPLIED
+ spellChecking (%boolean;) #IMPLIED
+>
+
+<!-- encodingPolicy type
+ Attributes that are of type 'encodingPolicy' allow the following values:
+ 'EncodeAlways', 'EncodeWhenPresent' and 'EncodeNever'
+-->
+<!ENTITY % encodingPolicy "EncodeAlways|EncodeWhenPresent|EncodeNever">
+
+<!-- Spellchecking specification -->
+<!ELEMENT spellchecking (configuration?, encodings?)>
+<!ATTLIST spellchecking
+>
+
+<!-- List of character encodings -->
+<!ELEMENT encodings (encoding)+>
+<!ATTLIST encodings
+>
+
+<!-- Encoding specification
+ sequence CDATA #REQUIRED Character sequence of the encoding; must not contain new-line characters, i.e. \n or \r
+ character CDATA #IMPLIED Encoded character; must be of length 1
+ ignored (%boolean;) #IMPLIED If true, then the encoding sequence is ignored for spellchecking
+-->
+<!ELEMENT encoding EMPTY>
+<!ATTLIST encoding
+ string CDATA #REQUIRED
+ char CDATA #IMPLIED
+ ignored (%boolean;) #IMPLIED
+>
+
+<!-- Spellchecking configuration
+ encodingReplacementPolicy (%encodingPolicy;) #IMPLIED Policy for replacing encoded characters in replacements for misspelled words
+-->
+<!ELEMENT configuration EMPTY>
+<!ATTLIST configuration
+ encodingReplacementPolicy (%encodingPolicy;) #IMPLIED
+>
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-yesod-form for openSUSE:Factory checked in at 2017-02-21 13:46:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-form (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-form.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-form"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-form/ghc-…
[View More]yesod-form.changes 2016-12-10 18:26:57.440724466 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-form.new/ghc-yesod-form.changes 2017-02-21 13:46:17.266668712 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:31:59 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.4.10 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
yesod-form-1.4.9.tar.gz
New:
----
yesod-form-1.4.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-form.spec ++++++
--- /var/tmp/diff_new_pack.6zEAx8/_old 2017-02-21 13:46:18.026561508 +0100
+++ /var/tmp/diff_new_pack.6zEAx8/_new 2017-02-21 13:46:18.030560945 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-yesod-form
#
-# 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,7 +19,7 @@
%global pkg_name yesod-form
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.4.9
+Version: 1.4.10
Release: 0
Summary: Form handling support for Yesod Web Framework
License: MIT
++++++ yesod-form-1.4.9.tar.gz -> yesod-form-1.4.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.9/ChangeLog.md new/yesod-form-1.4.10/ChangeLog.md
--- old/yesod-form-1.4.9/ChangeLog.md 2016-11-14 06:18:27.000000000 +0100
+++ new/yesod-form-1.4.10/ChangeLog.md 2017-02-02 08:54:00.000000000 +0100
@@ -1,3 +1,7 @@
+## 1.4.10
+
+* Fixed `identifyForm` to properly return `FormMissing` for empty forms. [#1072](https://github.com/yesodweb/yesod/issues/1072)
+
## 1.4.9
* Added a `ToValue` instance for `Enctype` [#1296](https://github.com/yesodweb/yesod/pull/1296)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.9/Yesod/Form/Functions.hs new/yesod-form-1.4.10/Yesod/Form/Functions.hs
--- old/yesod-form-1.4.9/Yesod/Form/Functions.hs 2016-11-14 06:18:27.000000000 +0100
+++ new/yesod-form-1.4.10/Yesod/Form/Functions.hs 2017-02-02 08:54:00.000000000 +0100
@@ -62,7 +62,7 @@
import Yesod.Core.Handler (defaultCsrfParamName)
import Network.Wai (requestMethod)
import Text.Hamlet (shamlet)
-import Data.Monoid (mempty)
+import Data.Monoid (mempty, (<>))
import Data.Maybe (listToMaybe, fromMaybe)
import qualified Data.Map as Map
import qualified Data.Text.Encoding as TE
@@ -336,13 +336,13 @@
-- Create hidden <input>.
let fragment' =
[shamlet|
- <input type=hidden name=#{identifyFormKey} value=#{identVal}>
+ <input type=hidden name=#{identifyFormKey} value=identify-#{identVal}>
#{fragment}
|]
-- Check if we got its value back.
mp <- askParams
- let missing = (mp >>= Map.lookup identifyFormKey) /= Just [identVal]
+ let missing = (mp >>= Map.lookup identifyFormKey) /= Just ["identify-" <> identVal]
-- Run the form proper (with our hidden <input>). If the
-- data is missing, then do not provide any params to the
@@ -350,7 +350,11 @@
-- doing this avoids having lots of fields with red errors.
let eraseParams | missing = local (\(_, h, l) -> (Nothing, h, l))
| otherwise = id
- eraseParams (form fragment')
+ ( res', w) <- eraseParams (form fragment')
+
+ -- Empty forms now properly return FormMissing. [#1072](https://github.com/yesodweb/yesod/issues/1072)
+ let res = if missing then FormMissing else res'
+ return ( res, w)
identifyFormKey :: Text
identifyFormKey = "_formid"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-form-1.4.9/yesod-form.cabal new/yesod-form-1.4.10/yesod-form.cabal
--- old/yesod-form-1.4.9/yesod-form.cabal 2016-11-14 06:18:27.000000000 +0100
+++ new/yesod-form-1.4.10/yesod-form.cabal 2017-02-02 08:54:00.000000000 +0100
@@ -1,5 +1,5 @@
name: yesod-form
-version: 1.4.9
+version: 1.4.10
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-yesod-core for openSUSE:Factory checked in at 2017-02-21 13:46:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-core (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-core"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-core/ghc-…
[View More]yesod-core.changes 2017-02-03 17:40:39.427597549 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-core.new/ghc-yesod-core.changes 2017-02-21 13:46:10.247658930 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:31:39 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.4.31 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
yesod-core-1.4.30.tar.gz
yesod-core.cabal
New:
----
yesod-core-1.4.31.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-core.spec ++++++
--- /var/tmp/diff_new_pack.FLg55k/_old 2017-02-21 13:46:10.691596301 +0100
+++ /var/tmp/diff_new_pack.FLg55k/_new 2017-02-21 13:46:10.695595736 +0100
@@ -19,14 +19,13 @@
%global pkg_name yesod-core
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.4.30
+Version: 1.4.31
Release: 0
Summary: Creation of type-safe, RESTful web applications
License: MIT
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-auto-update-devel
@@ -105,7 +104,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -128,5 +126,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc ChangeLog.md README.md
%changelog
++++++ yesod-core-1.4.30.tar.gz -> yesod-core-1.4.31.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.30/ChangeLog.md new/yesod-core-1.4.31/ChangeLog.md
--- old/yesod-core-1.4.30/ChangeLog.md 2016-12-11 14:34:13.000000000 +0100
+++ new/yesod-core-1.4.31/ChangeLog.md 2017-02-02 06:52:44.000000000 +0100
@@ -1,3 +1,7 @@
+## 1.4.31
+
+* Add `parseCheckJsonBody` and `requireCheckJsonBody`
+
## 1.4.30
* Add `defaultMessageWidget`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.30/Yesod/Core/Json.hs new/yesod-core-1.4.31/Yesod/Core/Json.hs
--- old/yesod-core-1.4.30/Yesod/Core/Json.hs 2016-12-11 14:34:13.000000000 +0100
+++ new/yesod-core-1.4.31/Yesod/Core/Json.hs 2017-02-02 06:54:42.000000000 +0100
@@ -13,8 +13,10 @@
-- * Convert to a JSON value
, parseJsonBody
+ , parseCheckJsonBody
, parseJsonBody_
, requireJsonBody
+ , requireCheckJsonBody
-- * Produce JSON values
, J.Value (..)
@@ -33,7 +35,7 @@
, acceptsJson
) where
-import Yesod.Core.Handler (HandlerT, getRequest, invalidArgs, redirect, selectRep, provideRep, rawRequestBody, ProvidedRep)
+import Yesod.Core.Handler (HandlerT, getRequest, invalidArgs, redirect, selectRep, provideRep, rawRequestBody, ProvidedRep, lookupHeader)
import Control.Monad.Trans.Writer (Writer)
import Data.Monoid (Endo)
import Yesod.Core.Content (TypedContent)
@@ -121,6 +123,15 @@
Left e -> J.Error $ show e
Right value -> J.fromJSON value
+-- | Same as 'parseJsonBody', but ensures that the mime type indicates
+-- JSON content.
+parseCheckJsonBody :: (MonadHandler m, J.FromJSON a) => m (J.Result a)
+parseCheckJsonBody = do
+ mct <- lookupHeader "content-type"
+ case fmap (B8.takeWhile (/= ';')) mct of
+ Just "application/json" -> parseJsonBody
+ _ -> return $ J.Error $ "Non-JSON content type: " ++ show mct
+
-- | Same as 'parseJsonBody', but return an invalid args response on a parse
-- error.
parseJsonBody_ :: (MonadHandler m, J.FromJSON a) => m a
@@ -135,6 +146,15 @@
case ra of
J.Error s -> invalidArgs [pack s]
J.Success a -> return a
+
+-- | Same as 'requireJsonBody', but ensures that the mime type
+-- indicates JSON content.
+requireCheckJsonBody :: (MonadHandler m, J.FromJSON a) => m a
+requireCheckJsonBody = do
+ ra <- parseCheckJsonBody
+ case ra of
+ J.Error s -> invalidArgs [pack s]
+ J.Success a -> return a
-- | Convert a list of values to an 'J.Array'.
array :: J.ToJSON a => [a] -> J.Value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.30/Yesod/Core.hs new/yesod-core-1.4.31/Yesod/Core.hs
--- old/yesod-core-1.4.30/Yesod/Core.hs 2016-12-11 14:34:13.000000000 +0100
+++ new/yesod-core-1.4.31/Yesod/Core.hs 2017-01-19 14:53:56.000000000 +0100
@@ -18,7 +18,7 @@
, Approot (..)
, FileUpload (..)
, ErrorResponse (..)
- -- * Utitlities
+ -- * Utilities
, maybeAuthorized
, widgetToPageContent
-- * Defaults
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.30/Yesod/Routes/TH/RenderRoute.hs new/yesod-core-1.4.31/Yesod/Routes/TH/RenderRoute.hs
--- old/yesod-core-1.4.30/Yesod/Routes/TH/RenderRoute.hs 2016-12-11 14:34:13.000000000 +0100
+++ new/yesod-core-1.4.31/Yesod/Routes/TH/RenderRoute.hs 2017-01-08 23:10:45.000000000 +0100
@@ -46,7 +46,9 @@
mkRouteCon (ResourceParent name _check pieces children) = do
(cons, decs) <- mkRouteCons children
-#if MIN_VERSION_template_haskell(2,11,0)
+#if MIN_VERSION_template_haskell(2,12,0)
+ dec <- DataD [] (mkName name) [] Nothing cons <$> fmap (pure . DerivClause Nothing) (mapM conT [''Show, ''Read, ''Eq])
+#elif MIN_VERSION_template_haskell(2,11,0)
dec <- DataD [] (mkName name) [] Nothing cons <$> mapM conT [''Show, ''Read, ''Eq]
#else
let dec = DataD [] (mkName name) [] cons [''Show, ''Read, ''Eq]
@@ -153,7 +155,9 @@
mkRenderRouteInstance' cxt typ ress = do
cls <- mkRenderRouteClauses ress
(cons, decs) <- mkRouteCons ress
-#if MIN_VERSION_template_haskell(2,11,0)
+#if MIN_VERSION_template_haskell(2,12,0)
+ did <- DataInstD [] ''Route [typ] Nothing cons <$> fmap (pure . DerivClause Nothing) (mapM conT clazzes)
+#elif MIN_VERSION_template_haskell(2,11,0)
did <- DataInstD [] ''Route [typ] Nothing cons <$> mapM conT clazzes
#else
let did = DataInstD [] ''Route [typ] cons clazzes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.30/yesod-core.cabal new/yesod-core-1.4.31/yesod-core.cabal
--- old/yesod-core-1.4.30/yesod-core.cabal 2016-12-11 14:34:13.000000000 +0100
+++ new/yesod-core-1.4.31/yesod-core.cabal 2017-02-03 06:23:23.000000000 +0100
@@ -1,5 +1,5 @@
name: yesod-core
-version: 1.4.30
+version: 1.4.31
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
@@ -47,7 +47,7 @@
, case-insensitive >= 0.2
, parsec >= 2 && < 3.2
, directory >= 1
- , vector >= 0.9 && < 0.12
+ , vector >= 0.9 && < 0.13
, aeson >= 0.5
, fast-logger >= 2.2
, wai-logger >= 0.2
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-warp for openSUSE:Factory checked in at 2017-02-21 13:46:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-warp (Old)
and /work/SRC/openSUSE:Factory/.ghc-warp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-warp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-warp/ghc-warp.changes 2016-12-09 09:38:00.…
[View More]206358895 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-warp.new/ghc-warp.changes 2017-02-21 13:46:02.336774970 +0100
@@ -1,0 +2,10 @@
+Sun Feb 5 19:32:29 UTC 2017 - psimons(a)suse.com
+
+- Update to version 3.2.11 with cabal2obs.
+
+-------------------------------------------------------------------
+Mon Jan 30 09:34:53 UTC 2017 - psimons(a)suse.com
+
+- Update to version 3.2.10 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
warp-3.2.9.tar.gz
New:
----
warp-3.2.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-warp.spec ++++++
--- /var/tmp/diff_new_pack.plI5vy/_old 2017-02-21 13:46:03.160658740 +0100
+++ /var/tmp/diff_new_pack.plI5vy/_new 2017-02-21 13:46:03.160658740 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-warp
#
-# 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,7 +19,7 @@
%global pkg_name warp
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 3.2.9
+Version: 3.2.11
Release: 0
Summary: A fast, light-weight web server for WAI applications
License: MIT
++++++ warp-3.2.9.tar.gz -> warp-3.2.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/ChangeLog.md new/warp-3.2.11/ChangeLog.md
--- old/warp-3.2.9/ChangeLog.md 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/ChangeLog.md 2017-02-02 02:57:32.000000000 +0100
@@ -1,6 +1,14 @@
+## 3.2.11
+
+* Fixing 10 HTTP2 bugs pointed out by h2spec v2.
+
+## 3.2.10
+
+* Add `connFree` to `Connection`. Close socket connections on timeout triggered. Timeout exceptions extend from `SomeAsyncException`. [#602](https://github.com/yesodweb/wai/pull/602) [#605](https://github.com/yesodweb/wai/pull/605)
+
## 3.2.9
-* Fixing a space leak. [#586] https://github.com/yesodweb/wai/pull/586
+* Fixing a space leak. [#586](https://github.com/yesodweb/wai/pull/586)
## 3.2.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/HPACK.hs new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/HPACK.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/HPACK.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/HPACK.hs 2017-02-02 02:57:32.000000000 +0100
@@ -83,13 +83,16 @@
{-# INLINE checkRequestHeader #-}
checkRequestHeader :: ValueTable -> Bool
checkRequestHeader reqvt
+ | just mMethod (== "CONNECT") = mPath == Nothing && mScheme == Nothing
| mStatus /= Nothing = False
| mMethod == Nothing = False
+ | mScheme == Nothing = False
+ | mPath == Nothing = False
+ | mPath == Just "" = False
| mAuthority == Nothing = False
| mConnection /= Nothing = False
| just mTE (/= "trailers") = False
- | just mMethod (== "CONNECT") = mPath == Nothing && mScheme == Nothing
- | otherwise = mPath /= Nothing
+ | otherwise = True
where
mStatus = getHeaderValue tokenStatus reqvt
mScheme = getHeaderValue tokenScheme reqvt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Receiver.hs new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Receiver.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Receiver.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Receiver.hs 2017-02-02 02:57:32.000000000 +0100
@@ -159,6 +159,8 @@
when (ftyp == FrameHeaders) $ do
st <- readIORef $ streamState strm0
when (isHalfClosed st) $ E.throwIO $ ConnectionError StreamClosed "header must not be sent to half closed"
+ -- Priority made an idele stream
+ when (isIdle st) $ opened ctx strm0
return js
Nothing
| isResponse streamId -> return Nothing
@@ -166,19 +168,23 @@
when (ftyp `notElem` [FrameHeaders,FramePriority]) $
E.throwIO $ ConnectionError ProtocolError "this frame is not allowed in an idel stream"
csid <- readIORef clientStreamId
- when (streamId <= csid) $
- E.throwIO $ ConnectionError ProtocolError "stream identifier must not decrease"
- when (ftyp == FrameHeaders) $ do
- writeIORef clientStreamId streamId
- cnt <- readIORef concurrency
- -- Checking the limitation of concurrency
- when (cnt >= maxConcurrency) $
- E.throwIO $ StreamError RefusedStream streamId
- ws <- initialWindowSize <$> readIORef http2settings
- newstrm <- newStream streamId (fromIntegral ws)
- when (ftyp == FrameHeaders) $ opened ctx newstrm
- insert streamTable streamId newstrm
- return $ Just newstrm
+ if streamId <= csid then do
+ if ftyp == FramePriority then
+ return Nothing -- will be ignored
+ else
+ E.throwIO $ ConnectionError ProtocolError "stream identifier must not decrease"
+ else do
+ when (ftyp == FrameHeaders) $ do
+ writeIORef clientStreamId streamId
+ cnt <- readIORef concurrency
+ -- Checking the limitation of concurrency
+ when (cnt >= maxConcurrency) $
+ E.throwIO $ StreamError RefusedStream streamId
+ ws <- initialWindowSize <$> readIORef http2settings
+ newstrm <- newStream streamId (fromIntegral ws)
+ when (ftyp == FrameHeaders) $ opened ctx newstrm
+ insert streamTable streamId newstrm
+ return $ Just newstrm
consume = void . recvN
@@ -191,14 +197,18 @@
----------------------------------------------------------------
control :: FrameTypeId -> FrameHeader -> ByteString -> Context -> IO Bool
-control FrameSettings header@FrameHeader{flags} bs Context{http2settings, controlQ,firstSettings} = do
+control FrameSettings header@FrameHeader{flags} bs Context{http2settings, controlQ, firstSettings, streamTable} = do
SettingsFrame alist <- guardIt $ decodeSettingsFrame header bs
case checkSettingsList alist of
Just x -> E.throwIO x
Nothing -> return ()
-- HTTP/2 Setting from a browser
unless (testAck flags) $ do
+ oldws <- initialWindowSize <$> readIORef http2settings
modifyIORef' http2settings $ \old -> updateSettings old alist
+ newws <- initialWindowSize <$> readIORef http2settings
+ let diff = newws - oldws
+ when (diff /= 0) $ updateAllStreamWindow (+ diff) streamTable
let !frame = settingsFrame setAck []
sent <- readIORef firstSettings
let !setframe
@@ -210,7 +220,7 @@
control FramePing FrameHeader{flags} bs Context{controlQ} =
if testAck flags then
- E.throwIO $ ConnectionError ProtocolError "the ack flag of this ping frame must not be set"
+ return True -- just ignore
else do
let !frame = pingFrame bs
enqueueControl controlQ $ CFrame frame
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Types.hs new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Types.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Types.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Types.hs 2017-02-02 02:57:32.000000000 +0100
@@ -11,7 +11,7 @@
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Control.Exception (SomeException, bracket)
-import Control.Monad (void)
+import Control.Monad (void, forM_)
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.IntMap.Strict (IntMap, IntMap)
@@ -256,6 +256,11 @@
search :: StreamTable -> M.Key -> IO (Maybe Stream)
search (StreamTable ref) k = M.lookup k <$> readIORef ref
+updateAllStreamWindow :: (WindowSize -> WindowSize) -> StreamTable -> IO ()
+updateAllStreamWindow adst (StreamTable ref) = do
+ strms <- M.elems <$> readIORef ref
+ forM_ strms $ \strm -> atomically $ modifyTVar (streamWindow strm) adst
+
{-# INLINE forkAndEnqueueWhenReady #-}
forkAndEnqueueWhenReady :: IO () -> PriorityTree Output -> Output -> Manager -> IO ()
forkAndEnqueueWhenReady wait outQ out mgr = bracket setup teardown $ \_ ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Worker.hs new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Worker.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/HTTP2/Worker.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/HTTP2/Worker.hs 2017-02-02 02:57:32.000000000 +0100
@@ -236,7 +236,8 @@
worker ctx@Context{inputQ,controlQ} set app responder tm = do
sinfo <- newStreamInfo
tcont <- newThreadContinue
- E.bracket (T.registerKillThread tm) T.cancel $ go sinfo tcont
+ let timeoutAction = return () -- cannot close the shared connection
+ E.bracket (T.registerKillThread tm timeoutAction) T.cancel $ go sinfo tcont
where
go sinfo tcont th = do
setThreadContinue tcont True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/Run.hs new/warp-3.2.11/Network/Wai/Handler/Warp/Run.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/Run.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/Run.hs 2017-02-02 02:57:32.000000000 +0100
@@ -24,8 +24,8 @@
import Data.Streaming.Network (bindPortTCP)
import Foreign.C.Error (Errno(..), eCONNABORTED)
import GHC.IO.Exception (IOException(..))
-import Network (sClose, Socket)
-import Network.Socket (accept, withSocketsDo, SockAddr(SockAddrInet, SockAddrInet6), setSocketOption, SocketOption(..))
+import Network (Socket)
+import Network.Socket (close, accept, withSocketsDo, SockAddr(SockAddrInet, SockAddrInet6), setSocketOption, SocketOption(..))
import qualified Network.Socket.ByteString as Sock
import Network.Wai
import Network.Wai.Handler.Warp.Buffer
@@ -35,6 +35,7 @@
import qualified Network.Wai.Handler.Warp.FileInfoCache as I
import Network.Wai.Handler.Warp.HTTP2 (http2, isHTTP2)
import Network.Wai.Handler.Warp.Header
+import Network.Wai.Handler.Warp.IORef
import Network.Wai.Handler.Warp.ReadInt
import Network.Wai.Handler.Warp.Recv
import Network.Wai.Handler.Warp.Request
@@ -63,7 +64,8 @@
connSendMany = Sock.sendMany s
, connSendAll = sendall
, connSendFile = sendFile s writeBuf bufferSize sendall
- , connClose = sClose s >> freeBuffer writeBuf
+ , connClose = close s
+ , connFree = freeBuffer writeBuf
, connRecv = receive s bufferPool
, connRecvBuf = receiveBuf s
, connWriteBuffer = writeBuf
@@ -104,7 +106,7 @@
runSettings set app = withSocketsDo $
bracket
(bindPortTCP (settingsPort set) (settingsHost set))
- sClose
+ close
(\socket -> do
setSocketCloseOnExec socket
runSettingsSocket set socket app)
@@ -137,7 +139,7 @@
conn <- socketConnection s
return (conn, sa)
- closeListenSocket = sClose socket
+ closeListenSocket = close socket
-- | The connection setup action would be expensive. A good example
-- is initialization of TLS.
@@ -262,6 +264,10 @@
-> InternalInfo0
-> IO ()
fork set mkConn addr app counter ii0 = settingsFork set $ \ unmask ->
+ -- Allocate a new IORef indicating whether the connection has been
+ -- closed, to avoid double-freeing a connection
+ withClosedRef $ \ref ->
+
-- Run the connection maker to get a new connection, and ensure
-- that the connection is closed. If the mkConn call throws an
-- exception, we will leak the connection. If the mkConn call is
@@ -272,11 +278,14 @@
-- We grab the connection before registering timeouts since the
-- timeouts will be useless during connection creation, due to the
-- fact that async exceptions are still masked.
- bracket mkConn closeConn $ \(conn, transport) ->
+ bracket mkConn (\(conn, _) -> closeConn ref conn `finally` connFree conn)
+ $ \(conn, transport) ->
-- We need to register a timeout handler for this thread, and
- -- cancel that handler as soon as we exit.
- bracket (T.registerKillThread (timeoutManager0 ii0)) T.cancel $ \th ->
+ -- cancel that handler as soon as we exit. We additionally close
+ -- the connection immediately in case the child thread catches the
+ -- async exception or performs some long-running cleanup action.
+ bracket (T.registerKillThread (timeoutManager0 ii0) (closeConn ref conn)) T.cancel $ \th ->
let ii1 = toInternalInfo1 ii0 th
-- We now have fully registered a connection close handler
@@ -294,7 +303,11 @@
-- bracket with closeConn above ensures the connection is closed.
when goingon $ serveConnection conn ii1 addr transport set app
where
- closeConn (conn, _transport) = connClose conn
+ withClosedRef inner = newIORef False >>= inner
+
+ closeConn ref conn = do
+ isClosed <- atomicModifyIORef' ref $ \x -> (True, x)
+ unless isClosed $ connClose conn
onOpen adr = increase counter >> settingsOnOpen set adr
onClose adr _ = decrease counter >> settingsOnClose set adr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/Timeout.hs new/warp-3.2.11/Network/Wai/Handler/Warp/Timeout.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/Timeout.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/Timeout.hs 2017-02-02 02:57:32.000000000 +0100
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Network.Wai.Handler.Warp.Timeout (
@@ -97,19 +98,24 @@
return h
-- | Registering a timeout action of killing this thread.
-registerKillThread :: Manager -> IO Handle
-registerKillThread m = do
+registerKillThread :: Manager -> TimeoutAction -> IO Handle
+registerKillThread m onTimeout = do
-- If we hold ThreadId, the stack and data of the thread is leaked.
-- If we hold Weak ThreadId, the stack is released. However, its
-- data is still leaked probably because of a bug of GHC.
-- So, let's just use ThreadId and release ThreadId by
-- overriding the timeout action by "cancel".
tid <- myThreadId
- register m $ E.throwTo tid TimeoutThread
+ -- First run the timeout action in case the child thread is masked.
+ register m $ onTimeout `E.finally` E.throwTo tid TimeoutThread
data TimeoutThread = TimeoutThread
deriving Typeable
-instance E.Exception TimeoutThread
+instance E.Exception TimeoutThread where
+#if MIN_VERSION_base(4,7,0)
+ toException = E.asyncExceptionToException
+ fromException = E.asyncExceptionFromException
+#endif
instance Show TimeoutThread where
show TimeoutThread = "Thread killed by Warp's timeout reaper"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp/Types.hs new/warp-3.2.11/Network/Wai/Handler/Warp/Types.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp/Types.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp/Types.hs 2017-02-02 02:57:32.000000000 +0100
@@ -92,8 +92,13 @@
, connSendAll :: ByteString -> IO ()
-- | The sending function for files in HTTP/1.1.
, connSendFile :: SendFile
- -- | The connection closing function.
+ -- | The connection closing function. Warp guarantees it will only be
+ -- called once. Other functions (like 'connRecv') may be called after
+ -- 'connClose' is called.
, connClose :: IO ()
+ -- | Free any buffers allocated. Warp guarantees it will only be
+ -- called once, and no other functions will be called after it.
+ , connFree :: IO ()
-- | The connection receiving function. This returns "" for EOF.
, connRecv :: Recv
-- | The connection receiving function. This tries to fill the buffer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/Network/Wai/Handler/Warp.hs new/warp-3.2.11/Network/Wai/Handler/Warp.hs
--- old/warp-3.2.9/Network/Wai/Handler/Warp.hs 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/Network/Wai/Handler/Warp.hs 2017-02-02 02:57:32.000000000 +0100
@@ -286,6 +286,16 @@
-- handler. The handler should call the first argument,
-- which closes the listen socket, at shutdown.
--
+-- Example usage:
+--
+-- @
+-- settings :: IO () -> 'Settings'
+-- settings shutdownAction = 'setInstallShutdownHandler' shutdownHandler 'defaultSettings'
+-- __where__
+-- shutdownHandler closeSocket =
+-- void $ 'System.Posix.Signals.installHandler' 'System.Posix.Signals.sigTERM' ('System.Posix.Signals.Catch' $ shutdownAction >> closeSocket) 'Nothing'
+-- @
+--
-- Default: does not install any code.
--
-- Since 3.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-3.2.9/warp.cabal new/warp-3.2.11/warp.cabal
--- old/warp-3.2.9/warp.cabal 2016-11-08 04:53:07.000000000 +0100
+++ new/warp-3.2.11/warp.cabal 2017-02-02 02:57:32.000000000 +0100
@@ -1,5 +1,5 @@
Name: warp
-Version: 3.2.9
+Version: 3.2.11
Synopsis: A fast, light-weight web server for WAI applications.
License: MIT
License-file: LICENSE
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-relational-query for openSUSE:Factory checked in at 2017-02-21 13:45:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-relational-query (Old)
and /work/SRC/openSUSE:Factory/.ghc-relational-query.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-relational-query"
Changes:
--------
--- /work/SRC/openSUSE:…
[View More]Factory/ghc-relational-query/ghc-relational-query.changes 2017-02-03 17:39:48.338828689 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-relational-query.new/ghc-relational-query.changes 2017-02-21 13:45:56.285628645 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:26 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.8.3.4 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
relational-query-0.8.3.2.tar.gz
New:
----
relational-query-0.8.3.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-relational-query.spec ++++++
--- /var/tmp/diff_new_pack.eWeKfy/_old 2017-02-21 13:45:56.901541754 +0100
+++ /var/tmp/diff_new_pack.eWeKfy/_new 2017-02-21 13:45:56.905541190 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-relational-query
#
-# 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,7 +19,7 @@
%global pkg_name relational-query
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.8.3.2
+Version: 0.8.3.4
Release: 0
Summary: Typeful, Modular, Relational, algebraic query engine
License: BSD-3-Clause
++++++ relational-query-0.8.3.2.tar.gz -> relational-query-0.8.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-0.8.3.2/ChangeLog.md new/relational-query-0.8.3.4/ChangeLog.md
--- old/relational-query-0.8.3.2/ChangeLog.md 2016-10-16 05:54:38.000000000 +0200
+++ new/relational-query-0.8.3.4/ChangeLog.md 2017-02-02 16:32:02.000000000 +0100
@@ -1,5 +1,13 @@
<!-- -*- Markdown -*- -->
+## 0.8.3.4
+
+- Update this changelog
+
+## 0.8.3.3
+
+- simpl-tick-factor work-around to avoid bug of GHC
+
## 0.8.3.2
- Export Register interface type from Query module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-0.8.3.2/relational-query.cabal new/relational-query-0.8.3.4/relational-query.cabal
--- old/relational-query-0.8.3.2/relational-query.cabal 2016-10-16 05:54:38.000000000 +0200
+++ new/relational-query-0.8.3.4/relational-query.cabal 2017-02-02 16:32:02.000000000 +0100
@@ -1,5 +1,5 @@
name: relational-query
-version: 0.8.3.2
+version: 0.8.3.4
synopsis: Typeful, Modular, Relational, algebraic query engine
description: This package contiains typeful relation structure and
relational-algebraic query building DSL which can
@@ -18,7 +18,7 @@
category: Database
build-type: Simple
cabal-version: >=1.10
-tested-with: GHC == 8.0.1
+tested-with: GHC == 8.0.1, GHC == 8.0.2
, GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
, GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
, GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
@@ -87,7 +87,7 @@
, persistable-record >= 0.3
hs-source-dirs: src
- ghc-options: -Wall
+ ghc-options: -Wall -fsimpl-tick-factor=200
default-language: Haskell2010
@@ -105,7 +105,7 @@
Model
hs-source-dirs: test
- ghc-options: -Wall
+ ghc-options: -Wall -fsimpl-tick-factor=200
default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-0.8.3.2/src/Database/Relational/Query/Relation.hs new/relational-query-0.8.3.4/src/Database/Relational/Query/Relation.hs
--- old/relational-query-0.8.3.2/src/Database/Relational/Query/Relation.hs 2016-10-16 05:54:38.000000000 +0200
+++ new/relational-query-0.8.3.4/src/Database/Relational/Query/Relation.hs 2017-02-02 16:32:02.000000000 +0100
@@ -1,5 +1,4 @@
{-# LANGUAGE FlexibleContexts #-}
-{-# OPTIONS_GHC -fsimpl-tick-factor=200 #-}
-- |
-- Module : Database.Relational.Query.Relation
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-path for openSUSE:Factory checked in at 2017-02-21 13:45:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-path (Old)
and /work/SRC/openSUSE:Factory/.ghc-path.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-path"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-path/ghc-path.changes 2017-01-12 15:51:00.…
[View More]984346671 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-path.new/ghc-path.changes 2017-02-21 13:45:50.242481191 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:35 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.5.12 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
path-0.5.11.tar.gz
path.cabal
New:
----
path-0.5.12.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-path.spec ++++++
--- /var/tmp/diff_new_pack.vxJARy/_old 2017-02-21 13:45:51.062365524 +0100
+++ /var/tmp/diff_new_pack.vxJARy/_new 2017-02-21 13:45:51.066364960 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-path
#
-# 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,19 +19,19 @@
%global pkg_name path
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.5.11
+Version: 0.5.12
Release: 0
Summary: Support for well-typed paths
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-deepseq-devel
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-filepath-devel
+BuildRequires: ghc-hashable-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-template-haskell-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -39,11 +39,8 @@
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-bytestring-devel
-BuildRequires: ghc-genvalidity-devel
-BuildRequires: ghc-genvalidity-hspec-devel
BuildRequires: ghc-hspec-devel
BuildRequires: ghc-mtl-devel
-BuildRequires: ghc-validity-devel
%endif
%description
@@ -62,7 +59,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -85,5 +81,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc CHANGELOG README.md
%changelog
++++++ path-0.5.11.tar.gz -> path-0.5.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-0.5.11/path.cabal new/path-0.5.12/path.cabal
--- old/path-0.5.11/path.cabal 2016-12-06 13:53:46.000000000 +0100
+++ new/path-0.5.12/path.cabal 2017-01-30 11:06:13.000000000 +0100
@@ -1,5 +1,5 @@
name: path
-version: 0.5.11
+version: 0.5.12
synopsis: Support for well-typed paths
description: Support for well-typed paths.
license: BSD3
@@ -12,6 +12,11 @@
cabal-version: >=1.8
extra-source-files: README.md, CHANGELOG
+flag validity
+ manual: True
+ default: False
+ description: Enable validity tests.
+
library
hs-source-dirs: src/
ghc-options: -Wall -O2
@@ -22,11 +27,11 @@
, template-haskell
, deepseq
, aeson
+ , hashable >= 1.2 && < 1.3
test-suite test
type: exitcode-stdio-1.0
main-is: Main.hs
- other-modules: Path.Gen
hs-source-dirs: test
build-depends: HUnit
, QuickCheck
@@ -34,12 +39,30 @@
, base
, bytestring
, filepath
- , genvalidity
- , genvalidity-hspec
, hspec
, mtl
, path
- , validity
+
+test-suite validity-test
+ if !flag(validity)
+ buildable: False
+ type: exitcode-stdio-1.0
+ main-is: ValidityTest.hs
+ other-modules: Path.Gen
+ hs-source-dirs: test
+ if flag(validity)
+ build-depends: HUnit
+ , QuickCheck
+ , aeson
+ , base >= 4.9 && < 5
+ , bytestring
+ , filepath
+ , genvalidity >= 0.3 && < 0.4
+ , genvalidity-hspec >= 0.3 && < 0.4
+ , hspec
+ , mtl
+ , path
+ , validity >= 0.3.1.1 && < 0.4
source-repository head
type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-0.5.11/src/Path/Internal.hs new/path-0.5.12/src/Path/Internal.hs
--- old/path-0.5.11/src/Path/Internal.hs 2016-12-06 12:45:35.000000000 +0100
+++ new/path-0.5.12/src/Path/Internal.hs 2017-01-30 10:51:38.000000000 +0100
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | Internal types and functions.
@@ -10,6 +10,7 @@
import Control.DeepSeq (NFData (..))
import Data.Aeson (ToJSON (..))
import Data.Data
+import Data.Hashable
-- | Path of some base and type.
--
@@ -57,3 +58,6 @@
toEncoding (Path x) = toEncoding x
{-# INLINE toEncoding #-}
#endif
+
+instance Hashable (Path b t) where
+ hashWithSalt n (Path path) = hashWithSalt n path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-0.5.11/test/Main.hs new/path-0.5.12/test/Main.hs
--- old/path-0.5.11/test/Main.hs 2016-12-06 13:34:29.000000000 +0100
+++ new/path-0.5.12/test/Main.hs 2017-01-30 10:57:37.000000000 +0100
@@ -1,4 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE ScopedTypeVariables #-}
-- | Test suite.
@@ -12,9 +13,7 @@
import Path
import Path.Internal
import Test.Hspec
-import Test.Validity
-
-import Path.Gen ()
+import Test.QuickCheck
-- | Test suite entry point, returns exit failure if any test fails.
main :: IO ()
@@ -32,6 +31,7 @@
describe "Operations: isParentOf" operationIsParentOf
describe "Operations: parent" operationParent
describe "Operations: filename" operationFilename
+ describe "Operations: dirname" operationDirname
describe "Restrictions" restrictions
describe "Aeson Instances" aesonInstances
@@ -50,32 +50,44 @@
parseFails "/.."
parseFails "/foo/../bar/"
parseFails "/foo/bar/.."
+ parseFailsPending "/hello/\n/world"
+ parseFailsPending "white/\r/space"
where parseFails x =
it (show x ++ " should be rejected")
(isNothing (void (parseAbsDir x) <|>
void (parseRelDir x) <|>
void (parseAbsFile x) <|>
void (parseRelFile x)))
+ parseFailsPending x =
+ it (show x ++ " should be rejected")
+ pending
parseSucceeds x with =
parserTest parseRelDir x (Just with)
+-- | The 'dirname' operation.
+operationDirname :: Spec
+operationDirname = do
+ it
+ "dirname ($(mkAbsDir parent) </> $(mkRelFile dirname)) == dirname $(mkRelFile dirname) (unit test)"
+ (dirname ($(mkAbsDir "/home/chris/") </> $(mkRelDir "bar")) ==
+ dirname $(mkRelDir "bar"))
+ it
+ "dirname ($(mkRelDir parent) </> $(mkRelFile dirname)) == dirname $(mkRelFile dirname) (unit test)"
+ (dirname ($(mkRelDir "home/chris/") </> $(mkRelDir "bar")) ==
+ dirname $(mkRelDir "bar"))
+
-- | The 'filename' operation.
operationFilename :: Spec
operationFilename =
- do it "filename ($(mkAbsDir parent) </> filename $(mkRelFile filename)) == $(mkRelFile filename)"
- (filename ($(mkAbsDir "/home/chris/") </>
- filename $(mkRelFile "bar.txt")) ==
- $(mkRelFile "bar.txt"))
- it "filename ($(mkRelDir parent) </> filename $(mkRelFile filename)) == $(mkRelFile filename)"
- (filename ($(mkRelDir "home/chris/") </>
- filename $(mkRelFile "bar.txt")) ==
- $(mkRelFile "bar.txt"))
-
- it "produces a valid path on when passed a valid absolute path" $ do
- producesValidsOnValids (filename :: Path Abs File -> Path Rel File)
-
- it "produces a valid path on when passed a valid relative path" $ do
- producesValidsOnValids (filename :: Path Rel File -> Path Rel File)
+ do it "filename ($(mkAbsDir parent) </> $(mkRelFile filename)) == filename $(mkRelFile filename) (unit test)"
+ (filename ($(mkAbsDir "/home/chris/") </>
+ $(mkRelFile "bar.txt")) ==
+ filename $(mkRelFile "bar.txt"))
+
+ it "filename ($(mkRelDir parent) </> $(mkRelFile filename)) == filename $(mkRelFile filename) (unit test)"
+ (filename ($(mkRelDir "home/chris/") </>
+ $(mkRelFile "bar.txt")) ==
+ filename $(mkRelFile "bar.txt"))
-- | The 'parent' operation.
operationParent :: Spec
@@ -91,21 +103,16 @@
(parent (parent $(mkAbsDir "/")) ==
$(mkAbsDir "/"))
- it "produces a valid path on when passed a valid file path" $ do
- producesValidsOnValids (parent :: Path Abs File -> Path Abs Dir)
-
- it "produces a valid path on when passed a valid directory path" $ do
- producesValidsOnValids (parent :: Path Abs Dir -> Path Abs Dir)
-
-- | The 'isParentOf' operation.
operationIsParentOf :: Spec
operationIsParentOf =
- do it "isParentOf parent (parent </> child)"
+ do it "isParentOf parent (parent </> child) (unit test)"
(isParentOf
$(mkAbsDir "///bar/")
($(mkAbsDir "///bar/") </>
$(mkRelFile "bar/foo.txt")))
- it "isParentOf parent (parent </> child)"
+
+ it "isParentOf parent (parent </> child) (unit test)"
(isParentOf
$(mkRelDir "bar/")
($(mkRelDir "bar/") </>
@@ -114,33 +121,23 @@
-- | The 'stripDir' operation.
operationStripDir :: Spec
operationStripDir =
- do it "stripDir parent (parent </> child) = child"
+ do it "stripDir parent (parent </> child) = child (unit test)"
(stripDir $(mkAbsDir "///bar/")
($(mkAbsDir "///bar/") </>
$(mkRelFile "bar/foo.txt")) ==
Just $(mkRelFile "bar/foo.txt"))
- it "stripDir parent (parent </> child) = child"
+
+ it "stripDir parent (parent </> child) = child (unit test)"
(stripDir $(mkRelDir "bar/")
($(mkRelDir "bar/") </>
$(mkRelFile "bob/foo.txt")) ==
Just $(mkRelFile "bob/foo.txt"))
+
it "stripDir parent parent = _|_"
(stripDir $(mkAbsDir "/home/chris/foo")
$(mkAbsDir "/home/chris/foo") ==
Nothing)
- it "produces a valid path on when passed a valid absolute file paths" $ do
- producesValidsOnValids2 (stripDir :: Path Abs Dir -> Path Abs File -> Maybe (Path Rel File))
-
- it "produces a valid path on when passed a valid absolute directory paths" $ do
- producesValidsOnValids2 (stripDir :: Path Abs Dir -> Path Abs Dir -> Maybe (Path Rel Dir))
-
- it "produces a valid path on when passed a valid relative file paths" $ do
- producesValidsOnValids2 (stripDir :: Path Rel Dir -> Path Rel File -> Maybe (Path Rel File))
-
- it "produces a valid path on when passed a valid relative directory paths" $ do
- producesValidsOnValids2 (stripDir :: Path Rel Dir -> Path Rel Dir -> Maybe (Path Rel Dir))
-
-- | The '</>' operation.
operationAppend :: Spec
operationAppend =
@@ -161,18 +158,6 @@
$(mkRelFile "chris/test.txt") ==
$(mkRelFile "home/chris/test.txt"))
- it "produces a valid path on when creating valid absolute file paths" $ do
- producesValidsOnValids2 ((</>) :: Path Abs Dir -> Path Rel File -> Path Abs File)
-
- it "produces a valid path on when creating valid absolute directory paths" $ do
- producesValidsOnValids2 ((</>) :: Path Abs Dir -> Path Rel Dir -> Path Abs Dir)
-
- it "produces a valid path on when creating valid relative file paths" $ do
- producesValidsOnValids2 ((</>) :: Path Rel Dir -> Path Rel File -> Path Rel File)
-
- it "produces a valid path on when creating valid relative directory paths" $ do
- producesValidsOnValids2 ((</>) :: Path Rel Dir -> Path Rel Dir -> Path Rel Dir)
-
-- | Tests for the tokenizer.
parseAbsDirSpec :: Spec
parseAbsDirSpec =
@@ -185,9 +170,6 @@
succeeding "///foo//bar////mu" (Path "/foo/bar/mu/")
succeeding "///foo//bar/.//mu" (Path "/foo/bar/mu/")
- it "Produces valid paths when it succeeds" $
- validIfSucceedsOnArbitrary
- (parseAbsDir :: FilePath -> Maybe (Path Abs Dir))
where failing x = parserTest parseAbsDir x Nothing
succeeding x with = parserTest parseAbsDir x (Just with)
@@ -214,9 +196,6 @@
succeeding "foo//bar////mu" (Path "foo/bar/mu/")
succeeding "foo//bar/.//mu" (Path "foo/bar/mu/")
- it "Produces valid paths when it succeeds" $
- validIfSucceedsOnArbitrary
- (parseRelDir :: FilePath -> Maybe (Path Rel Dir))
where failing x = parserTest parseRelDir x Nothing
succeeding x with = parserTest parseRelDir x (Just with)
@@ -237,9 +216,6 @@
succeeding "///foo//bar////mu.txt" (Path "/foo/bar/mu.txt")
succeeding "///foo//bar/.//mu.txt" (Path "/foo/bar/mu.txt")
- it "Produces valid paths when it succeeds" $
- validIfSucceedsOnArbitrary
- (parseAbsFile :: FilePath -> Maybe (Path Abs File))
where failing x = parserTest parseAbsFile x Nothing
succeeding x with = parserTest parseAbsFile x (Just with)
@@ -270,9 +246,6 @@
succeeding "foo//bar////mu.txt" (Path "foo/bar/mu.txt")
succeeding "foo//bar/.//mu.txt" (Path "foo/bar/mu.txt")
- it "Produces valid paths when it succeeds" $
- validIfSucceedsOnArbitrary
- (parseRelFile :: FilePath -> Maybe (Path Rel File))
where failing x = parserTest parseRelFile x Nothing
succeeding x with = parserTest parseRelFile x (Just with)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-0.5.11/test/Path/Gen.hs new/path-0.5.12/test/Path/Gen.hs
--- old/path-0.5.11/test/Path/Gen.hs 2016-12-06 13:34:29.000000000 +0100
+++ new/path-0.5.12/test/Path/Gen.hs 2017-01-30 10:51:38.000000000 +0100
@@ -19,6 +19,7 @@
&& not (FilePath.hasTrailingPathSeparator fp)
&& FilePath.isValid fp
&& not (".." `isInfixOf` fp)
+ && not (containsLineBreaks fp)
&& (parseAbsFile fp == Just p)
instance Validity (Path Rel File) where
@@ -29,6 +30,7 @@
&& fp /= "."
&& fp /= ".."
&& not (".." `isInfixOf` fp)
+ && not (containsLineBreaks fp)
&& (parseRelFile fp == Just p)
instance Validity (Path Abs Dir) where
@@ -37,6 +39,7 @@
&& FilePath.hasTrailingPathSeparator fp
&& FilePath.isValid fp
&& not (".." `isInfixOf` fp)
+ && not (containsLineBreaks fp)
&& (parseAbsDir fp == Just p)
instance Validity (Path Rel Dir) where
@@ -48,19 +51,30 @@
&& fp /= "."
&& fp /= ".."
&& not (".." `isInfixOf` fp)
+ && not (containsLineBreaks fp)
&& (parseRelDir fp == Just p)
+containsLineBreaks :: String -> Bool
+containsLineBreaks s = any (`elem` s) "\n\r"
-instance GenValidity (Path Abs File) where
+instance GenUnchecked (Path Abs File) where
genUnchecked = Path <$> arbitrary
-instance GenValidity (Path Rel File) where
+instance GenValid (Path Abs File)
+
+instance GenUnchecked (Path Rel File) where
genUnchecked = Path <$> arbitrary
-instance GenValidity (Path Abs Dir) where
+instance GenValid (Path Rel File)
+
+instance GenUnchecked (Path Abs Dir) where
genUnchecked = Path <$> arbitrary
-instance GenValidity (Path Rel Dir) where
+instance GenValid (Path Abs Dir)
+
+instance GenUnchecked (Path Rel Dir) where
genUnchecked = Path <$> arbitrary
+instance GenValid (Path Rel Dir)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-0.5.11/test/ValidityTest.hs new/path-0.5.12/test/ValidityTest.hs
--- old/path-0.5.11/test/ValidityTest.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/path-0.5.12/test/ValidityTest.hs 2017-01-30 10:51:38.000000000 +0100
@@ -0,0 +1,163 @@
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+-- | Test suite.
+
+module Main where
+
+import Control.Applicative
+import Control.Monad
+import Data.Aeson
+import qualified Data.ByteString.Lazy.Char8 as LBS
+import Data.Maybe
+import Path
+import Path.Internal
+import Test.Hspec
+import Test.QuickCheck
+import Test.Validity
+
+import Path.Gen ()
+
+-- | Test suite entry point, returns exit failure if any test fails.
+main :: IO ()
+main = hspec spec
+
+-- | Test suite.
+spec :: Spec
+spec = do
+ describe "Parsing: Path Abs Dir" parseAbsDirSpec
+ describe "Parsing: Path Rel Dir" parseRelDirSpec
+ describe "Parsing: Path Abs File" parseAbsFileSpec
+ describe "Parsing: Path Rel File" parseRelFileSpec
+ describe "Operations: (</>)" operationAppend
+ describe "Operations: stripDir" operationStripDir
+ describe "Operations: isParentOf" operationIsParentOf
+ describe "Operations: parent" operationParent
+ describe "Operations: filename" operationFilename
+
+-- | The 'filename' operation.
+operationFilename :: Spec
+operationFilename = do
+ it "filename ($(mkAbsDir parent) </> $(mkRelFile filename)) == filename $(mkRelFile filename)" $
+ forAll genValid $ \(parent :: Path Abs Dir) ->
+ forAll genValid $ \file ->
+ filename (parent </> file) `shouldBe` filename file
+
+ it "filename ($(mkRelDir parent) </> $(mkRelFile filename)) == filename $(mkRelFile filename)" $
+ forAll genValid $ \(parent :: Path Rel Dir) ->
+ forAll genValid $ \file ->
+ filename (parent </> file) `shouldBe` filename file
+
+ it "produces a valid path on when passed a valid absolute path" $ do
+ producesValidsOnValids (filename @Abs)
+
+ it "produces a valid path on when passed a valid relative path" $ do
+ producesValidsOnValids (filename @Rel)
+
+-- | The 'parent' operation.
+operationParent :: Spec
+operationParent = do
+ it "produces a valid path on when passed a valid file path" $ do
+ producesValidsOnValids (parent @File)
+
+ it "produces a valid path on when passed a valid directory path" $ do
+ producesValidsOnValids (parent @Dir)
+
+-- | The 'isParentOf' operation.
+operationIsParentOf :: Spec
+operationIsParentOf = do
+ it "isParentOf parent (parent </> child)" $
+ forAll genValid $ \(parent :: Path Abs Dir) ->
+ forAll genValid $ \(child :: Path Rel File) ->
+ isParentOf parent (parent </> child)
+
+ it "isParentOf parent (parent </> child)" $
+ forAll genValid $ \(parent :: Path Abs Dir) ->
+ forAll genValid $ \(child :: Path Rel Dir) ->
+ isParentOf parent (parent </> child)
+
+ it "isParentOf parent (parent </> child)" $
+ forAll genValid $ \(parent :: Path Rel Dir) ->
+ forAll genValid $ \(child :: Path Rel File) ->
+ isParentOf parent (parent </> child)
+
+ it "isParentOf parent (parent </> child)" $
+ forAll genValid $ \(parent :: Path Rel Dir) ->
+ forAll genValid $ \(child :: Path Rel Dir) ->
+ isParentOf parent (parent </> child)
+
+-- | The 'stripDir' operation.
+operationStripDir :: Spec
+operationStripDir = do
+ it "stripDir parent (parent </> child) = child" $
+ forAll genValid $ \(parent :: Path Abs Dir) ->
+ forAll genValid $ \(child :: Path Rel File) ->
+ stripDir parent (parent </> child) == Just child
+
+ it "stripDir parent (parent </> child) = child" $
+ forAll genValid $ \(parent :: Path Rel Dir) ->
+ forAll genValid $ \(child :: Path Rel File) ->
+ stripDir parent (parent </> child) == Just child
+
+ it "stripDir parent (parent </> child) = child" $
+ forAll genValid $ \(parent :: Path Abs Dir) ->
+ forAll genValid $ \(child :: Path Rel Dir) ->
+ stripDir parent (parent </> child) == Just child
+
+ it "stripDir parent (parent </> child) = child" $
+ forAll genValid $ \(parent :: Path Rel Dir) ->
+ forAll genValid $ \(child :: Path Rel Dir) ->
+ stripDir parent (parent </> child) == Just child
+
+ it "produces a valid path on when passed a valid absolute file paths" $ do
+ producesValidsOnValids2 (stripDir @Maybe @Abs @File)
+
+ it "produces a valid path on when passed a valid absolute directory paths" $ do
+ producesValidsOnValids2 (stripDir @Maybe @Abs @Dir)
+
+ it "produces a valid path on when passed a valid relative file paths" $ do
+ producesValidsOnValids2 (stripDir @Maybe @Rel @File)
+
+ it "produces a valid path on when passed a valid relative directory paths" $ do
+ producesValidsOnValids2 (stripDir @Maybe @Rel @Dir)
+
+-- | The '</>' operation.
+operationAppend :: Spec
+operationAppend = do
+ it "produces a valid path on when creating valid absolute file paths" $ do
+ producesValidsOnValids2 ((</>) @Abs @File)
+
+ it "produces a valid path on when creating valid absolute directory paths" $ do
+ producesValidsOnValids2 ((</>) @Abs @Dir)
+
+ it "produces a valid path on when creating valid relative file paths" $ do
+ producesValidsOnValids2 ((</>) @Rel @File)
+
+ it "produces a valid path on when creating valid relative directory paths" $ do
+ producesValidsOnValids2 ((</>) @Rel @Dir)
+
+
+parseAbsDirSpec :: Spec
+parseAbsDirSpec = do
+ it "Produces valid paths when it succeeds" $
+ validIfSucceedsOnArbitrary
+ (parseAbsDir @Maybe)
+
+parseRelDirSpec :: Spec
+parseRelDirSpec = do
+ it "Produces valid paths when it succeeds" $
+ validIfSucceedsOnArbitrary
+ (parseRelDir @Maybe)
+
+parseAbsFileSpec :: Spec
+parseAbsFileSpec = do
+ it "Produces valid paths when it succeeds" $
+ validIfSucceedsOnArbitrary
+ (parseAbsFile @Maybe)
+
+parseRelFileSpec :: Spec
+parseRelFileSpec = do
+ it "Produces valid paths when it succeeds" $
+ validIfSucceedsOnArbitrary
+ (parseRelFile @Maybe)
\ No newline at end of file
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-monadcryptorandom for openSUSE:Factory checked in at 2017-02-21 13:45:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-monadcryptorandom (Old)
and /work/SRC/openSUSE:Factory/.ghc-monadcryptorandom.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-monadcryptorandom"
Changes:
--------
--- /work/SRC/openSUSE:…
[View More]Factory/ghc-monadcryptorandom/ghc-monadcryptorandom.changes 2016-10-22 13:12:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-monadcryptorandom.new/ghc-monadcryptorandom.changes 2017-02-21 13:45:43.051495669 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:03 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.7.1 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
monadcryptorandom-0.7.0.tar.gz
New:
----
monadcryptorandom-0.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-monadcryptorandom.spec ++++++
--- /var/tmp/diff_new_pack.pWtmvr/_old 2017-02-21 13:45:43.611416677 +0100
+++ /var/tmp/diff_new_pack.pWtmvr/_new 2017-02-21 13:45:43.611416677 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-monadcryptorandom
#
-# 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,23 +18,23 @@
%global pkg_name monadcryptorandom
Name: ghc-%{pkg_name}
-Version: 0.7.0
+Version: 0.7.1
Release: 0
Summary: A monad for using CryptoRandomGen
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-bytestring-devel
BuildRequires: ghc-crypto-api-devel
+BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-tagged-devel
+BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
A monad for using CryptoRandomGen.
@@ -54,15 +54,12 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%post devel
%ghc_pkg_recache
++++++ monadcryptorandom-0.7.0.tar.gz -> monadcryptorandom-0.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/monadcryptorandom-0.7.0/Control/Monad/CryptoRandom.hs new/monadcryptorandom-0.7.1/Control/Monad/CryptoRandom.hs
--- old/monadcryptorandom-0.7.0/Control/Monad/CryptoRandom.hs 2015-10-29 22:45:36.000000000 +0100
+++ new/monadcryptorandom-0.7.1/Control/Monad/CryptoRandom.hs 2017-02-02 16:41:10.000000000 +0100
@@ -31,8 +31,10 @@
import Control.Applicative
import Control.Arrow (right, left, first)
import Control.Monad (liftM)
+import qualified Control.Monad.Catch as C (MonadThrow(..), MonadCatch(..))
import Control.Monad.Cont
-import Control.Monad.Except
+import Control.Monad.Trans.Except
+import Control.Monad.Error.Class
import Control.Monad.IO.Class
import Control.Monad.Identity
import Control.Monad.Reader
@@ -331,21 +333,34 @@
callCC f = CRandT $ callCC $ \amb -> unCRandT $ f (CRandT . amb)
{-# INLINE callCC #-}
+-- | Throws exceptions into the base monad.
+--
+-- @since 0.7.1
+instance C.MonadThrow m => C.MonadThrow (CRandT g e m) where
+ throwM = CRandT . C.throwM
+
+-- | Catches exceptions from the base monad.
+--
+-- @since 0.7.1
+instance C.MonadCatch m => C.MonadCatch (CRandT g e m) where
+ catch (CRandT m) f = CRandT $ C.catch m (unCRandT . f)
+
-- |Simple users of generators can use CRand for
-- quick and easy generation of randoms. See
-- below for a simple use of 'newGenIO' (from "crypto-api"),
-- 'getCRandom', 'getBytes', and 'runCRandom'.
--
--- @getRandPair = do
+-- @
+-- getRandPair = do
-- int <- getCRandom
-- bytes <- getBytes 100
-- return (int, bytes)
--
--- func = do
+-- func = do
-- g <- newGenIO
-- case runCRand getRandPair g of
--- Right ((int,bytes), g') -> useRandomVals (int,bytes)
--- Left x -> handleGenError x
+-- Right ((int,bytes), g') -> useRandomVals (int,bytes)
+-- Left x -> handleGenError x
-- @
type CRand g e = CRandT g e Identity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/monadcryptorandom-0.7.0/monadcryptorandom.cabal new/monadcryptorandom-0.7.1/monadcryptorandom.cabal
--- old/monadcryptorandom-0.7.0/monadcryptorandom.cabal 2015-10-29 22:45:36.000000000 +0100
+++ new/monadcryptorandom-0.7.1/monadcryptorandom.cabal 2017-02-02 16:41:10.000000000 +0100
@@ -1,5 +1,5 @@
name: monadcryptorandom
-version: 0.7.0
+version: 0.7.1
license: BSD3
license-file: LICENSE
copyright: Thomas DuBuisson <thomas.dubuisson(a)gmail.com>
@@ -12,14 +12,24 @@
stability: stable
build-type: Simple
cabal-version: >= 1.6
-tested-with: GHC == 6.12.1
+tested-with: GHC == 6.12.1,
+ GHC == 7.0.4,
+ GHC == 7.2.2,
+ GHC == 7.4.2
+ GHC == 7.6.3,
+ GHC == 7.8.2,
+ GHC == 7.10.3
Data-Files:
extra-source-files:
Library
Build-Depends: base == 4.*,
bytestring >= 0.9 && < 0.11,
- mtl >= 2.2.1, crypto-api >= 0.2, transformers >= 0.2,
+ crypto-api >= 0.2,
+ exceptions >= 0.8 && <0.9,
+ transformers >= 0.2,
+ mtl >= 2.0 && < 2.3,
+ transformers-compat >= 0.3,
tagged >= 0.2
ghc-options:
hs-source-dirs:
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-monad-http for openSUSE:Factory checked in at 2017-02-21 13:45:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-monad-http (Old)
and /work/SRC/openSUSE:Factory/.ghc-monad-http.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-monad-http"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-monad-http/ghc-…
[View More]monad-http.changes 2016-10-22 13:12:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-monad-http.new/ghc-monad-http.changes 2017-02-21 13:45:37.344300818 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:02 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.1.0.0 revision 4 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
3.cabal
New:
----
monad-http.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-monad-http.spec ++++++
--- /var/tmp/diff_new_pack.Fvcf0n/_old 2017-02-21 13:45:37.820233676 +0100
+++ /var/tmp/diff_new_pack.Fvcf0n/_new 2017-02-21 13:45:37.824233112 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-monad-http
#
-# 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
@@ -22,12 +22,11 @@
Release: 0
Summary: A class of monads which can do http requests
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/3.cabal
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/4.cabal…
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-MonadRandom-devel
BuildRequires: ghc-base-compat-devel
BuildRequires: ghc-bytestring-devel
@@ -43,7 +42,6 @@
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
A class of monads which can do http requests.
@@ -63,15 +61,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
@@ -84,6 +79,5 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
-%doc README.md
%changelog
++++++ monad-http.cabal ++++++
-- 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
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
bug-reports: https://github.com/futurice/haskell-monad-http/issues
license: BSD3
license-file: LICENSE
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
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
README.md
source-repository head
type: git
location: https://github.com/futurice/haskell-monad-http
library
hs-source-dirs:
src
ghc-options: -Wall
build-depends:
base >=4.7 && <4.10,
base-compat >=0.6.0 && <0.10,
bytestring >=0.10.0.4 && <0.12,
exceptions >=0.8.0.2 && <0.9,
http-client >=0.4.18.1 && <0.6,
http-client-tls >=0.2.2 && <0.4,
http-types >=0.8.6 && <0.10,
monad-logger >=0.3.13.2 && <0.4,
monadcryptorandom >=0.6.1 && <0.8,
MonadRandom >=0.3.0.2 && <0.6,
mtl >=2.1.3.1 && <2.3,
text >=1.2.0.6 && <1.3,
transformers >=0.3.0.0 && <0.6,
transformers-compat >=0.4.0.3 && <0.6
exposed-modules:
Control.Monad.Http
Control.Monad.Http.Class
Control.Monad.Trans.Http
default-language: Haskell2010
[View Less]
1
0
Hello community,
here is the log from the commit of package ghc-generics-sop for openSUSE:Factory checked in at 2017-02-21 13:45:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-generics-sop (Old)
and /work/SRC/openSUSE:Factory/.ghc-generics-sop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-generics-sop"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-generics-…
[View More]sop/ghc-generics-sop.changes 2017-01-12 15:49:21.558391746 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-generics-sop.new/ghc-generics-sop.changes 2017-02-21 13:45:33.540837397 +0100
@@ -1,0 +2,5 @@
+Sun Feb 5 19:32:20 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.2.4.0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
generics-sop-0.2.3.0.tar.gz
New:
----
generics-sop-0.2.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-generics-sop.spec ++++++
--- /var/tmp/diff_new_pack.ljIqif/_old 2017-02-21 13:45:33.952779282 +0100
+++ /var/tmp/diff_new_pack.ljIqif/_new 2017-02-21 13:45:33.956778717 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-generics-sop
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%global pkg_name generics-sop
Name: ghc-%{pkg_name}
-Version: 0.2.3.0
+Version: 0.2.4.0
Release: 0
Summary: Generic Programming using True Sums of Products
License: BSD-3-Clause
++++++ generics-sop-0.2.3.0.tar.gz -> generics-sop-0.2.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/CHANGELOG.md new/generics-sop-0.2.4.0/CHANGELOG.md
--- old/generics-sop-0.2.3.0/CHANGELOG.md 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/CHANGELOG.md 2017-02-02 14:06:35.000000000 +0100
@@ -1,4 +1,12 @@
-# 0.2.3.0
+# 0.2.4.0 (2017-02-02)
+
+* Add `hindex` (and `index_NS` and `index_SOP`).
+
+* Add `hapInjs` as a generalization of `apInjs_NP` and `apInjs_POP`.
+
+* Make basic functors instances of lifted classes (such as `Eq1` etc).
+
+# 0.2.3.0 (2016-12-04)
* Add various metadata getters
@@ -25,7 +33,7 @@
`Projection` and `projections` as duals of `Injection` and
`injections`.
-# 0.2 (2015-10-23)
+# 0.2.0.0 (2015-10-23)
* Now tested with ghc-7.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/generics-sop.cabal new/generics-sop-0.2.4.0/generics-sop.cabal
--- old/generics-sop-0.2.3.0/generics-sop.cabal 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/generics-sop.cabal 2017-02-02 14:06:35.000000000 +0100
@@ -1,5 +1,5 @@
name: generics-sop
-version: 0.2.3.0
+version: 0.2.4.0
synopsis: Generic Programming using True Sums of Products
description:
A library to support the definition of generic functions.
@@ -37,7 +37,7 @@
build-type: Simple
cabal-version: >=1.10
extra-source-files: CHANGELOG.md
-tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.0.2, GHC == 8.1.*
source-repository head
type: git
@@ -61,8 +61,11 @@
build-depends: base >= 4.6 && < 5,
template-haskell >= 2.8 && < 2.13,
ghc-prim >= 0.3 && < 0.6
- if impl (ghc < 7.8)
+ if !impl (ghc >= 7.8)
build-depends: tagged >= 0.7 && < 0.9
+ if !impl (ghc >= 8.0)
+ build-depends: transformers-compat >= 0.3 && < 0.6,
+ transformers >= 0.3 && < 0.6
hs-source-dirs: src
default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/src/Generics/SOP/BasicFunctors.hs new/generics-sop-0.2.4.0/src/Generics/SOP/BasicFunctors.hs
--- old/generics-sop-0.2.3.0/src/Generics/SOP/BasicFunctors.hs 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/src/Generics/SOP/BasicFunctors.hs 2017-02-02 14:06:35.000000000 +0100
@@ -39,6 +39,20 @@
#endif
import qualified GHC.Generics as GHC
+import Data.Functor.Classes
+
+#if MIN_VERSION_base(4,9,0)
+#define LIFTED_CLASSES 1
+#else
+#if MIN_VERSION_transformers(0,5,0)
+#define LIFTED_CLASSES 1
+#else
+#if MIN_VERSION_transformers_compat(0,5,0) && !MIN_VERSION_transformers(0,4,0)
+#define LIFTED_CLASSES 1
+#endif
+#endif
+#endif
+
-- | The constant type functor.
--
-- Like 'Data.Functor.Constant.Constant', but kind-polymorphic
@@ -46,9 +60,9 @@
--
newtype K (a :: *) (b :: k) = K a
#if MIN_VERSION_base(4,7,0)
- deriving (Show, Functor, Foldable, Traversable, GHC.Generic)
+ deriving (Functor, Foldable, Traversable, GHC.Generic)
#else
- deriving (Show, GHC.Generic)
+ deriving (GHC.Generic)
instance Functor (K a) where
fmap _ (K x) = K x
@@ -61,6 +75,53 @@
traverse _ (K x) = pure (K x)
#endif
+#ifdef LIFTED_CLASSES
+instance Eq2 K where
+ liftEq2 eq _ (K x) (K y) = eq x y
+instance Ord2 K where
+ liftCompare2 comp _ (K x) (K y) = comp x y
+instance Read2 K where
+ liftReadsPrec2 rp _ _ _ = readsData $
+ readsUnaryWith rp "K" K
+instance Show2 K where
+ liftShowsPrec2 sp _ _ _ d (K x) = showsUnaryWith sp "K" d x
+
+instance (Eq a) => Eq1 (K a) where
+ liftEq = liftEq2 (==)
+instance (Ord a) => Ord1 (K a) where
+ liftCompare = liftCompare2 compare
+instance (Read a) => Read1 (K a) where
+ liftReadsPrec = liftReadsPrec2 readsPrec readList
+instance (Show a) => Show1 (K a) where
+ liftShowsPrec = liftShowsPrec2 showsPrec showList
+#else
+instance (Eq a) => Eq1 (K a) where
+ eq1 (K x) (K y) = x == y
+instance (Ord a) => Ord1 (K a) where
+ compare1 (K x) (K y) = compare x y
+instance (Read a) => Read1 (K a) where
+ readsPrec1 = readsData $ readsUnary "K" K
+instance (Show a) => Show1 (K a) where
+ showsPrec1 d (K x) = showsUnary "K" d x
+#endif
+
+-- This have to be implemented manually, K is polykinded.
+instance (Eq a) => Eq (K a b) where
+ K x == K y = x == y
+instance (Ord a) => Ord (K a b) where
+ compare (K x) (K y) = compare x y
+#ifdef LIFTED_CLASSES
+instance (Read a) => Read (K a b) where
+ readsPrec = readsData $ readsUnaryWith readsPrec "K" K
+instance (Show a) => Show (K a b) where
+ showsPrec d (K x) = showsUnaryWith showsPrec "K" d x
+#else
+instance (Read a) => Read (K a b) where
+ readsPrec = readsData $ readsUnary "K" K
+instance (Show a) => Show (K a b) where
+ showsPrec d (K x) = showsUnary "K" d x
+#endif
+
instance Monoid a => Applicative (K a) where
pure _ = K mempty
K x <*> K y = K (x <> y)
@@ -75,9 +136,9 @@
--
newtype I (a :: *) = I a
#if MIN_VERSION_base(4,7,0)
- deriving (Show, Functor, Foldable, Traversable, GHC.Generic)
+ deriving (Functor, Foldable, Traversable, GHC.Generic)
#else
- deriving (Show, GHC.Generic)
+ deriving (GHC.Generic)
instance Functor I where
fmap f (I x) = I (f x)
@@ -98,6 +159,33 @@
return = I
I x >>= f = f x
+
+#ifdef LIFTED_CLASSES
+instance Eq1 I where
+ liftEq eq (I x) (I y) = eq x y
+instance Ord1 I where
+ liftCompare comp (I x) (I y) = comp x y
+instance Read1 I where
+ liftReadsPrec rp _ = readsData $
+ readsUnaryWith rp "I" I
+instance Show1 I where
+ liftShowsPrec sp _ d (I x) = showsUnaryWith sp "I" d x
+#else
+instance Eq1 I where
+ eq1 (I x) (I y) = x == y
+instance Ord1 I where
+ compare1 (I x) (I y) = compare x y
+instance Read1 I where
+ readsPrec1 = readsData $ readsUnary "I" I
+instance Show1 I where
+ showsPrec1 d (I x) = showsUnary "I" d x
+#endif
+
+instance (Eq a) => Eq (I a) where (==) = eq1
+instance (Ord a) => Ord (I a) where compare = compare1
+instance (Read a) => Read (I a) where readsPrec = readsPrec1
+instance (Show a) => Show (I a) where showsPrec = showsPrec1
+
-- | Extract the contents of an 'I' value.
unI :: I a -> a
unI (I x) = x
@@ -108,14 +196,81 @@
-- and with a shorter name.
--
newtype (:.:) (f :: l -> *) (g :: k -> l) (p :: k) = Comp (f (g p))
- deriving (Show, GHC.Generic)
+ deriving (GHC.Generic)
infixr 7 :.:
instance (Functor f, Functor g) => Functor (f :.: g) where
fmap f (Comp x) = Comp (fmap (fmap f) x)
+-- Instances of lifted Prelude classes
+
+#ifdef LIFTED_CLASSES
+instance (Eq1 f, Eq1 g) => Eq1 (f :.: g) where
+ liftEq eq (Comp x) (Comp y) = liftEq (liftEq eq) x y
+
+instance (Ord1 f, Ord1 g) => Ord1 (f :.: g) where
+ liftCompare comp (Comp x) (Comp y) =
+ liftCompare (liftCompare comp) x y
+
+instance (Read1 f, Read1 g) => Read1 (f :.: g) where
+ liftReadsPrec rp rl = readsData $
+ readsUnaryWith (liftReadsPrec rp' rl') "Comp" Comp
+ where
+ rp' = liftReadsPrec rp rl
+ rl' = liftReadList rp rl
+
+instance (Show1 f, Show1 g) => Show1 (f :.: g) where
+ liftShowsPrec sp sl d (Comp x) =
+ showsUnaryWith (liftShowsPrec sp' sl') "Comp" d x
+ where
+ sp' = liftShowsPrec sp sl
+ sl' = liftShowList sp sl
+
+instance (Eq1 f, Eq1 g, Eq a) => Eq ((f :.: g) a) where (==) = eq1
+instance (Ord1 f, Ord1 g, Ord a) => Ord ((f :.: g) a) where compare = compare1
+instance (Read1 f, Read1 g, Read a) => Read ((f :.: g) a) where readsPrec = readsPrec1
+instance (Show1 f, Show1 g, Show a) => Show ((f :.: g) a) where showsPrec = showsPrec1
+#else
+-- kludge to get type with the same instances as g a
+newtype Apply g a = Apply (g a)
+
+getApply :: Apply g a -> g a
+getApply (Apply x) = x
+
+instance (Eq1 g, Eq a) => Eq (Apply g a) where
+ Apply x == Apply y = eq1 x y
+
+instance (Ord1 g, Ord a) => Ord (Apply g a) where
+ compare (Apply x) (Apply y) = compare1 x y
+
+instance (Read1 g, Read a) => Read (Apply g a) where
+ readsPrec d s = [(Apply a, t) | (a, t) <- readsPrec1 d s]
+
+instance (Show1 g, Show a) => Show (Apply g a) where
+ showsPrec d (Apply x) = showsPrec1 d x
+
+instance (Functor f, Eq1 f, Eq1 g, Eq a) => Eq ((f :.: g) a) where
+ Comp x == Comp y = eq1 (fmap Apply x) (fmap Apply y)
+
+instance (Functor f, Ord1 f, Ord1 g, Ord a) => Ord ((f :.: g) a) where
+ compare (Comp x) (Comp y) = compare1 (fmap Apply x) (fmap Apply y)
+
+instance (Functor f, Read1 f, Read1 g, Read a) => Read ((f :.: g) a) where
+ readsPrec = readsData $ readsUnary1 "Comp" (Comp . fmap getApply)
+
+instance (Functor f, Show1 f, Show1 g, Show a) => Show ((f :.: g) a) where
+ showsPrec d (Comp x) = showsUnary1 "Comp" d (fmap Apply x)
+
+instance (Functor f, Eq1 f, Eq1 g) => Eq1 (f :.: g) where eq1 = (==)
+instance (Functor f, Ord1 f, Ord1 g) => Ord1 (f :.: g) where
+ compare1 = compare
+instance (Functor f, Read1 f, Read1 g) => Read1 (f :.: g) where
+ readsPrec1 = readsPrec
+instance (Functor f, Show1 f, Show1 g) => Show1 (f :.: g) where
+ showsPrec1 = showsPrec
+#endif
+
-- | Extract the contents of a 'Comp' value.
unComp :: (f :.: g) p -> f (g p)
unComp (Comp x) = x
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/src/Generics/SOP/Classes.hs new/generics-sop-0.2.4.0/src/Generics/SOP/Classes.hs
--- old/generics-sop-0.2.3.0/src/Generics/SOP/Classes.hs 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/src/Generics/SOP/Classes.hs 2017-02-02 14:06:35.000000000 +0100
@@ -29,7 +29,45 @@
-- The actual instances are defined in "Generics.SOP.NP" and
-- "Generics.SOP.NS".
--
-module Generics.SOP.Classes where
+module Generics.SOP.Classes
+ ( -- * Generalized applicative functor structure
+ -- ** Generalized 'Control.Applicative.pure'
+ HPure(..)
+ -- ** Generalized 'Control.Applicative.<*>'
+ , type (-.->)(..)
+ , fn
+ , fn_2
+ , fn_3
+ , fn_4
+ , Prod
+ , HAp(..)
+ -- ** Derived functions
+ , hliftA
+ , hliftA2
+ , hliftA3
+ , hmap
+ , hzipWith
+ , hzipWith3
+ , hcliftA
+ , hcliftA2
+ , hcliftA3
+ , hcmap
+ , hczipWith
+ , hczipWith3
+ -- * Collapsing homogeneous structures
+ , CollapseTo
+ , HCollapse(..)
+ -- * Sequencing effects
+ , HSequence(..)
+ -- ** Derived functions
+ , hsequence
+ , hsequenceK
+ -- * Indexing into sums
+ , HIndex(..)
+ -- * Applying all injections
+ , UnProd
+ , HApInjs(..)
+ ) where
#if !(MIN_VERSION_base(4,8,0))
import Control.Applicative (Applicative)
@@ -38,6 +76,10 @@
import Generics.SOP.BasicFunctors
import Generics.SOP.Constraint
+-- * Generalized applicative functor structure
+
+-- ** Generalized 'Control.Applicative.pure'
+
-- | A generalization of 'Control.Applicative.pure' or
-- 'Control.Monad.return' to higher kinds.
class HPure (h :: (k -> *) -> (l -> *)) where
@@ -46,7 +88,7 @@
-- /Instances:/
--
-- @
- -- 'hpure', 'Generics.SOP.NP.pure_NP' :: 'SListI' xs => (forall a. f a) -> 'Generics.SOP.NP.NP' f xs
+ -- 'hpure', 'Generics.SOP.NP.pure_NP' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a) -> 'Generics.SOP.NP.NP' f xs
-- 'hpure', 'Generics.SOP.NP.pure_POP' :: 'SListI2' xss => (forall a. f a) -> 'Generics.SOP.NP.POP' f xss
-- @
--
@@ -76,14 +118,10 @@
--
hcpure :: (AllN h c xs) => proxy c -> (forall a. c a => f a) -> h f xs
-{-------------------------------------------------------------------------------
- Application
--------------------------------------------------------------------------------}
+-- ** Generalized 'Control.Applicative.<*>'
-- | Lifted functions.
newtype (f -.-> g) a = Fn { apFn :: f a -> g a }
-
--- TODO: What is the right precedence?
infixr 1 -.->
-- | Construct a lifted function.
@@ -138,9 +176,7 @@
--
hap :: Prod h (f -.-> g) xs -> h f xs -> h g xs
-{-------------------------------------------------------------------------------
- Derived from application
--------------------------------------------------------------------------------}
+-- ** Derived functions
-- | A generalized form of 'Control.Applicative.liftA',
-- which in turn is a generalized 'map'.
@@ -157,8 +193,8 @@
-- /Instances:/
--
-- @
--- 'hliftA', 'Generics.SOP.NP.liftA_NP' :: 'SListI' xs => (forall a. f a -> f' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs
--- 'hliftA', 'Generics.SOP.NS.liftA_NS' :: 'SListI' xs => (forall a. f a -> f' a) -> 'Generics.SOP.NS.NS' f xs -> 'Generics.SOP.NS.NS' f' xs
+-- 'hliftA', 'Generics.SOP.NP.liftA_NP' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs
+-- 'hliftA', 'Generics.SOP.NS.liftA_NS' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a) -> 'Generics.SOP.NS.NS' f xs -> 'Generics.SOP.NS.NS' f' xs
-- 'hliftA', 'Generics.SOP.NP.liftA_POP' :: 'SListI2' xss => (forall a. f a -> f' a) -> 'Generics.SOP.NP.POP' f xss -> 'Generics.SOP.NP.POP' f' xss
-- 'hliftA', 'Generics.SOP.NS.liftA_SOP' :: 'SListI2' xss => (forall a. f a -> f' a) -> 'Generics.SOP.NS.SOP' f xss -> 'Generics.SOP.NS.SOP' f' xss
-- @
@@ -183,8 +219,8 @@
-- /Instances:/
--
-- @
--- 'hliftA2', 'Generics.SOP.NP.liftA2_NP' :: 'SListI' xs => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NP.NP' f'' xs
--- 'hliftA2', 'Generics.SOP.NS.liftA2_NS' :: 'SListI' xs => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NS.NS' f' xs -> 'Generics.SOP.NS.NS' f'' xs
+-- 'hliftA2', 'Generics.SOP.NP.liftA2_NP' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NP.NP' f'' xs
+-- 'hliftA2', 'Generics.SOP.NS.liftA2_NS' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NS.NS' f' xs -> 'Generics.SOP.NS.NS' f'' xs
-- 'hliftA2', 'Generics.SOP.NP.liftA2_POP' :: 'SListI2' xss => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.POP' f xss -> 'Generics.SOP.NP.POP' f' xss -> 'Generics.SOP.NP.POP' f'' xss
-- 'hliftA2', 'Generics.SOP.NS.liftA2_SOP' :: 'SListI2' xss => (forall a. f a -> f' a -> f'' a) -> 'Generics.SOP.NP.POP' f xss -> 'Generics.SOP.NS.SOP' f' xss -> 'Generics.SOP.NS.SOP' f'' xss
-- @
@@ -209,8 +245,8 @@
-- /Instances:/
--
-- @
--- 'hliftA3', 'Generics.SOP.NP.liftA3_NP' :: 'SListI' xs => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NP.NP' f'' xs -> 'Generics.SOP.NP.NP' f''' xs
--- 'hliftA3', 'Generics.SOP.NS.liftA3_NS' :: 'SListI' xs => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NS.NS' f'' xs -> 'Generics.SOP.NS.NS' f''' xs
+-- 'hliftA3', 'Generics.SOP.NP.liftA3_NP' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NP.NP' f'' xs -> 'Generics.SOP.NP.NP' f''' xs
+-- 'hliftA3', 'Generics.SOP.NS.liftA3_NS' :: 'Generics.SOP.Sing.SListI' xs => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.NP' f xs -> 'Generics.SOP.NP.NP' f' xs -> 'Generics.SOP.NS.NS' f'' xs -> 'Generics.SOP.NS.NS' f''' xs
-- 'hliftA3', 'Generics.SOP.NP.liftA3_POP' :: 'SListI2' xss => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.POP' f xss -> 'Generics.SOP.NP.POP' f' xss -> 'Generics.SOP.NP.POP' f'' xss -> 'Generics.SOP.NP.POP' f''' xs
-- 'hliftA3', 'Generics.SOP.NS.liftA3_SOP' :: 'SListI2' xss => (forall a. f a -> f' a -> f'' a -> f''' a) -> 'Generics.SOP.NP.POP' f xss -> 'Generics.SOP.NP.POP' f' xss -> 'Generics.SOP.NS.SOP' f'' xss -> 'Generics.SOP.NP.SOP' f''' xs
-- @
@@ -299,6 +335,8 @@
hczipWith = hcliftA2
hczipWith3 = hcliftA3
+-- * Collapsing homogeneous structures
+
-- | Maps products to lists, and sums to identities.
type family CollapseTo (h :: (k -> *) -> (l -> *)) (x :: *) :: *
@@ -326,6 +364,8 @@
--
hcollapse :: SListIN h xs => h (K a) xs -> CollapseTo h a
+-- * Sequencing effects
+
-- | A generalization of 'Data.Traversable.sequenceA'.
class HAp h => HSequence (h :: (k -> *) -> (l -> *)) where
@@ -336,14 +376,16 @@
-- /Instances:/
--
-- @
- -- 'hsequence'', 'Generics.SOP.NP.sequence'_NP' :: ('SListI' xs , 'Applicative' f) => 'Generics.SOP.NP.NP' (f ':.:' g) xs -> f ('Generics.SOP.NP.NP' g xs )
- -- 'hsequence'', 'Generics.SOP.NS.sequence'_NS' :: ('SListI' xs , 'Applicative' f) => 'Generics.SOP.NS.NS' (f ':.:' g) xs -> f ('Generics.SOP.NS.NS' g xs )
+ -- 'hsequence'', 'Generics.SOP.NP.sequence'_NP' :: ('Generics.SOP.Sing.SListI' xs , 'Applicative' f) => 'Generics.SOP.NP.NP' (f ':.:' g) xs -> f ('Generics.SOP.NP.NP' g xs )
+ -- 'hsequence'', 'Generics.SOP.NS.sequence'_NS' :: ('Generics.SOP.Sing.SListI' xs , 'Applicative' f) => 'Generics.SOP.NS.NS' (f ':.:' g) xs -> f ('Generics.SOP.NS.NS' g xs )
-- 'hsequence'', 'Generics.SOP.NP.sequence'_POP' :: ('SListI2' xss, 'Applicative' f) => 'Generics.SOP.NP.POP' (f ':.:' g) xss -> f ('Generics.SOP.NP.POP' g xss)
-- 'hsequence'', 'Generics.SOP.NS.sequence'_SOP' :: ('SListI2' xss, 'Applicative' f) => 'Generics.SOP.NS.SOP' (f ':.:' g) xss -> f ('Generics.SOP.NS.SOP' g xss)
-- @
--
hsequence' :: (SListIN h xs, Applicative f) => h (f :.: g) xs -> f (h g xs)
+-- ** Derived functions
+
-- | Special case of 'hsequence'' where @g = 'I'@.
hsequence :: (SListIN h xs, SListIN (Prod h) xs, HSequence h) => Applicative f => h f xs -> f (h I xs)
hsequence = hsequence' . hliftA (Comp . fmap I)
@@ -351,3 +393,73 @@
-- | Special case of 'hsequence'' where @g = 'K' a@.
hsequenceK :: (SListIN h xs, SListIN (Prod h) xs, Applicative f, HSequence h) => h (K (f a)) xs -> f (h (K a) xs)
hsequenceK = hsequence' . hliftA (Comp . fmap K . unK)
+
+-- * Indexing into sums
+
+-- | A class for determining which choice in a sum-like structure
+-- a value represents.
+--
+class HIndex (h :: (k -> *) -> (l -> *)) where
+
+ -- | If 'h' is a sum-like structure representing a choice
+ -- between @n@ different options, and @x@ is a value of
+ -- type @h f xs@, then @'hindex' x@ returns a number between
+ -- @0@ and @n - 1@ representing the index of the choice
+ -- made by @x@.
+ --
+ -- /Instances:/
+ --
+ -- @
+ -- 'hindex', 'Generics.SOP.NS.index_NS' :: 'Generics.SOP.NS.NS' f xs -> Int
+ -- 'hindex', 'Generics.SOP.NS.index_SOP' :: 'Generics.SOP.NS.SOP' f xs -> Int
+ -- @
+ --
+ -- /Examples:/
+ --
+ -- >>> hindex (S (S (Z (I False))))
+ -- 2
+ -- >>> hindex (Z (K ()))
+ -- 0
+ -- >>> hindex (SOP (S (Z (I True :* I 'x' :* Nil))))
+ -- 1
+ --
+ -- @since 0.2.4.0
+ --
+ hindex :: h f xs -> Int
+
+-- * Applying all injections
+
+-- | Maps a structure containing products to the corresponding
+-- sum structure.
+--
+-- @since 0.2.4.0
+--
+type family UnProd (h :: (k -> *) -> (l -> *)) :: (k -> *) -> (l -> *)
+
+-- | A class for applying all injections corresponding to a sum-like
+-- structure to a table containing suitable arguments.
+--
+class (UnProd (Prod h) ~ h) => HApInjs (h :: (k -> *) -> (l -> *)) where
+
+ -- | For a given table (product-like structure), produce a list where
+ -- each element corresponds to the application of an injection function
+ -- into the corresponding sum-like structure.
+ --
+ -- /Instances:/
+ --
+ -- @
+ -- 'hapInjs', 'Generics.SOP.NS.apInjs_NP' :: 'Generics.SOP.Sing.SListI' xs => 'Generics.SOP.NP.NP' f xs -> ['Generics.SOP.NS.NS' f xs ]
+ -- 'hapInjs', 'Generics.SOP.NS.apInjs_SOP' :: 'SListI2' xss => 'Generics.SOP.NP.POP' f xs -> ['Generics.SOP.NS.SOP' f xss]
+ -- @
+ --
+ -- /Examples:/
+ --
+ -- >>> hapInjs (I 'x' :* I True :* I 2 :* Nil)
+ -- [Z (I 'x'), S (Z (I True)), S (S (Z (I 2)))]
+ --
+ -- >>> hapInjs (POP ((I 'x' :* Nil) :* (I True :* I 2 :* Nil) :* Nil)
+ -- [SOP (Z (I 'x' :* Nil)), SOP (S (Z (I True :* (I 2 :* Nil))))]
+ --
+ -- @since 0.2.4.0
+ --
+ hapInjs :: (SListIN h xs) => Prod h f xs -> [h f xs]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/src/Generics/SOP/Metadata.hs new/generics-sop-0.2.4.0/src/Generics/SOP/Metadata.hs
--- old/generics-sop-0.2.3.0/src/Generics/SOP/Metadata.hs 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/src/Generics/SOP/Metadata.hs 2017-02-02 14:06:35.000000000 +0100
@@ -39,14 +39,26 @@
-- Newtype
Newtype :: ModuleName -> DatatypeName -> ConstructorInfo '[x] -> DatatypeInfo '[ '[x] ]
+-- | The module name where a datatype is defined.
+--
+-- @since 0.2.3.0
+--
moduleName :: DatatypeInfo xss -> ModuleName
moduleName (ADT name _ _) = name
moduleName (Newtype name _ _) = name
+-- | The name of a datatype (or newtype).
+--
+-- @since 0.2.3.0
+--
datatypeName :: DatatypeInfo xss -> DatatypeName
datatypeName (ADT _ name _ ) = name
datatypeName (Newtype _ name _) = name
+-- | The constructor info for a datatype (or newtype).
+--
+-- @since 0.2.3.0
+--
constructorInfo :: DatatypeInfo xss -> NP ConstructorInfo xss
constructorInfo (ADT _ _ cs) = cs
constructorInfo (Newtype _ _ c) = c :* Nil
@@ -67,6 +79,10 @@
-- Record constructor
Record :: SListI xs => ConstructorName -> NP FieldInfo xs -> ConstructorInfo xs
+-- | The name of a constructor.
+--
+-- @since 0.2.3.0
+--
constructorName :: ConstructorInfo xs -> ConstructorName
constructorName (Constructor name) = name
constructorName (Infix name _ _) = name
@@ -81,6 +97,10 @@
FieldInfo :: FieldName -> FieldInfo a
deriving (Show, Eq, Ord, Functor)
+-- | The name of a field.
+--
+-- @since 0.2.3.0
+--
fieldName :: FieldInfo a -> FieldName
fieldName (FieldInfo n) = n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/src/Generics/SOP/NS.hs new/generics-sop-0.2.4.0/src/Generics/SOP/NS.hs
--- old/generics-sop-0.2.3.0/src/Generics/SOP/NS.hs 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/src/Generics/SOP/NS.hs 2017-02-02 14:06:35.000000000 +0100
@@ -1,11 +1,14 @@
-{-# LANGUAGE PolyKinds, StandaloneDeriving, UndecidableInstances #-}
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-- | n-ary sums (and sums of products)
module Generics.SOP.NS
( -- * Datatypes
NS(..)
, SOP(..)
- , unZ
, unSOP
-- * Constructing sums
, Injection
@@ -14,6 +17,10 @@
, shiftInjection
, apInjs_NP
, apInjs_POP
+ -- * Destructing sums
+ , unZ
+ , index_NS
+ , index_SOP
-- * Application
, ap_NS
, ap_SOP
@@ -123,6 +130,31 @@
unZ (Z x) = x
unZ _ = error "inaccessible" -- needed even in GHC 8.0.1
+-- | Obtain the index from an n-ary sum.
+--
+-- An n-nary sum represents a choice between n different options.
+-- This function returns an integer between 0 and n - 1 indicating
+-- the option chosen by the given value.
+--
+-- /Examples:/
+--
+-- >>> index_NS (S (S (Z (I False))))
+-- 2
+-- >>> index_NS (Z (K ()))
+-- 0
+--
+-- @since 0.2.4.0
+--
+index_NS :: forall f xs . NS f xs -> Int
+index_NS = go 0
+ where
+ go :: forall ys . Int -> NS f ys -> Int
+ go !acc (Z _) = acc
+ go !acc (S x) = go (acc + 1) x
+
+instance HIndex NS where
+ hindex = index_NS
+
-- | A sum of products.
--
-- This is a 'newtype' for an 'NS' of an 'NP'. The elements of the
@@ -146,6 +178,31 @@
unSOP :: SOP f xss -> NS (NP f) xss
unSOP (SOP xss) = xss
+-- | Obtain the index from an n-ary sum of products.
+--
+-- An n-nary sum represents a choice between n different options.
+-- This function returns an integer between 0 and n - 1 indicating
+-- the option chosen by the given value.
+--
+-- /Specification:/
+--
+-- @
+-- 'index_SOP' = 'index_NS' '.' 'unSOP'
+-- @
+--
+-- /Example:/
+--
+-- >>> index_SOP (SOP (S (Z (I True :* I 'x' :* Nil))))
+-- 1
+--
+-- @since 0.2.4.0
+--
+index_SOP :: SOP f xs -> Int
+index_SOP = index_NS . unSOP
+
+instance HIndex SOP where
+ hindex = index_SOP
+
-- * Constructing sums
-- | The type of injections into an n-ary sum.
@@ -212,6 +269,15 @@
apInjs_POP :: SListI xss => POP f xss -> [SOP f xss]
apInjs_POP = map SOP . apInjs_NP . unPOP
+type instance UnProd NP = NS
+type instance UnProd POP = SOP
+
+instance HApInjs NS where
+ hapInjs = apInjs_NP
+
+instance HApInjs SOP where
+ hapInjs = apInjs_POP
+
-- * Application
-- | Specialization of 'hap'.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/generics-sop-0.2.3.0/src/Generics/SOP.hs new/generics-sop-0.2.4.0/src/Generics/SOP.hs
--- old/generics-sop-0.2.3.0/src/Generics/SOP.hs 2016-12-04 11:26:01.000000000 +0100
+++ new/generics-sop-0.2.4.0/src/Generics/SOP.hs 2017-02-02 14:06:35.000000000 +0100
@@ -221,7 +221,6 @@
-- * n-ary datatypes
, NP(..)
, NS(..)
- , unZ
, SOP(..)
, unSOP
, POP(..)
@@ -277,8 +276,13 @@
, injections
, shift
, shiftInjection
- , apInjs_NP
- , apInjs_POP
+ , UnProd
+ , HApInjs(..)
+ , apInjs_NP -- deprecated export
+ , apInjs_POP -- deprecated export
+ -- ** Destructing sums
+ , unZ
+ , HIndex(..)
-- ** Dealing with @'All' c@
, hcliftA'
, hcliftA2'
[View Less]
1
0