openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
November 2014
- 1 participants
- 1346 discussions
Hello community,
here is the log from the commit of package ghc-hashable for openSUSE:Factory checked in at 2014-11-26 20:54:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hashable (Old)
and /work/SRC/openSUSE:Factory/.ghc-hashable.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hashable"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hashable/ghc-hashable.changes 2014-08-25 11:05:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-hashable.new/ghc-hashable.changes 2014-11-26 20:54:47.000000000 +0100
@@ -1,0 +2,12 @@
+Tue Sep 9 20:29:11 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 1.2.2.0
+* several performance fixes including use of SSE and SSE2
+* Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
+Tue Sep 2 08:58:18 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file
+
+-------------------------------------------------------------------
Old:
----
hashable-1.1.2.5.tar.gz
New:
----
hashable-1.2.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-hashable.spec ++++++
--- /var/tmp/diff_new_pack.22gaCw/_old 2014-11-26 20:54:48.000000000 +0100
+++ /var/tmp/diff_new_pack.22gaCw/_new 2014-11-26 20:54:48.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-hashable
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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,40 +18,43 @@
%global pkg_name hashable
-%global common_summary Haskell class for types that can be converted to a hash value
-
-%global common_description This package defines a Haskell class, Hashable, for types that can be converted to a hash value. This class exists for the benefit of hashing-based data structures. The package provides instances for basic types and a way to combine hash values.
-
Name: ghc-hashable
-Version: 1.1.2.5
+Version: 1.2.2.0
Release: 0
-Summary: %{common_summary}
+Summary: A class for types that can be converted to a hash value
License: BSD-3-Clause
Group: System/Libraries
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# BEGIN cabal2spec
Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
+BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-text-devel
-# END cabal2spec
+# End cabal-rpm deps
%description
-%{common_description}
+This package defines a class, 'Hashable', for types that can be converted to a
+hash value. This class exists for the benefit of hashing-based data structures.
+The package provides instances for basic types and a way to combine hash
+values.
+
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Languages/Other
-Requires: ghc-compiler
-Requires(post): ghc-compiler
-Requires(postun): ghc-compiler
+Group: Development/Libraries/Other
+Provides: %{name}-static = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
%description devel
-%{common_description}
-This package contains the development files.
+This package provides the Haskell %{pkg_name} library development files.
+
%prep
%setup -q -n %{pkg_name}-%{version}
@@ -70,9 +73,10 @@
%files -f %{name}.files
%defattr(-,root,root,-)
-%doc LICENSE README.md
+%doc LICENSE
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc README.md
%changelog
++++++ hashable-1.1.2.5.tar.gz -> hashable-1.2.2.0.tar.gz ++++++
++++ 3178 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-GLUT for openSUSE:Factory checked in at 2014-11-26 20:54:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-GLUT (Old)
and /work/SRC/openSUSE:Factory/.ghc-GLUT.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-GLUT"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-GLUT/ghc-GLUT.changes 2014-08-25 11:05:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-GLUT.new/ghc-GLUT.changes 2014-11-26 20:54:45.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Sep 9 20:05:27 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 2.5.1.1
+* no changelog
+* for Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
Old:
----
GLUT-2.4.0.0.tar.gz
New:
----
GLUT-2.5.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-GLUT.spec ++++++
--- /var/tmp/diff_new_pack.KWP6kA/_old 2014-11-26 20:54:47.000000000 +0100
+++ /var/tmp/diff_new_pack.KWP6kA/_new 2014-11-26 20:54:47.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-GLUT
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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,16 +18,10 @@
%global pkg_name GLUT
-# common part of summary for all the subpackages
-%global common_summary Haskell inding for the OpenGL Utility Toolkit
-
-# main description used for all the subpackages
-%global common_description A Haskell binding for the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs.
-
Name: ghc-GLUT
-Version: 2.4.0.0
+Version: 2.5.1.1
Release: 0
-Summary: %{common_summary}
+Summary: Haskell inding for the OpenGL Utility Toolkit
License: BSD-3-Clause
Group: Development/Libraries/Other
@@ -44,7 +38,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
-%{common_description}
+A Haskell binding for the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs.
+
%package devel
Summary: Haskell %{pkg_name} library development files
@@ -56,8 +51,7 @@
Requires: freeglut-devel
%description devel
-%{common_description}
-This package contains the development files.
+This package contains the development files for library GLUT Haskell.
%prep
%setup -q -n %{pkg_name}-%{version}
++++++ GLUT-2.4.0.0.tar.gz -> GLUT-2.5.1.1.tar.gz ++++++
++++ 19951 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-GLURaw for openSUSE:Factory checked in at 2014-11-26 20:54:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-GLURaw (Old)
and /work/SRC/openSUSE:Factory/.ghc-GLURaw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-GLURaw"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-GLURaw/ghc-GLURaw.changes 2014-08-25 11:05:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-GLURaw.new/ghc-GLURaw.changes 2014-11-26 20:54:43.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Sep 9 20:00:31 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 1.4.0.1
+* no changelog
+* for Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
Old:
----
GLURaw-1.3.0.0.tar.gz
New:
----
GLURaw-1.4.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-GLURaw.spec ++++++
--- /var/tmp/diff_new_pack.HZc0PG/_old 2014-11-26 20:54:44.000000000 +0100
+++ /var/tmp/diff_new_pack.HZc0PG/_new 2014-11-26 20:54:44.000000000 +0100
@@ -1,8 +1,7 @@
#
# spec file for package ghc-GLURaw
#
-
-# Copyright (c) 2013 Peter Trommler peter.trommler(a)ohm-hochschule.de
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%global pkg_name GLURaw
%global common_summary A raw binding for the OpenGL graphics system
@@ -23,19 +23,19 @@
%global common_description GLURaw is a raw Haskell binding for the GLU 1.3 OpenGL utility library. It is basically a 1:1 mapping of the GLU C API, intended as a basis for a nicer interface.
Name: ghc-GLURaw
-Version: 1.3.0.0
-Release: 1
+Version: 1.4.0.1
+Release: 0
Summary: %{common_summary}
-
-Group: System/Libraries
License: BSD-3-Clause
+Group: System/Libraries
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BEGIN cabal2spec
-URL: http://hackage.haskell.org/package/%{pkg_name}
+Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-rpm-macros
BuildRequires: ghc-OpenGLRaw-devel
+BuildRequires: ghc-rpm-macros
%if 0%{?suse_version}<1230
BuildRequires: Mesa-devel
%else
@@ -63,15 +63,12 @@
%{common_description}
This package contains the development files.
-
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
++++++ GLURaw-1.3.0.0.tar.gz -> GLURaw-1.4.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/GLURaw.cabal new/GLURaw-1.4.0.1/GLURaw.cabal
--- old/GLURaw-1.3.0.0/GLURaw.cabal 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/GLURaw.cabal 2014-05-19 17:18:28.000000000 +0200
@@ -1,8 +1,8 @@
name: GLURaw
-version: 1.3.0.0
+version: 1.4.0.1
license: BSD3
license-file: LICENSE
-maintainer: Jason Dagit <dagitj(a)gmail.com>, Sven Panne <sven.panne(a)aedion.de>
+maintainer: Sven Panne <svenpanne(a)gmail.com>, Jason Dagit <dagitj(a)gmail.com>
bug-reports: https://github.com/haskell-opengl/GLURaw/issues
homepage: http://www.haskell.org/haskellwiki/Opengl
category: Graphics
@@ -21,6 +21,7 @@
build-type: Simple
cabal-version: >= 1.6
extra-source-files:
+ README.md
include/HsGLURaw.h
flag UseNativeWindowsLibraries
@@ -42,10 +43,13 @@
cbits/HsGLURaw.c
hs-Source-Dirs: src
include-dirs: include
- build-depends: base >= 3 && < 5, OpenGLRaw == 1.3.*
- ghc-options: -Wall
+ build-depends: base >= 3 && < 5, OpenGLRaw >= 1.3.0.0
+ ghc-options: -Wall -O2
if os(windows) && flag(UseNativeWindowsLibraries)
- cpp-options: "-DCALLCONV=stdcall"
+ if arch(i386)
+ cpp-options: "-DCALLCONV=stdcall"
+ else
+ cpp-options: "-DCALLCONV=ccall"
cc-options: "-DUSE_GETPROCADDRESS"
extra-libraries: glu32
else
@@ -54,7 +58,10 @@
if os(darwin)
frameworks: OpenGL
else
- extra-libraries: GLU
+ if os(ios)
+ frameworks: OpenGLES
+ else
+ extra-libraries: GLU
source-repository head
type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/README.md new/GLURaw-1.4.0.1/README.md
--- old/GLURaw-1.3.0.0/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/GLURaw-1.4.0.1/README.md 2014-05-19 17:18:28.000000000 +0200
@@ -0,0 +1 @@
+[![Build Status](https://travis-ci.org/haskell-opengl/GLURaw.png)](https://travis-ci…
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/cbits/HsGLURaw.c new/GLURaw-1.4.0.1/cbits/HsGLURaw.c
--- old/GLURaw-1.3.0.0/cbits/HsGLURaw.c 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/cbits/HsGLURaw.c 2014-05-19 17:18:28.000000000 +0200
@@ -1,10 +1,10 @@
/* -----------------------------------------------------------------------------
*
* Module : C support for Graphics.Rendering.GLU.Raw.Extensions
- * Copyright : (c) Sven Panne 2009
- * License : BSD-style (see the file LICENSE)
+ * Copyright : (c) Sven Panne 2013
+ * License : BSD3
*
- * Maintainer : sven.panne(a)aedion.de
+ * Maintainer : Sven Panne <svenpanne(a)gmail.com>
* Stability : stable
* Portability : portable
*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/include/HsGLURaw.h new/GLURaw-1.4.0.1/include/HsGLURaw.h
--- old/GLURaw-1.3.0.0/include/HsGLURaw.h 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/include/HsGLURaw.h 2014-05-19 17:18:28.000000000 +0200
@@ -1,10 +1,10 @@
/* -----------------------------------------------------------------------------
*
* Module : GL extension support for Graphics.Rendering.GLU.Raw
- * Copyright : (c) Sven Panne 2009
- * License : BSD-style (see the file LICENSE)
+ * Copyright : (c) Sven Panne 2013
+ * License : BSD3
*
- * Maintainer : sven.panne(a)aedion.de
+ * Maintainer : Sven Panne <svenpanne(a)gmail.com>
* Stability : stable
* Portability : portable
*
@@ -15,19 +15,21 @@
#ifndef HSGLURAW_H
#define HSGLURAW_H
+#define HASH #
+
/* NOTE: The macro must immediately start with the foreign declaration,
otherwise the magic mangler (hack_foreign) in the Hugs build system
doesn't recognize it. */
-#define API_ENTRY_INTERNAL(_entry,_ty,_safety) \
-foreign import CALLCONV _safety "dynamic" dyn_/**/_entry :: Graphics.Rendering.GLU.Raw.APIEntry.Invoker (_ty) ; \
+#define API_ENTRY_INTERNAL(_dyn_entry,_ptr_entry,_str_entry,_entry,_ty,_safety) \
+foreign import CALLCONV _safety "dynamic" _dyn_entry :: Graphics.Rendering.GLU.Raw.APIEntry.Invoker (_ty) ; \
_entry :: (_ty) ; \
-_entry = dyn_/**/_entry ptr_/**/_entry ; \
-ptr_/**/_entry :: FunPtr a ; \
-ptr_/**/_entry = unsafePerformIO (Graphics.Rendering.GLU.Raw.APIEntry.getAPIEntry "_entry") ; \
-{-# NOINLINE ptr_/**/_entry #-}
+_entry = _dyn_entry _ptr_entry ; \
+_ptr_entry :: FunPtr a ; \
+_ptr_entry = unsafePerformIO (Graphics.Rendering.GLU.Raw.APIEntry.getAPIEntry _str_entry) ; \
+{-HASH NOINLINE _ptr_entry HASH-}
-#define API_ENTRY(_entry,_ty) API_ENTRY_INTERNAL(_entry,_ty,unsafe)
+#define API_ENTRY(_dyn_entry,_ptr_entry,_str_entry,_entry,_ty) API_ENTRY_INTERNAL(_dyn_entry,_ptr_entry,_str_entry,_entry,_ty,unsafe)
-#define API_ENTRY_SAFE(_entry,_ty) API_ENTRY_INTERNAL(_entry,_ty,safe)
+#define API_ENTRY_SAFE(_dyn_entry,_ptr_entry,_str_entry,_entry,_ty) API_ENTRY_INTERNAL(_dyn_entry,_ptr_entry,_str_entry,_entry,_ty,safe)
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/APIEntry.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/APIEntry.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/APIEntry.hs 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/APIEntry.hs 2014-05-19 17:18:28.000000000 +0200
@@ -1,12 +1,12 @@
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--- #hide
+{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.APIEntry
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Callbacks.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Callbacks.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Callbacks.hs 2012-11-04 20:17:43.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Callbacks.hs 2014-05-19 17:18:28.000000000 +0200
@@ -2,10 +2,10 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.Callbacks
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
@@ -52,7 +52,6 @@
import Foreign.Ptr
import Foreign.C.Types
import Graphics.Rendering.OpenGL.Raw
-import Graphics.Rendering.OpenGL.Raw.Core31.Types
--------------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Functions.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Functions.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Functions.hs 2012-11-04 20:17:43.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Functions.hs 2014-05-19 17:18:28.000000000 +0200
@@ -2,10 +2,10 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.Functions
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
@@ -80,68 +80,67 @@
import Graphics.Rendering.GLU.Raw.APIEntry
import Graphics.Rendering.GLU.Raw.Types
import Graphics.Rendering.OpenGL.Raw.Core31
-import Graphics.Rendering.OpenGL.Raw.Core31.Types
#include "HsGLURaw.h"
--------------------------------------------------------------------------------
-API_ENTRY_SAFE(gluBeginCurve,Ptr GLUnurbs -> IO ())
-API_ENTRY_SAFE(gluBeginPolygon,Ptr GLUtesselator -> IO ())
-API_ENTRY_SAFE(gluBeginSurface,Ptr GLUnurbs -> IO ())
-API_ENTRY_SAFE(gluBeginTrim,Ptr GLUnurbs -> IO ())
-API_ENTRY(gluBuild1DMipmapLevels,GLenum -> GLint -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
-API_ENTRY(gluBuild1DMipmaps,GLenum -> GLint -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
-API_ENTRY(gluBuild2DMipmapLevels,GLenum -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
-API_ENTRY(gluBuild2DMipmaps,GLenum -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
-API_ENTRY(gluBuild3DMipmapLevels,GLenum -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
-API_ENTRY(gluBuild3DMipmaps,GLenum -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
-API_ENTRY(gluCheckExtension,Ptr GLubyte -> Ptr GLubyte -> IO GLboolean)
-API_ENTRY_SAFE(gluCylinder,Ptr GLUquadric -> GLdouble -> GLdouble -> GLdouble -> GLint -> GLint -> IO ())
-API_ENTRY_SAFE(gluDeleteNurbsRenderer,Ptr GLUnurbs -> IO ())
-API_ENTRY(gluDeleteQuadric,Ptr GLUquadric -> IO ())
-API_ENTRY_SAFE(gluDeleteTess,Ptr GLUtesselator -> IO ())
-API_ENTRY_SAFE(gluDisk,Ptr GLUquadric -> GLdouble -> GLdouble -> GLint -> GLint -> IO ())
-API_ENTRY_SAFE(gluEndCurve,Ptr GLUnurbs -> IO ())
-API_ENTRY_SAFE(gluEndPolygon,Ptr GLUtesselator -> IO ())
-API_ENTRY_SAFE(gluEndSurface,Ptr GLUnurbs -> IO ())
-API_ENTRY_SAFE(gluEndTrim,Ptr GLUnurbs -> IO ())
-API_ENTRY(gluErrorString,GLenum -> IO (Ptr GLubyte))
-API_ENTRY_SAFE(gluGetNurbsProperty,Ptr GLUnurbs -> GLenum -> Ptr GLfloat -> IO ())
-API_ENTRY(gluGetString,GLenum -> IO (Ptr GLubyte))
-API_ENTRY_SAFE(gluGetTessProperty,Ptr GLUtesselator -> GLenum -> Ptr GLdouble -> IO ())
-API_ENTRY_SAFE(gluLoadSamplingMatrices,Ptr GLUnurbs -> Ptr GLfloat -> Ptr GLfloat -> Ptr GLint -> IO ())
-API_ENTRY(gluLookAt,GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
-API_ENTRY_SAFE(gluNewNurbsRenderer,IO (Ptr GLUnurbs))
-API_ENTRY(gluNewQuadric,IO (Ptr GLUquadric))
-API_ENTRY(gluNewTess,IO (Ptr GLUtesselator))
-API_ENTRY_SAFE(gluNextContour,Ptr GLUtesselator -> GLenum -> IO ())
-API_ENTRY_SAFE(gluNurbsCallback,Ptr GLUnurbs -> GLenum -> FunPtr a -> IO ())
-API_ENTRY_SAFE(gluNurbsCallbackData,Ptr GLUnurbs -> Ptr a -> IO ())
-API_ENTRY_SAFE(gluNurbsCallbackDataEXT,Ptr GLUnurbs -> Ptr a -> IO ())
-API_ENTRY_SAFE(gluNurbsCurve,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLenum -> IO ())
-API_ENTRY_SAFE(gluNurbsProperty,Ptr GLUnurbs -> GLenum -> GLfloat -> IO ())
-API_ENTRY_SAFE(gluNurbsSurface,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLint -> Ptr GLfloat -> GLint -> GLint -> GLenum -> IO ())
-API_ENTRY(gluOrtho2D,GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
-API_ENTRY_SAFE(gluPartialDisk,Ptr GLUquadric -> GLdouble -> GLdouble -> GLint -> GLint -> GLdouble -> GLdouble -> IO ())
-API_ENTRY(gluPerspective,GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
-API_ENTRY(gluPickMatrix,GLdouble -> GLdouble -> GLdouble -> GLdouble -> Ptr GLint -> IO ())
-API_ENTRY(gluProject,GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
-API_ENTRY_SAFE(gluPwlCurve,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> GLenum -> IO ())
-API_ENTRY_SAFE(gluQuadricCallback,Ptr GLUquadric -> GLenum -> FunPtr a -> IO ())
-API_ENTRY_SAFE(gluQuadricDrawStyle,Ptr GLUquadric -> GLenum -> IO ())
-API_ENTRY_SAFE(gluQuadricNormals,Ptr GLUquadric -> GLenum -> IO ())
-API_ENTRY_SAFE(gluQuadricOrientation,Ptr GLUquadric -> GLenum -> IO ())
-API_ENTRY_SAFE(gluQuadricTexture,Ptr GLUquadric -> GLboolean -> IO ())
-API_ENTRY(gluScaleImage,GLenum -> GLsizei -> GLsizei -> GLenum -> Ptr a -> GLsizei -> GLsizei -> GLenum -> Ptr b -> IO GLint)
-API_ENTRY_SAFE(gluSphere,Ptr GLUquadric -> GLdouble -> GLint -> GLint -> IO ())
-API_ENTRY_SAFE(gluTessBeginContour,Ptr GLUtesselator -> IO ())
-API_ENTRY_SAFE(gluTessBeginPolygon,Ptr GLUtesselator -> Ptr a -> IO ())
-API_ENTRY_SAFE(gluTessCallback,Ptr GLUtesselator -> GLenum -> FunPtr a -> IO ())
-API_ENTRY_SAFE(gluTessEndContour,Ptr GLUtesselator -> IO ())
-API_ENTRY_SAFE(gluTessEndPolygon,Ptr GLUtesselator -> IO ())
-API_ENTRY(gluTessNormal,Ptr GLUtesselator -> GLdouble -> GLdouble -> GLdouble -> IO ())
-API_ENTRY_SAFE(gluTessProperty,Ptr GLUtesselator -> GLenum -> GLdouble -> IO ())
-API_ENTRY_SAFE(gluTessVertex,Ptr GLUtesselator -> Ptr GLdouble -> Ptr a -> IO ())
-API_ENTRY(gluUnProject,GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
-API_ENTRY(gluUnProject4,GLdouble -> GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> GLclampd -> GLclampd -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
+API_ENTRY_SAFE(dyn_gluBeginCurve,ptr_gluBeginCurve,"gluBeginCurve",gluBeginCurve,Ptr GLUnurbs -> IO ())
+API_ENTRY_SAFE(dyn_gluBeginPolygon,ptr_gluBeginPolygon,"gluBeginPolygon",gluBeginPolygon,Ptr GLUtesselator -> IO ())
+API_ENTRY_SAFE(dyn_gluBeginSurface,ptr_gluBeginSurface,"gluBeginSurface",gluBeginSurface,Ptr GLUnurbs -> IO ())
+API_ENTRY_SAFE(dyn_gluBeginTrim,ptr_gluBeginTrim,"gluBeginTrim",gluBeginTrim,Ptr GLUnurbs -> IO ())
+API_ENTRY(dyn_gluBuild1DMipmapLevels,ptr_gluBuild1DMipmapLevels,"gluBuild1DMipmapLevels",gluBuild1DMipmapLevels,GLenum -> GLint -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluBuild1DMipmaps,ptr_gluBuild1DMipmaps,"gluBuild1DMipmaps",gluBuild1DMipmaps,GLenum -> GLint -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluBuild2DMipmapLevels,ptr_gluBuild2DMipmapLevels,"gluBuild2DMipmapLevels",gluBuild2DMipmapLevels,GLenum -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluBuild2DMipmaps,ptr_gluBuild2DMipmaps,"gluBuild2DMipmaps",gluBuild2DMipmaps,GLenum -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluBuild3DMipmapLevels,ptr_gluBuild3DMipmapLevels,"gluBuild3DMipmapLevels",gluBuild3DMipmapLevels,GLenum -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum -> GLint -> GLint -> GLint -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluBuild3DMipmaps,ptr_gluBuild3DMipmaps,"gluBuild3DMipmaps",gluBuild3DMipmaps,GLenum -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum -> Ptr a -> IO GLint)
+API_ENTRY(dyn_gluCheckExtension,ptr_gluCheckExtension,"gluCheckExtension",gluCheckExtension,Ptr GLubyte -> Ptr GLubyte -> IO GLboolean)
+API_ENTRY_SAFE(dyn_gluCylinder,ptr_gluCylinder,"gluCylinder",gluCylinder,Ptr GLUquadric -> GLdouble -> GLdouble -> GLdouble -> GLint -> GLint -> IO ())
+API_ENTRY_SAFE(dyn_gluDeleteNurbsRenderer,ptr_gluDeleteNurbsRenderer,"gluDeleteNurbsRenderer",gluDeleteNurbsRenderer,Ptr GLUnurbs -> IO ())
+API_ENTRY(dyn_gluDeleteQuadric,ptr_gluDeleteQuadric,"gluDeleteQuadric",gluDeleteQuadric,Ptr GLUquadric -> IO ())
+API_ENTRY_SAFE(dyn_gluDeleteTess,ptr_gluDeleteTess,"gluDeleteTess",gluDeleteTess,Ptr GLUtesselator -> IO ())
+API_ENTRY_SAFE(dyn_gluDisk,ptr_gluDisk,"gluDisk",gluDisk,Ptr GLUquadric -> GLdouble -> GLdouble -> GLint -> GLint -> IO ())
+API_ENTRY_SAFE(dyn_gluEndCurve,ptr_gluEndCurve,"gluEndCurve",gluEndCurve,Ptr GLUnurbs -> IO ())
+API_ENTRY_SAFE(dyn_gluEndPolygon,ptr_gluEndPolygon,"gluEndPolygon",gluEndPolygon,Ptr GLUtesselator -> IO ())
+API_ENTRY_SAFE(dyn_gluEndSurface,ptr_gluEndSurface,"gluEndSurface",gluEndSurface,Ptr GLUnurbs -> IO ())
+API_ENTRY_SAFE(dyn_gluEndTrim,ptr_gluEndTrim,"gluEndTrim",gluEndTrim,Ptr GLUnurbs -> IO ())
+API_ENTRY(dyn_gluErrorString,ptr_gluErrorString,"gluErrorString",gluErrorString,GLenum -> IO (Ptr GLubyte))
+API_ENTRY_SAFE(dyn_gluGetNurbsProperty,ptr_gluGetNurbsProperty,"gluGetNurbsProperty",gluGetNurbsProperty,Ptr GLUnurbs -> GLenum -> Ptr GLfloat -> IO ())
+API_ENTRY(dyn_gluGetString,ptr_gluGetString,"gluGetString",gluGetString,GLenum -> IO (Ptr GLubyte))
+API_ENTRY_SAFE(dyn_gluGetTessProperty,ptr_gluGetTessProperty,"gluGetTessProperty",gluGetTessProperty,Ptr GLUtesselator -> GLenum -> Ptr GLdouble -> IO ())
+API_ENTRY_SAFE(dyn_gluLoadSamplingMatrices,ptr_gluLoadSamplingMatrices,"gluLoadSamplingMatrices",gluLoadSamplingMatrices,Ptr GLUnurbs -> Ptr GLfloat -> Ptr GLfloat -> Ptr GLint -> IO ())
+API_ENTRY(dyn_gluLookAt,ptr_gluLookAt,"gluLookAt",gluLookAt,GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
+API_ENTRY_SAFE(dyn_gluNewNurbsRenderer,ptr_gluNewNurbsRenderer,"gluNewNurbsRenderer",gluNewNurbsRenderer,IO (Ptr GLUnurbs))
+API_ENTRY(dyn_gluNewQuadric,ptr_gluNewQuadric,"gluNewQuadric",gluNewQuadric,IO (Ptr GLUquadric))
+API_ENTRY(dyn_gluNewTess,ptr_gluNewTess,"gluNewTess",gluNewTess,IO (Ptr GLUtesselator))
+API_ENTRY_SAFE(dyn_gluNextContour,ptr_gluNextContour,"gluNextContour",gluNextContour,Ptr GLUtesselator -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsCallback,ptr_gluNurbsCallback,"gluNurbsCallback",gluNurbsCallback,Ptr GLUnurbs -> GLenum -> FunPtr a -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsCallbackData,ptr_gluNurbsCallbackData,"gluNurbsCallbackData",gluNurbsCallbackData,Ptr GLUnurbs -> Ptr a -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsCallbackDataEXT,ptr_gluNurbsCallbackDataEXT,"gluNurbsCallbackDataEXT",gluNurbsCallbackDataEXT,Ptr GLUnurbs -> Ptr a -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsCurve,ptr_gluNurbsCurve,"gluNurbsCurve",gluNurbsCurve,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsProperty,ptr_gluNurbsProperty,"gluNurbsProperty",gluNurbsProperty,Ptr GLUnurbs -> GLenum -> GLfloat -> IO ())
+API_ENTRY_SAFE(dyn_gluNurbsSurface,ptr_gluNurbsSurface,"gluNurbsSurface",gluNurbsSurface,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLint -> Ptr GLfloat -> GLint -> GLint -> GLenum -> IO ())
+API_ENTRY(dyn_gluOrtho2D,ptr_gluOrtho2D,"gluOrtho2D",gluOrtho2D,GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
+API_ENTRY_SAFE(dyn_gluPartialDisk,ptr_gluPartialDisk,"gluPartialDisk",gluPartialDisk,Ptr GLUquadric -> GLdouble -> GLdouble -> GLint -> GLint -> GLdouble -> GLdouble -> IO ())
+API_ENTRY(dyn_gluPerspective,ptr_gluPerspective,"gluPerspective",gluPerspective,GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ())
+API_ENTRY(dyn_gluPickMatrix,ptr_gluPickMatrix,"gluPickMatrix",gluPickMatrix,GLdouble -> GLdouble -> GLdouble -> GLdouble -> Ptr GLint -> IO ())
+API_ENTRY(dyn_gluProject,ptr_gluProject,"gluProject",gluProject,GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
+API_ENTRY_SAFE(dyn_gluPwlCurve,ptr_gluPwlCurve,"gluPwlCurve",gluPwlCurve,Ptr GLUnurbs -> GLint -> Ptr GLfloat -> GLint -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluQuadricCallback,ptr_gluQuadricCallback,"gluQuadricCallback",gluQuadricCallback,Ptr GLUquadric -> GLenum -> FunPtr a -> IO ())
+API_ENTRY_SAFE(dyn_gluQuadricDrawStyle,ptr_gluQuadricDrawStyle,"gluQuadricDrawStyle",gluQuadricDrawStyle,Ptr GLUquadric -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluQuadricNormals,ptr_gluQuadricNormals,"gluQuadricNormals",gluQuadricNormals,Ptr GLUquadric -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluQuadricOrientation,ptr_gluQuadricOrientation,"gluQuadricOrientation",gluQuadricOrientation,Ptr GLUquadric -> GLenum -> IO ())
+API_ENTRY_SAFE(dyn_gluQuadricTexture,ptr_gluQuadricTexture,"gluQuadricTexture",gluQuadricTexture,Ptr GLUquadric -> GLboolean -> IO ())
+API_ENTRY(dyn_gluScaleImage,ptr_gluScaleImage,"gluScaleImage",gluScaleImage,GLenum -> GLsizei -> GLsizei -> GLenum -> Ptr a -> GLsizei -> GLsizei -> GLenum -> Ptr b -> IO GLint)
+API_ENTRY_SAFE(dyn_gluSphere,ptr_gluSphere,"gluSphere",gluSphere,Ptr GLUquadric -> GLdouble -> GLint -> GLint -> IO ())
+API_ENTRY_SAFE(dyn_gluTessBeginContour,ptr_gluTessBeginContour,"gluTessBeginContour",gluTessBeginContour,Ptr GLUtesselator -> IO ())
+API_ENTRY_SAFE(dyn_gluTessBeginPolygon,ptr_gluTessBeginPolygon,"gluTessBeginPolygon",gluTessBeginPolygon,Ptr GLUtesselator -> Ptr a -> IO ())
+API_ENTRY_SAFE(dyn_gluTessCallback,ptr_gluTessCallback,"gluTessCallback",gluTessCallback,Ptr GLUtesselator -> GLenum -> FunPtr a -> IO ())
+API_ENTRY_SAFE(dyn_gluTessEndContour,ptr_gluTessEndContour,"gluTessEndContour",gluTessEndContour,Ptr GLUtesselator -> IO ())
+API_ENTRY_SAFE(dyn_gluTessEndPolygon,ptr_gluTessEndPolygon,"gluTessEndPolygon",gluTessEndPolygon,Ptr GLUtesselator -> IO ())
+API_ENTRY(dyn_gluTessNormal,ptr_gluTessNormal,"gluTessNormal",gluTessNormal,Ptr GLUtesselator -> GLdouble -> GLdouble -> GLdouble -> IO ())
+API_ENTRY_SAFE(dyn_gluTessProperty,ptr_gluTessProperty,"gluTessProperty",gluTessProperty,Ptr GLUtesselator -> GLenum -> GLdouble -> IO ())
+API_ENTRY_SAFE(dyn_gluTessVertex,ptr_gluTessVertex,"gluTessVertex",gluTessVertex,Ptr GLUtesselator -> Ptr GLdouble -> Ptr a -> IO ())
+API_ENTRY(dyn_gluUnProject,ptr_gluUnProject,"gluUnProject",gluUnProject,GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
+API_ENTRY(dyn_gluUnProject4,ptr_gluUnProject4,"gluUnProject4",gluUnProject4,GLdouble -> GLdouble -> GLdouble -> GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLint -> GLclampd -> GLclampd -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> Ptr GLdouble -> IO GLint)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Tokens.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Tokens.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Tokens.hs 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Tokens.hs 2014-05-19 17:18:28.000000000 +0200
@@ -1,10 +1,10 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.Tokens
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Types.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Types.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/Types.hs 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/Types.hs 2014-05-19 17:18:28.000000000 +0200
@@ -1,10 +1,10 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.Types
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/TypesInternal.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/TypesInternal.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw/TypesInternal.hs 2012-11-04 20:17:44.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw/TypesInternal.hs 2014-05-19 17:18:28.000000000 +0200
@@ -1,11 +1,11 @@
--- #hide
+{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw.TypesInternal
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw.hs new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw.hs
--- old/GLURaw-1.3.0.0/src/Graphics/Rendering/GLU/Raw.hs 2012-11-04 20:17:43.000000000 +0100
+++ new/GLURaw-1.4.0.1/src/Graphics/Rendering/GLU/Raw.hs 2014-05-19 17:18:28.000000000 +0200
@@ -1,10 +1,10 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.GLU.Raw
--- Copyright : (c) Sven Panne 2009
--- License : BSD-style (see the file LICENSE)
+-- Copyright : (c) Sven Panne 2013
+-- License : BSD3
--
--- Maintainer : sven.panne(a)aedion.de
+-- Maintainer : Sven Panne <svenpanne(a)gmail.com>
-- Stability : stable
-- Portability : portable
--
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-fgl for openSUSE:Factory checked in at 2014-11-26 20:54:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-fgl (Old)
and /work/SRC/openSUSE:Factory/.ghc-fgl.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-fgl"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-fgl/ghc-fgl.changes 2014-08-25 11:05:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-fgl.new/ghc-fgl.changes 2014-11-26 20:54:41.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Sep 2 08:55:52 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 5.5.0.1 for Haskell Platform 2014.2.0.0
+* fixes for Tree and PatriciaTree classes
+- regenerate spec file
+
+-------------------------------------------------------------------
Old:
----
fgl-5.4.2.4.tar.gz
New:
----
fgl-5.5.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-fgl.spec ++++++
--- /var/tmp/diff_new_pack.tGtTWF/_old 2014-11-26 20:54:42.000000000 +0100
+++ /var/tmp/diff_new_pack.tGtTWF/_new 2014-11-26 20:54:42.000000000 +0100
@@ -19,44 +19,43 @@
%global pkg_name fgl
-%global common_summary Haskell functional graph library
-
-%global common_description Martin Erwig's functional graph library for Haskell.
-#' Help syntax highlighting in EMACS.
-
Name: ghc-fgl
-Version: 5.4.2.4
+Version: 5.5.0.1
Release: 0
-Summary: %{common_summary}
+Summary: Martin Erwig's Functional Graph Library
License: BSD-3-Clause
Group: System/Libraries
+# ' Help EMACS syntax highlighting
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# BEGIN cabal2spec
Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
Source1: ghc-fgl-rpmlintrc
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
BuildRequires: ghc-array-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-mtl-devel
-BuildRequires: ghc-rpm-macros
-# END cabal2spec
+# End cabal-rpm deps
%description
-%{common_description}
+Martin Erwig's Functional Graph Library for Haskell.
+#' Help EMACS syntax highlighting
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Languages/Other
-Requires: ghc-compiler
-Requires(post): ghc-compiler
-Requires(postun): ghc-compiler
+Group: Development/Libraries/Other
+Provides: %{name}-static = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
%description devel
-%{common_description}
-This package contains the development files.
+This package provides the Haskell %{pkg_name} library development files.
+
%prep
%setup -q -n %{pkg_name}-%{version}
++++++ fgl-5.4.2.4.tar.gz -> fgl-5.5.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/ChangeLog new/fgl-5.5.0.1/ChangeLog
--- old/fgl-5.4.2.4/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+++ new/fgl-5.5.0.1/ChangeLog 2014-04-28 06:32:54.000000000 +0200
@@ -0,0 +1,38 @@
+5.5.0.1
+-------
+
+* Fix up Eq instances for Tree and PatriciaTree so that they work with
+ multiple edges.
+
+5.5.0.0
+-------
+
+* Add proper Show, Read and Eq instances to Data.Graph.Inductive.Tree
+ and Data.Graph.Inductive.PatriciaTree.
+
+* Add pretty-printing functions to Data.Graph.Inductive.Graph. These
+ are based upon the old Show implementation for
+ Data.Graph.Inductive.Tree.
+
+* Now use PatriciaTree by default rather than Tree (and recommend as
+ such). IntMap has been receiving a lot of optimisation work on it,
+ whereas the internal FiniteMap implementation hasn't received any
+ attention.
+
+* The `version :: IO ()` action now uses the actual Cabal version.
+
+* Remove Data.Graph.Inductive.Graphviz; use the graphviz package
+ instead.
+
+5.4.2.4
+-------
+
+* Update to work with GHC-7.2 and Cabal-1.6.
+
+5.4.2.3
+-------
+
+* Maintainership taken over by Ivan Miljenovic.
+
+* Allow Data.Graph.Inductive.PatriciaTree to deal with multiple edges
+ between nodes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Example.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Example.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Example.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Example.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,3 +1,5 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
-- | Example Graphs
module Data.Graph.Inductive.Example(
-- * Auxiliary Functions
@@ -19,9 +21,9 @@
clr479', clr489', clr486', clr508', clr528', kin248', vor'
)where
+import Data.Graph.Inductive.Graph
+import Data.Graph.Inductive.PatriciaTree
-import Data.Graph.Inductive
-import Data.Graph.Inductive.Tree
import Data.Graph.Inductive.Monad
import Data.Graph.Inductive.Monad.IOArray
@@ -39,7 +41,7 @@
-- | empty (unlabeled) edge list
noEdges :: [UEdge]
-noEdges = []
+noEdges = []
a,b,c,e,loop,ab,abb,dag3 :: Gr Char ()
@@ -52,7 +54,7 @@
b = mkGraph (zip [1..2] "ab") noEdges -- just two nodes
c = mkGraph (zip [1..3] "abc") noEdges -- just three nodes
e = ([((),1)],2,'b',[]) & a -- just one edge a-->b
-e3 = mkGraph (genUNodes 2)
+e3 = mkGraph (genUNodes 2)
[(1,2,"a"),(1,2,"b"),(1,2,"a")] -- three edges (two labels) a-->b
loop = ([],1,'a',[((),1)]) & empty -- loop on single node
ab = ([((),1)],2,'b',[((),1)]) & a -- cycle of two nodes: a<-->b
@@ -67,7 +69,7 @@
dag4 = mkGraph (genLNodes 1 4) (labUEdges [(1,2),(1,4),(2,3),(2,4),(4,3)])
d1 = mkGraph (genLNodes 1 2) [(1,2,1)]
-d3 = mkGraph (genLNodes 1 3) [(1,2,1),(1,3,4),(2,3,2)]
+d3 = mkGraph (genLNodes 1 3) [(1,2,1),(1,3,4),(2,3,2)]
g3 = ([("left",2),("up",3)],1,'a',[("right",2)]) & (
([],2,'b',[("down",3)]) & (
@@ -86,10 +88,10 @@
b' = mkGraphM (zip [1..2] "ab") noEdges -- just two nodes
c' = mkGraphM (zip [1..3] "abc") noEdges -- just three nodes
e' = mkGraphM (zip [1..2] "ab") [(1,2,())] -- just one edge a-->b
-e3' = mkGraphM (genUNodes 2)
+e3' = mkGraphM (genUNodes 2)
[(1,2,"a"),(1,2,"b"),(1,2,"a")] -- three edges (two labels) a-->b
loop' = mkGraphM [(1,'a')] [(1,1,())] -- loop on single node
-ab' = mkGraphM (zip [1..2] "ab")
+ab' = mkGraphM (zip [1..2] "ab")
[(1,2,()),(2,1,())] -- cycle of two nodes: a<-->b
abb' = mkGraphM (zip [1..2] "ab") (labUEdges [(2,2)]) -- a and loop on b
@@ -97,7 +99,7 @@
dag4' = mkGraphM (genLNodes 1 4) (labUEdges [(1,2),(1,4),(2,3),(2,4),(4,3)])
d1' = mkGraphM (genLNodes 1 2) [(1,2,1)]
-d3' = mkGraphM (genLNodes 1 3) [(1,2,1),(1,3,4),(2,3,2)]
+d3' = mkGraphM (genLNodes 1 3) [(1,2,1),(1,3,4),(2,3,2)]
ucycle :: Graph gr => Int -> gr () ()
ucycle n = mkUGraph vs (map (\v->(v,v `mod` n+1)) vs)
@@ -121,7 +123,7 @@
kin248 :: Gr Int ()
vor :: Gr String Int
-clr479 = mkGraph (genLNodes 'u' 6)
+clr479 = mkGraph (genLNodes 'u' 6)
(labUEdges [(1,2),(1,4),(2,5),(3,5),(3,6),(4,2),(5,4),(6,6)])
clr486 = mkGraph (zip [1..9] ["shorts","socks","watch","pants","shoes",
"shirt","belt","tie","jacket"])
@@ -135,10 +137,10 @@
clr528 = mkGraph [(1,'s'),(2,'u'),(3,'v'),(4,'x'),(5,'y')]
[(1,2,10),(1,4,5),(2,3,1),(2,4,2),(3,5,4),
(4,2,3),(4,3,9),(4,5,2),(5,1,7),(5,3,6)]
-clr595 = mkGraph (zip [1..6] [1..6])
+clr595 = mkGraph (zip [1..6] [1..6])
[(1,2,16),(1,3,13),(2,3,10),(2,4,12),(3,2,4),
(3,5,14),(4,3,9),(4,6,20),(5,4,7),(5,6,4)]
-gr1 = mkGraph (zip [1..10] [1..10])
+gr1 = mkGraph (zip [1..10] [1..10])
[(1,2,12),(1,3,1),(1,4,2),(2,3,1),(2,5,7),(2,6,5),(3,6,1),
(3,7,7),(4,3,3),(4,6,2),(4,7,5),(5,3,2),(5,6,3),(5,8,3),
(6,7,2),(6,8,3),(6,9,1),(7,9,9),(8,9,1),(8,10,4),(9,10,11)]
@@ -160,7 +162,7 @@
kin248' :: IO (SGr Int ())
vor' :: IO (SGr String Int)
-clr479' = mkGraphM (genLNodes 'u' 6)
+clr479' = mkGraphM (genLNodes 'u' 6)
(labUEdges [(1,2),(1,4),(2,5),(3,5),(3,6),(4,2),(5,4),(6,6)])
clr486' = mkGraphM (zip [1..9] ["shorts","socks","watch","pants","shoes",
"shirt","belt","tie","jacket"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Graph.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Graph.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Graph.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Graph.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,5 +1,5 @@
-- (c) 1999-2005 by Martin Erwig [see file COPYRIGHT]
--- | Static and Dynamic Inductive Graphs
+-- | Static and Dynamic Inductive Graphs
module Data.Graph.Inductive.Graph (
-- * General Type Defintions
-- ** Node and Edge Types
@@ -12,8 +12,8 @@
-- | We define two graph classes:
--
-- Graph: static, decomposable graphs.
- -- Static means that a graph itself cannot be changed
- --
+ -- Static means that a graph itself cannot be changed
+ --
-- DynGraph: dynamic, extensible graphs.
-- Dynamic graphs inherit all operations from static graphs
-- but also offer operations to extend and change graphs.
@@ -21,15 +21,15 @@
-- Each class contains in addition to its essential operations those
-- derived operations that might be overwritten by a more efficient
-- implementation in an instance definition.
- --
+ --
-- Note that labNodes is essentially needed because the default definition
-- for matchAny is based on it: we need some node from the graph to define
- -- matchAny in terms of match. Alternatively, we could have made matchAny
- -- essential and have labNodes defined in terms of ufold and matchAny.
- -- However, in general, labNodes seems to be (at least) as easy to define
- -- as matchAny. We have chosen labNodes instead of the function nodes since
+ -- matchAny in terms of match. Alternatively, we could have made matchAny
+ -- essential and have labNodes defined in terms of ufold and matchAny.
+ -- However, in general, labNodes seems to be (at least) as easy to define
+ -- as matchAny. We have chosen labNodes instead of the function nodes since
-- nodes can be easily derived from labNodes, but not vice versa.
- Graph(..),
+ Graph(..),
DynGraph(..),
-- * Operations
-- ** Graph Folds and Maps
@@ -49,6 +49,9 @@
node',lab',labNode',neighbors',
suc',pre',lpre',lsuc',
out',inn',outdeg',indeg',deg',
+ -- * Pretty-printing
+ prettify,
+ prettyPrint
) where
@@ -98,13 +101,13 @@
-- graph inspection
context :: Graph gr => gr a b -> Node -> Context a b
lab :: Graph gr => gr a b -> Node -> Maybe a
-neighbors :: Graph gr => gr a b -> Node -> [Node]
+neighbors :: Graph gr => gr a b -> Node -> [Node]
suc :: Graph gr => gr a b -> Node -> [Node]
-pre :: Graph gr => gr a b -> Node -> [Node]
+pre :: Graph gr => gr a b -> Node -> [Node]
lsuc :: Graph gr => gr a b -> Node -> [(Node,b)]
-lpre :: Graph gr => gr a b -> Node -> [(Node,b)]
-out :: Graph gr => gr a b -> Node -> [LEdge b]
-inn :: Graph gr => gr a b -> Node -> [LEdge b]
+lpre :: Graph gr => gr a b -> Node -> [(Node,b)]
+out :: Graph gr => gr a b -> Node -> [LEdge b]
+inn :: Graph gr => gr a b -> Node -> [LEdge b]
outdeg :: Graph gr => gr a b -> Node -> Int
indeg :: Graph gr => gr a b -> Node -> Int
deg :: Graph gr => gr a b -> Node -> Int
@@ -113,13 +116,13 @@
node' :: Context a b -> Node
lab' :: Context a b -> a
labNode' :: Context a b -> LNode a
-neighbors' :: Context a b -> [Node]
+neighbors' :: Context a b -> [Node]
suc' :: Context a b -> [Node]
-pre' :: Context a b -> [Node]
-lpre' :: Context a b -> [(Node,b)]
+pre' :: Context a b -> [Node]
+lpre' :: Context a b -> [(Node,b)]
lsuc' :: Context a b -> [(Node,b)]
-out' :: Context a b -> [LEdge b]
-inn' :: Context a b -> [LEdge b]
+out' :: Context a b -> [LEdge b]
+inn' :: Context a b -> [LEdge b]
outdeg' :: Context a b -> Int
indeg' :: Context a b -> Int
deg' :: Context a b -> Int
@@ -127,21 +130,21 @@
-}
-- | Unlabeled node
-type Node = Int
+type Node = Int
-- | Labeled node
-type LNode a = (Node,a)
+type LNode a = (Node,a)
-- | Quasi-unlabeled node
-type UNode = LNode ()
+type UNode = LNode ()
-- | Unlabeled edge
-type Edge = (Node,Node)
+type Edge = (Node,Node)
-- | Labeled edge
-type LEdge b = (Node,Node,b)
+type LEdge b = (Node,Node,b)
-- | Quasi-unlabeled edge
-type UEdge = LEdge ()
+type UEdge = LEdge ()
-- | Unlabeled path
-type Path = [Node]
+type Path = [Node]
-- | Labeled path
newtype LPath a = LP [LNode a]
@@ -149,7 +152,7 @@
show (LP xs) = show xs
-- | Quasi-unlabeled path
-type UPath = [UNode]
+type UPath = [UNode]
-- | Labeled links to or from a 'Node'.
type Adj b = [(b,Node)]
@@ -194,8 +197,8 @@
-- default implementation of derived operations
matchAny g = case labNodes g of
[] -> error "Match Exception, Empty Graph"
- (v,_):_ -> (c,g') where (Just c,g') = match v g
- noNodes = length . labNodes
+ (v,_):_ -> (c,g') where (Just c,g') = match v g
+ noNodes = length . labNodes
nodeRange g = (minimum vs,maximum vs) where vs = map fst (labNodes g)
labEdges = ufold (\(_,v,_,s)->((map (\(l,w)->(v,w,l)) s)++)) []
@@ -208,7 +211,7 @@
-- | Fold a function over the graph.
ufold :: Graph gr => ((Context a b) -> c -> c) -> c -> gr a b -> c
ufold f u g | isEmpty g = u
- | otherwise = f c (ufold f u g')
+ | otherwise = f c (ufold f u g')
where (c,g') = matchAny g
-- | Map a function over the graph.
@@ -276,7 +279,7 @@
-- | Remove multiple 'Node's from the 'Graph'.
delNodes :: Graph gr => [Node] -> gr a b -> gr a b
delNodes [] g = g
-delNodes (v:vs) g = delNodes vs (snd (match v g))
+delNodes (v:vs) g = delNodes vs (snd (match v g))
-- | Remove multiple 'Edge's from the 'Graph'.
delEdges :: DynGraph gr => [Edge] -> gr a b -> gr a b
@@ -291,23 +294,23 @@
-- | Build a quasi-unlabeled 'Graph'.
mkUGraph :: Graph gr => [Node] -> [Edge] -> gr () ()
-mkUGraph vs es = mkGraph (labUNodes vs) (labUEdges es)
+mkUGraph vs es = mkGraph (labUNodes vs) (labUEdges es)
where labUEdges = map (\(v,w)->(v,w,()))
labUNodes = map (\v->(v,()))
-
+
-- | Find the context for the given 'Node'. Causes an error if the 'Node' is
-- not present in the 'Graph'.
context :: Graph gr => gr a b -> Node -> Context a b
context g v = case match v g of
(Nothing,_) -> error ("Match Exception, Node: "++show v)
- (Just c,_) -> c
+ (Just c,_) -> c
-- | Find the label for a 'Node'.
lab :: Graph gr => gr a b -> Node -> Maybe a
-lab g v = fst (match v g) >>= return.lab'
+lab g v = fst (match v g) >>= return.lab'
-- | Find the neighbors for a 'Node'.
-neighbors :: Graph gr => gr a b -> Node -> [Node]
+neighbors :: Graph gr => gr a b -> Node -> [Node]
neighbors = (\(p,_,_,s) -> map snd (p++s)) .: context
-- | Find all 'Node's that have a link from the given 'Node'.
@@ -315,7 +318,7 @@
suc = map snd .: context4l
-- | Find all 'Node's that link to to the given 'Node'.
-pre :: Graph gr => gr a b -> Node -> [Node]
+pre :: Graph gr => gr a b -> Node -> [Node]
pre = map snd .: context1l
-- | Find all 'Node's that are linked from the given 'Node' and the label of
@@ -324,15 +327,15 @@
lsuc = map flip2 .: context4l
-- | Find all 'Node's that link to the given 'Node' and the label of each link.
-lpre :: Graph gr => gr a b -> Node -> [(Node,b)]
+lpre :: Graph gr => gr a b -> Node -> [(Node,b)]
lpre = map flip2 .: context1l
-- | Find all outward-bound 'LEdge's for the given 'Node'.
-out :: Graph gr => gr a b -> Node -> [LEdge b]
+out :: Graph gr => gr a b -> Node -> [LEdge b]
out g v = map (\(l,w)->(v,w,l)) (context4l g v)
-- | Find all inward-bound 'LEdge's for the given 'Node'.
-inn :: Graph gr => gr a b -> Node -> [LEdge b]
+inn :: Graph gr => gr a b -> Node -> [LEdge b]
inn g v = map (\(l,w)->(w,v,l)) (context1l g v)
-- | The outward-bound degree of the 'Node'.
@@ -360,7 +363,7 @@
labNode' (_,v,l,_) = (v,l)
-- | All 'Node's linked to or from in a 'Context'.
-neighbors' :: Context a b -> [Node]
+neighbors' :: Context a b -> [Node]
neighbors' (p,_,_,s) = map snd p++map snd s
-- | All 'Node's linked to in a 'Context'.
@@ -368,7 +371,7 @@
suc' = map snd . context4l'
-- | All 'Node's linked from in a 'Context'.
-pre' :: Context a b -> [Node]
+pre' :: Context a b -> [Node]
pre' = map snd . context1l'
-- | All 'Node's linked from in a 'Context', and the label of the links.
@@ -376,15 +379,15 @@
lsuc' = map flip2 . context4l'
-- | All 'Node's linked from in a 'Context', and the label of the links.
-lpre' :: Context a b -> [(Node,b)]
+lpre' :: Context a b -> [(Node,b)]
lpre' = map flip2 . context1l'
-- | All outward-directed 'LEdge's in a 'Context'.
-out' :: Context a b -> [LEdge b]
+out' :: Context a b -> [LEdge b]
out' c@(_,v,_,_) = map (\(l,w)->(v,w,l)) (context4l' c)
-- | All inward-directed 'LEdge's in a 'Context'.
-inn' :: Context a b -> [LEdge b]
+inn' :: Context a b -> [LEdge b]
inn' c@(_,v,_,_) = map (\(l,w)->(w,v,l)) (context1l' c)
-- | The outward degree of a 'Context'.
@@ -430,9 +433,9 @@
----------------------------------------------------------------------
--- auxiliary functions used in the implementation of the
+-- auxiliary functions used in the implementation of the
-- derived class members
---
+--
(.:) :: (c -> d) -> (a -> b -> c) -> (a -> b -> d)
-- f .: g = \x y->f (g x y)
-- f .: g = (f .) . g
@@ -451,8 +454,28 @@
context4l :: Graph gr => gr a b -> Node -> Adj b
context4l = context4l' .: context
-context1l' :: Context a b -> Adj b
+context1l' :: Context a b -> Adj b
context1l' (p,v,_,s) = p++filter ((==v).snd) s
-context4l' :: Context a b -> Adj b
+context4l' :: Context a b -> Adj b
context4l' (p,v,_,s) = s++filter ((==v).snd) p
+
+----------------------------------------------------------------------
+-- PRETTY PRINTING
+----------------------------------------------------------------------
+
+-- ufold :: Graph gr => (Context a b -> c -> c) -> c -> gr a b -> c
+
+-- | Pretty-print the graph. Note that this loses a lot of
+-- information, such as edge inverses, etc.
+prettify :: (DynGraph gr, Show a, Show b) => gr a b -> String
+prettify g = ufold showsContext id g ""
+ where
+ showsContext (_,n,l,s) sg = shows n . (':':) . shows l
+ . showString "->" . shows s
+ . ('\n':) . sg
+
+-- | Pretty-print the graph to stdout.
+prettyPrint :: (DynGraph gr, Show a, Show b) => gr a b -> IO ()
+prettyPrint = putStr . prettify
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Graphviz.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Graphviz.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Graphviz.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Graphviz.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,70 +0,0 @@
--- | Simple graphviz output.
-module Data.Graph.Inductive.Graphviz(
- Orient(..),
- graphviz, graphviz'
-) where
-
-import Data.Graph.Inductive.Graph
-
-data Orient = Portrait | Landscape deriving (Eq, Show)
-
-o2s :: Orient -> String
-o2s Portrait = "\trotate = \"0\"\n"
-o2s Landscape = "\trotate = \"90\"\n"
-
--- | Formats a graph for use in graphviz.
-graphviz :: (Graph g, Show a, Show b) => g a b -- ^ The graph to format
- -> String -- ^ The title of the graph
- -> (Double, Double) -- ^ The size
- -- of the page
- -> (Int, Int) -- ^ The width and
- -- height of the page
- -- grid
- -> Orient -- ^ The orientation of
- -- the graph.
- -> String
-
-i2d :: Int -> Double
-i2d = fromInteger . toInteger
-
-graphviz g t (w, h) p@(pw', ph') o =
- let n = labNodes g
- e = labEdges g
- ns = concatMap sn n
- es = concatMap se e
- sz w' h' = if o == Portrait then show w'++","++show h' else show h'++","++show w'
- ps = show w++","++show h
- (pw, ph) = if o == Portrait then p else (ph', pw')
- --gs = show ((w*(i2d pw))-m)++","++show ((h*(i2d ph))-m)
- gs = sz (w*(i2d pw)) (h*(i2d ph))
- in "digraph "++t++" {\n"
- ++"\tmargin = \"0\"\n"
- ++"\tpage = \""++ps++"\"\n"
- ++"\tsize = \""++gs++"\"\n"
- ++o2s o
- ++"\tratio = \"fill\"\n"
- ++ns
- ++es
- ++"}"
- where sn (n, a) | sa == "" = ""
- | otherwise = '\t':(show n ++ sa ++ "\n")
- where sa = sl a
- se (n1, n2, b) = '\t':(show n1 ++ " -> " ++ show n2 ++ sl b ++ "\n")
-
--- | Format a graph for graphviz with reasonable defaults: title of \"fgl\",
--- 8.5x11 pages, one page, landscape orientation
-graphviz' :: (Graph g, Show a, Show b) => g a b -> String
-graphviz' g = graphviz g "fgl" (8.5,11.0) (1,1) Landscape
-
-sq :: String -> String
-sq s@[c] = s
-sq ('"':s) | last s == '"' = init s
- | otherwise = s
-sq ('\'':s) | last s == '\'' = init s
- | otherwise = s
-sq s = s
-
-sl :: (Show a) => a -> String
-sl a =
- let l = sq (show a)
- in if (l /= "()") then (" [label = \""++l++"\"]") else ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Internal/FiniteMap.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Internal/FiniteMap.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Internal/FiniteMap.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Internal/FiniteMap.hs 2014-04-28 06:32:54.000000000 +0200
@@ -17,12 +17,15 @@
fmToList
) where
-import Data.Maybe (isJust)
+import Data.Maybe (isJust)
-data Ord a => FiniteMap a b =
+data FiniteMap a b =
Empty | Node Int (FiniteMap a b) (a,b) (FiniteMap a b)
deriving (Eq)
+instance Functor (FiniteMap a) where
+ fmap _ Empty = Empty
+ fmap f (Node h l (i,x) r) = Node h (fmap f l) (i, f x) (fmap f r)
----------------------------------------------------------------------
-- UTILITIES
@@ -33,9 +36,9 @@
--
showsMap :: (Show a,Show b,Ord a) => FiniteMap a b -> ShowS
showsMap Empty = id
-showsMap (Node _ l (i,x) r) = showsMap l . (' ':) .
+showsMap (Node _ l (i,x) r) = showsMap l . (' ':) .
shows i . ("->"++) . shows x . showsMap r
-
+
instance (Show a,Show b,Ord a) => Show (FiniteMap a b) where
showsPrec _ m = showsMap m
@@ -45,7 +48,7 @@
splitMax :: Ord a => FiniteMap a b -> (FiniteMap a b,(a,b))
splitMax (Node _ l x Empty) = (l,x)
splitMax (Node _ l x r) = (avlBalance l x m,y) where (m,y) = splitMax r
-splitMax Empty = error "splitMax on empty FiniteMap"
+splitMax Empty = error "splitMax on empty FiniteMap"
merge :: Ord a => FiniteMap a b -> FiniteMap a b -> FiniteMap a b
merge l Empty = l
@@ -64,31 +67,31 @@
addToFM Empty i x = node Empty (i,x) Empty
addToFM (Node h l (j,y) r) i x
| i<j = avlBalance (addToFM l i x) (j,y) r
- | i>j = avlBalance l (j,y) (addToFM r i x)
- | otherwise = Node h l (j,x) r
+ | i>j = avlBalance l (j,y) (addToFM r i x)
+ | otherwise = Node h l (j,x) r
-- | applies function to stored entry
updFM :: Ord a => FiniteMap a b -> a -> (b -> b) -> FiniteMap a b
updFM Empty _ _ = Empty
-updFM (Node h l (j,x) r) i f
+updFM (Node h l (j,x) r) i f
| i<j = let l' = updFM l i f in l' `seq` Node h l' (j,x) r
| i>j = let r' = updFM r i f in r' `seq` Node h l (j,x) r'
- | otherwise = Node h l (j,f x) r
+ | otherwise = Node h l (j,f x) r
-- | defines or aggregates entries
accumFM :: Ord a => FiniteMap a b -> a -> (b -> b -> b) -> b -> FiniteMap a b
accumFM Empty i _ x = node Empty (i,x) Empty
-accumFM (Node h l (j,y) r) i f x
+accumFM (Node h l (j,y) r) i f x
| i<j = avlBalance (accumFM l i f x) (j,y) r
- | i>j = avlBalance l (j,y) (accumFM r i f x)
- | otherwise = Node h l (j,f x y) r
+ | i>j = avlBalance l (j,y) (accumFM r i f x)
+ | otherwise = Node h l (j,f x y) r
delFromFM :: Ord a => FiniteMap a b -> a -> FiniteMap a b
delFromFM Empty _ = Empty
delFromFM (Node _ l (j,x) r) i
| i<j = avlBalance (delFromFM l i) (j,x) r
- | i>j = avlBalance l (j,x) (delFromFM r i)
- | otherwise = merge l r
+ | i>j = avlBalance l (j,x) (delFromFM r i)
+ | otherwise = merge l r
isEmptyFM :: FiniteMap a b -> Bool
isEmptyFM Empty = True
@@ -101,7 +104,7 @@
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
lookupFM Empty _ = Nothing
lookupFM (Node _ l (j,x) r) i | i<j = lookupFM l i
- | i>j = lookupFM r i
+ | i>j = lookupFM r i
| otherwise = Just x
-- | applies lookup to an interval
@@ -130,17 +133,17 @@
predFM' Empty _ p = p
predFM' (Node _ l (j,x) r) i p | i<j = predFM' l i p
| i>j = predFM' r i (Just (j,x))
- | isJust ml = ml
+ | isJust ml = ml
| otherwise = p
where ml = maxFM l
-
+
succFM :: Ord a => FiniteMap a b -> a -> Maybe (a,b)
succFM m i = succFM' m i Nothing
--
succFM' Empty _ p = p
succFM' (Node _ l (j,x) r) i p | i<j = succFM' l i (Just (j,x))
| i>j = succFM' r i p
- | isJust mr = mr
+ | isJust mr = mr
| otherwise = p
where mr = minFM r
@@ -157,15 +160,15 @@
Nothing -> Nothing else
if i>j then
case splitFM r i of
- Just (r',y) -> Just (avlBalance l (j,x) r',y)
- Nothing -> Nothing
- else {- i==j -} Just (merge l r,(j,x))
+ Just (r',y) -> Just (avlBalance l (j,x) r',y)
+ Nothing -> Nothing
+ else {- i==j -} Just (merge l r,(j,x))
-- | combines splitFM and minFM
splitMinFM :: Ord a => FiniteMap a b -> Maybe (FiniteMap a b,(a,b))
splitMinFM Empty = Nothing
splitMinFM (Node _ Empty x r) = Just (r,x)
-splitMinFM (Node _ l x r) = Just (avlBalance l' x r,y)
+splitMinFM (Node _ l x r) = Just (avlBalance l' x r,y)
where Just (l',y) = splitMinFM l
fmToList :: Ord a => FiniteMap a b -> [(a,b)]
@@ -196,14 +199,14 @@
bias :: Ord a => FiniteMap a b -> Int
bias (Node _ l _ r) = height l - height r
-bias Empty = 0
+bias Empty = 0
rotr :: Ord a => FiniteMap a b -> FiniteMap a b
-rotr Empty = Empty
+rotr Empty = Empty
rotr (Node _ (Node _ l1 v1 r1) v2 r2) = node l1 v1 (node r1 v2 r2)
-rotr (Node _ Empty _ _) = error "rotr on invalid FiniteMap"
+rotr (Node _ Empty _ _) = error "rotr on invalid FiniteMap"
rotl :: Ord a => FiniteMap a b -> FiniteMap a b
-rotl Empty = Empty
+rotl Empty = Empty
rotl (Node _ l1 v1 (Node _ l2 v2 r2)) = node (node l1 v1 l2) v2 r2
-rotl (Node _ _ _ Empty) = error "rotl on invalid FiniteMap"
+rotl (Node _ _ _ Empty) = error "rotl on invalid FiniteMap"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Monad/IOArray.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Monad/IOArray.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Monad/IOArray.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Monad/IOArray.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,5 +1,7 @@
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
+
-- (c) 2002 by Martin Erwig [see file COPYRIGHT]
--- | Static IOArray-based Graphs
+-- | Static IOArray-based Graphs
module Data.Graph.Inductive.Monad.IOArray(
-- * Graph Representation
SGr(..), GraphRep, Context', USGr,
@@ -15,7 +17,7 @@
import Data.Array
import Data.Array.IO
import System.IO.Unsafe
-import Data.Maybe
+
----------------------------------------------------------------------
@@ -43,7 +45,7 @@
Nothing -> ""
Just (_,l,s) -> '\n':show v++":"++show l++"->"++show s'
where s' = unsafePerformIO (removeDel m s)
-
+
instance (Show a,Show b) => Show (SGr a b) where
show (SGr g) = showGraph g
@@ -56,14 +58,14 @@
-}
-- GraphM
---
+--
instance GraphM IO SGr where
emptyM = emptyN defaultGraphSize
isEmptyM g = do {SGr (n,_,_) <- g; return (n==0)}
matchM v g = do g'@(SGr (n,a,m)) <- g
- case a!v of
+ case a!v of
Nothing -> return (Nothing,g')
- Just (pr,l,su) ->
+ Just (pr,l,su) ->
do b <- readArray m v
if b then return (Nothing,g') else
do s <- removeDel m su
@@ -85,15 +87,15 @@
addPre Nothing _ = error "mkGraphM (SGr): addPre Nothing"
labNodesM g = do (SGr (_,a,m)) <- g
let getLNode vs (_,Nothing) = return vs
- getLNode vs (v,Just (_,l,_)) =
- do b <- readArray m v
+ getLNode vs (v,Just (_,l,_)) =
+ do b <- readArray m v
return (if b then vs else (v,l):vs)
foldM getLNode [] (assocs a)
-
+
defaultGraphSize :: Int
defaultGraphSize = 100
-emptyN :: Int -> IO (SGr a b)
+emptyN :: Int -> IO (SGr a b)
emptyN n = do m <- newArray (1,n) False
return (SGr (0,array (1,n) [(i,Nothing) | i <- [1..n]],m))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Monad.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Monad.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Monad.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Monad.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,8 +1,10 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
-- (c) 2002 by Martin Erwig [see file COPYRIGHT]
-- | Monadic Graphs
module Data.Graph.Inductive.Monad(
-- * Classes
- GraphM(..),
+ GraphM(..),
-- * Operations
-- ** Graph Folds and Maps
ufoldM,
@@ -23,19 +25,19 @@
-- MONADIC GRAPH CLASS
----------------------------------------------------------------------
---
+--
-- Currently, we define just one monadic graph class:
--
-- GraphM: static, decomposable graphs
-- static means that a graph itself cannot be changed
---
+--
-- Later we might also define DynGraphM for dynamic, extensible graphs
---
+--
-- Monadic Graph
---
+--
class Monad m => GraphM m gr where
-- essential operations
emptyM :: m (gr a b)
@@ -49,15 +51,15 @@
nodeRangeM :: m (gr a b) -> m (Node,Node)
labEdgesM :: m (gr a b) -> m [LEdge b]
-- default implementation of derived operations
- matchAnyM g = do vs <- labNodesM g
+ matchAnyM g = do vs <- labNodesM g
case vs of
[] -> error "Match Exception, Empty Graph"
(v,_):_ -> do (Just c,g') <- matchM v g
- return (c,g')
+ return (c,g')
noNodesM = labNodesM >>. length
nodeRangeM g = do vs <- labNodesM g
- let vs' = map fst vs
- return (minimum vs',maximum vs')
+ let vs' = map fst vs
+ return (minimum vs',maximum vs')
labEdgesM = ufoldM (\(p,v,_,s)->(((map (i v) p)++(map (o v) s))++)) []
where o v = \(l,w)->(v,w,l)
i v = \(l,w)->(w,v,l)
@@ -66,7 +68,7 @@
-- composing a monadic function with a non-monadic one
--
(>>.) :: Monad m => (m a -> m b) -> (b -> c) -> (m a -> m c)
-f >>. g = (>>= return . g) . f
+f >>. g = (>>= return . g) . f
----------------------------------------------------------------------
@@ -74,7 +76,7 @@
----------------------------------------------------------------------
-- graph folds and maps
---
+--
-- | graph fold
ufoldM :: GraphM m gr => ((Context a b) -> c -> c) -> c -> m (gr a b) -> m c
@@ -87,7 +89,7 @@
-- (additional) graph projection
-- [noNodes, nodeRange, labNodes, labEdges are defined in class Graph]
---
+--
nodesM :: GraphM m gr => m (gr a b) -> m [Node]
nodesM = labNodesM >>. map fst
@@ -100,24 +102,24 @@
-- graph construction & destruction
---
+--
delNodeM :: GraphM m gr => Node -> m (gr a b) -> m (gr a b)
delNodeM v = delNodesM [v]
delNodesM :: GraphM m gr => [Node] -> m (gr a b) -> m (gr a b)
delNodesM [] g = g
-delNodesM (v:vs) g = do (_,g') <- matchM v g
- delNodesM vs (return g')
+delNodesM (v:vs) g = do (_,g') <- matchM v g
+ delNodesM vs (return g')
mkUGraphM :: GraphM m gr => [Node] -> [Edge] -> m (gr () ())
-mkUGraphM vs es = mkGraphM (labUNodes vs) (labUEdges es)
+mkUGraphM vs es = mkGraphM (labUNodes vs) (labUEdges es)
labUEdges = map (\(v,w)->(v,w,()))
labUNodes = map (\v->(v,()))
-- graph inspection (for a particular node)
---
+--
onMatch :: GraphM m gr => (Context a b -> c) -> c -> m (gr a b) -> Node -> m c
onMatch f u g v = do (x,_) <- matchM v g
return (case x of {Nothing -> u; Just c -> f c})
@@ -129,25 +131,25 @@
labM = onMatch (Just . lab') Nothing
{-
-neighbors :: GraphM m gr => m (gr a b) -> Node -> [Node]
+neighbors :: GraphM m gr => m (gr a b) -> Node -> [Node]
neighbors = (\(p,_,_,s) -> map snd (p++s)) .: context
suc :: GraphM m gr => m (gr a b) -> Node -> [Node]
suc = map snd .: context4
-pre :: GraphM m gr => m (gr a b) -> Node -> [Node]
+pre :: GraphM m gr => m (gr a b) -> Node -> [Node]
pre = map snd .: context1
lsuc :: GraphM m gr => m (gr a b) -> Node -> [(Node,b)]
lsuc = map flip2 .: context4
-lpre :: GraphM m gr => m (gr a b) -> Node -> [(Node,b)]
+lpre :: GraphM m gr => m (gr a b) -> Node -> [(Node,b)]
lpre = map flip2 .: context1
-out :: GraphM m gr => m (gr a b) -> Node -> [LEdge b]
+out :: GraphM m gr => m (gr a b) -> Node -> [LEdge b]
out g v = map (\(l,w)->(v,w,l)) (context4 g v)
-inn :: GraphM m gr => m (gr a b) -> Node -> [LEdge b]
+inn :: GraphM m gr => m (gr a b) -> Node -> [LEdge b]
inn g v = map (\(l,w)->(w,v,l)) (context1 g v)
outdeg :: GraphM m gr => m (gr a b) -> Node -> Int
@@ -158,46 +160,46 @@
deg :: GraphM m gr => m (gr a b) -> Node -> Int
deg = (\(p,_,_,s) -> length p+length s) .: context
---
+--
-- -- context inspection
--- --
+-- --
-- node' :: Context a b -> Node
-- node' (_,v,_,_) = v
---
+--
-- lab' :: Context a b -> a
-- lab' (_,_,l,_) = l
---
+--
-- labNode' :: Context a b -> LNode a
-- labNode' (_,v,l,_) = (v,l)
---
--- neighbors' :: Context a b -> [Node]
+--
+-- neighbors' :: Context a b -> [Node]
-- neighbors' (p,_,_,s) = map snd p++map snd s
---
+--
-- suc' :: Context a b -> [Node]
-- suc' (_,_,_,s) = map snd s
---
--- pre' :: Context a b -> [Node]
+--
+-- pre' :: Context a b -> [Node]
-- pre' (p,_,_,_) = map snd p
---
--- lpre' :: Context a b -> [(Node,b)]
+--
+-- lpre' :: Context a b -> [(Node,b)]
-- lpre' (p,_,_,_) = map flip2 p
---
+--
-- lsuc' :: Context a b -> [(Node,b)]
-- lsuc' (_,_,_,s) = map flip2 s
---
--- out' :: Context a b -> [LEdge b]
+--
+-- out' :: Context a b -> [LEdge b]
-- out' (_,v,_,s) = map (\(l,w)->(v,w,l)) s
---
--- inn' :: Context a b -> [LEdge b]
+--
+-- inn' :: Context a b -> [LEdge b]
-- inn' (p,v,_,_) = map (\(l,w)->(w,v,l)) p
---
+--
-- outdeg' :: Context a b -> Int
-- outdeg' (_,_,_,s) = length s
---
+--
-- indeg' :: Context a b -> Int
-- indeg' (p,_,_,_) = length p
---
+--
-- deg' :: Context a b -> Int
-- deg' (p,_,_,s) = length p+length s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/PatriciaTree.hs new/fgl-5.5.0.1/Data/Graph/Inductive/PatriciaTree.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/PatriciaTree.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/PatriciaTree.hs 2014-04-28 06:32:54.000000000 +0200
@@ -22,12 +22,12 @@
)
where
+import Control.Arrow (second)
import Data.Graph.Inductive.Graph
-import Data.IntMap (IntMap)
-import qualified Data.IntMap as IM
+import Data.IntMap (IntMap)
+import qualified Data.IntMap as IM
import Data.List
import Data.Maybe
-import Control.Arrow(second)
newtype Gr a b = Gr (GraphRep a b)
@@ -37,6 +37,24 @@
type UGr = Gr () ()
+instance (Eq a, Ord b) => Eq (Gr a b) where
+ (Gr g1) == (Gr g2) = fmap sortAdj g1 == fmap sortAdj g2
+ where
+ sortAdj (a1,n,a2) = (fmap sort a1,n,fmap sort a2)
+
+instance (Show a, Show b) => Show (Gr a b) where
+ showsPrec d g = showParen (d > 10) $
+ showString "mkGraph "
+ . shows (labNodes g)
+ . showString " "
+ . shows (labEdges g)
+
+instance (Read a, Read b) => Read (Gr a b) where
+ readsPrec p = readParen (p > 10) $ \ r -> do
+ ("mkGraph", s) <- lex r
+ (ns,t) <- reads s
+ (es,u) <- reads t
+ return (mkGraph ns es, u)
instance Graph Gr where
-- required members
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Query/MaxFlow2.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Query/MaxFlow2.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Query/MaxFlow2.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Query/MaxFlow2.hs 2014-04-28 06:32:54.000000000 +0200
@@ -6,11 +6,11 @@
-- ekSimple, ekFused, ekList) where
-import Data.List
+
import Data.Maybe
import Data.Graph.Inductive.Graph
-import Data.Graph.Inductive.Tree
+import Data.Graph.Inductive.PatriciaTree
import Data.Graph.Inductive.Internal.FiniteMap
import Data.Graph.Inductive.Internal.Queue
import Data.Graph.Inductive.Query.BFS (bft)
@@ -74,7 +74,7 @@
-- EXTRACT fglEdmondsFused.txt
-- Compute an augmenting path
augPathFused :: Network -> Node -> Node -> Maybe DirPath
-augPathFused g s t = listToMaybe $ map reverse $
+augPathFused g s t = listToMaybe $ map reverse $
filter (\((u,_):_) -> u==t) tree
where tree = bftForEK s g
@@ -100,10 +100,10 @@
| ((c, f), sucNode) <- sucAdj, c>f]
where (p@((v,_):_), q1)=queueGet q
--- Extract augmenting path from network; return path as a sequence of
--- edges with direction of traversal, and new network with augmenting
+-- Extract augmenting path from network; return path as a sequence of
+-- edges with direction of traversal, and new network with augmenting
-- path removed.
-extractPathFused :: Network -> DirPath
+extractPathFused :: Network -> DirPath
-> ([DirEdge (Double,Double)], Network)
extractPathFused g [] = ([], g)
extractPathFused g [(_,_)] = ([], g)
@@ -118,7 +118,7 @@
-- ekFusedStep :: EKStepFunc
ekFusedStep g s t = case maybePath of
- Just _ ->
+ Just _ ->
Just ((insEdges (integrateDelta es delta) newg), delta)
Nothing -> Nothing
where maybePath = augPathFused g s t
@@ -134,9 +134,9 @@
-- EXTRACT fglEdmondsSimple.txt
residualGraph :: Network -> Gr () Double
-residualGraph g =
- mkGraph (labNodes g)
- ([(u, v, c-f) | (u, v, (c,f)) <- labEdges g, c>f ] ++
+residualGraph g =
+ mkGraph (labNodes g)
+ ([(u, v, c-f) | (u, v, (c,f)) <- labEdges g, c>f ] ++
[(v, u, f) | (u,v,(_,f)) <- labEdges g, f>0])
augPath :: Network -> Node -> Node -> Maybe Path
@@ -144,7 +144,7 @@
where tree = bft s (residualGraph g)
-- Extract augmenting path from network; return path as a sequence of
--- edges with direction of traversal, and new network with augmenting
+-- edges with direction of traversal, and new network with augmenting
-- path removed.
extractPath :: Network -> Path -> ([DirEdge (Double,Double)], Network)
extractPath g [] = ([], g)
@@ -155,7 +155,7 @@
where (tailedges, newerg) = extractPath newg (v:ws)
Nothing ->
case revExtract of
- Just (l, newg) ->
+ Just (l, newg) ->
((v, u, l, Backward):tailedges, newerg)
where (tailedges, newerg) = extractPath newg (v:ws)
Nothing -> error "extractPath: revExtract == Nothing"
@@ -170,16 +170,16 @@
Just (el, _) -> Just (el, (p', node, l, rest) & newg)
Nothing -> Nothing
where (Just (p', node, l, s), newg) = match u g
- (adj, rest)=extractAdj s
+ (adj, rest)=extractAdj s
(\(l', dest) -> (dest==v) && (p l'))
--- Extract an item from an adjacency list that satisfies a given
+-- Extract an item from an adjacency list that satisfies a given
-- predicate. Return the item and the rest of the adjacency list
extractAdj :: Adj b -> ((b,Node)->Bool) -> (Maybe (b,Node), Adj b)
extractAdj [] _ = (Nothing, [])
extractAdj (adj:adjs) p
| p adj = (Just adj, adjs)
- | otherwise = (theone, adj:rest)
+ | otherwise = (theone, adj:rest)
where (theone, rest)=extractAdj adjs p
getPathDeltas :: [DirEdge (Double,Double)] -> [Double]
@@ -188,20 +188,20 @@
(_, _, (c,f), Forward) -> (c-f) : (getPathDeltas es)
(_, _, (_,f), Backward) -> f : (getPathDeltas es)
-integrateDelta :: [DirEdge (Double,Double)] -> Double
+integrateDelta :: [DirEdge (Double,Double)] -> Double
-> [LEdge (Double, Double)]
integrateDelta [] _ = []
integrateDelta (e:es) delta = case e of
- (u, v, (c, f), Forward) ->
+ (u, v, (c, f), Forward) ->
(u, v, (c, f+delta)) : (integrateDelta es delta)
- (u, v, (c, f), Backward) ->
+ (u, v, (c, f), Backward) ->
(u, v, (c, f-delta)) : (integrateDelta es delta)
type EKStepFunc = Network -> Node -> Node -> Maybe (Network, Double)
ekSimpleStep :: EKStepFunc
ekSimpleStep g s t = case maybePath of
- Just _ ->
+ Just _ ->
Just ((insEdges (integrateDelta es delta) newg), delta)
Nothing -> Nothing
where maybePath = augPath g s t
@@ -232,11 +232,11 @@
Nothing -> False
Just () -> True
-extractPathList :: [LEdge (Double, Double)] -> FiniteMap (Node,Node) ()
+extractPathList :: [LEdge (Double, Double)] -> FiniteMap (Node,Node) ()
-> ([DirEdge (Double, Double)], [LEdge (Double, Double)])
extractPathList [] _ = ([], [])
extractPathList (edge@(u,v,l@(c,f)):es) set
- | (c>f) && (setContains set (u,v)) =
+ | (c>f) && (setContains set (u,v)) =
let (pathrest, notrest)=extractPathList es (delFromFM set (u,v))
in ((u,v,l,Forward):pathrest, notrest)
| (f>0) && (setContains set (v,u)) =
@@ -252,7 +252,7 @@
Nothing -> Nothing
where newEdges = (integrateDelta es delta) ++ otheredges
maybePath = augPathFused g s t
- (es, otheredges) = extractPathList (labEdges g)
+ (es, otheredges) = extractPathList (labEdges g)
(setFromList (zip justPath (tail justPath)))
delta = minimum $ getPathDeltas es
justPath = pathFromDirPath (fromJust maybePath)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive/Tree.hs new/fgl-5.5.0.1/Data/Graph/Inductive/Tree.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive/Tree.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive/Tree.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,16 +1,17 @@
-- (c) 1999 - 2002 by Martin Erwig [see file COPYRIGHT]
-- | Tree-based implementation of 'Graph' and 'DynGraph'
+--
+-- You will probably have better performance using the
+-- "Data.Graph.Inductive.PatriciaTree" implementation instead.
module Data.Graph.Inductive.Tree (Gr,UGr) where
-import Data.List (foldl')
-
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Internal.FiniteMap
+import Data.List (foldl', sort)
import Data.Maybe (fromJust)
-
----------------------------------------------------------------------
-- GRAPH REPRESENTATION
----------------------------------------------------------------------
@@ -22,25 +23,31 @@
type UGr = Gr () ()
-
----------------------------------------------------------------------
-- CLASS INSTANCES
----------------------------------------------------------------------
-
--- Show
---
-showsGraph :: (Show a,Show b) => GraphRep a b -> ShowS
-showsGraph Empty = id
-showsGraph (Node _ l (v,(_,l',s)) r) = showsGraph l . ('\n':) .
- shows v . (':':) . shows l' . ("->"++) . shows s . showsGraph r
-
-instance (Show a,Show b) => Show (Gr a b) where
- showsPrec _ (Gr g) = showsGraph g
-
+instance (Eq a, Ord b) => Eq (Gr a b) where
+ (Gr g1) == (Gr g2) = fmap sortAdj g1 == fmap sortAdj g2
+ where
+ sortAdj (a1,n,a2) = (sort a1,n,sort a2)
+
+instance (Show a, Show b) => Show (Gr a b) where
+ showsPrec d g = showParen (d > 10) $
+ showString "mkGraph "
+ . shows (labNodes g)
+ . showString " "
+ . shows (labEdges g)
+
+instance (Read a, Read b) => Read (Gr a b) where
+ readsPrec p = readParen (p > 10) $ \ r -> do
+ ("mkGraph", s) <- lex r
+ (ns,t) <- reads s
+ (es,u) <- reads t
+ return (mkGraph ns es, u)
-- Graph
---
+--
instance Graph Gr where
empty = Gr emptyFM
isEmpty (Gr g) = case g of {Empty -> True; _ -> False}
@@ -60,8 +67,8 @@
labEdges (Gr g) = concatMap (\(v,(_,_,s))->map (\(l,w)->(v,w,l)) s) (fmToList g)
-matchGr v (Gr g) =
- case splitFM g v of
+matchGr v (Gr g) =
+ case splitFM g v of
Nothing -> (Nothing,Gr g)
Just (g',(_,(p,l,s))) -> (Just (p',v,l,s),Gr g2)
where s' = filter ((/=v).snd) s
@@ -71,7 +78,7 @@
-- DynGraph
---
+--
instance DynGraph Gr where
(p,v,l,s) & (Gr g) | elemFM g v = error ("Node Exception, Node: "++show v)
| otherwise = Gr g3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/Data/Graph/Inductive.hs new/fgl-5.5.0.1/Data/Graph/Inductive.hs
--- old/fgl-5.4.2.4/Data/Graph/Inductive.hs 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/Data/Graph/Inductive.hs 2014-04-28 06:32:54.000000000 +0200
@@ -1,6 +1,6 @@
------------------------------------------------------------------------------
---
--- Inductive.hs -- Functional Graph Library
+--
+-- Inductive.hs -- Functional Graph Library
--
-- (c) 1999-2007 by Martin Erwig [see file COPYRIGHT]
--
@@ -8,26 +8,28 @@
module Data.Graph.Inductive(
module Data.Graph.Inductive.Graph,
- module Data.Graph.Inductive.Tree,
+ module Data.Graph.Inductive.PatriciaTree,
module Data.Graph.Inductive.Basic,
module Data.Graph.Inductive.Monad,
module Data.Graph.Inductive.Monad.IOArray,
module Data.Graph.Inductive.Query,
- module Data.Graph.Inductive.Graphviz,
module Data.Graph.Inductive.NodeMap,
-- * Version Information
version
) where
-import Data.Graph.Inductive.Graph
-import Data.Graph.Inductive.Tree
import Data.Graph.Inductive.Basic
+import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Monad
import Data.Graph.Inductive.Monad.IOArray
-import Data.Graph.Inductive.Query
-import Data.Graph.Inductive.Graphviz
import Data.Graph.Inductive.NodeMap
+import Data.Graph.Inductive.PatriciaTree
+import Data.Graph.Inductive.Query
+
+import Data.Version (showVersion)
+import qualified Paths_fgl as Paths (version)
-- | Version info
version :: IO ()
-version = putStrLn "\nFGL - Functional Graph Library, April 2007"
+version = putStrLn $ "\nFGL - Functional Graph Library, version "
+ ++ showVersion Paths.version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.4.2.4/fgl.cabal new/fgl-5.5.0.1/fgl.cabal
--- old/fgl-5.4.2.4/fgl.cabal 2011-08-15 06:40:28.000000000 +0200
+++ new/fgl-5.5.0.1/fgl.cabal 2014-04-28 06:32:54.000000000 +0200
@@ -1,14 +1,16 @@
name: fgl
-version: 5.4.2.4
+version: 5.5.0.1
license: BSD3
license-file: LICENSE
author: Martin Erwig, Ivan Lazar Miljenovic
-maintainer: Ivan.Miljenovic(a)gmail.com, tomberek(a)gmail.com
+maintainer: Ivan.Miljenovic(a)gmail.com
homepage: http://web.engr.oregonstate.edu/~erwig/fgl/haskell
category: Data Structures, Graphs
synopsis: Martin Erwig's Functional Graph Library
cabal-version: >= 1.6
build-type: Simple
+extra-source-files:
+ ChangeLog
source-repository head
type: darcs
@@ -24,7 +26,6 @@
Data.Graph.Inductive.Basic,
Data.Graph.Inductive.Example,
Data.Graph.Inductive.Graph,
- Data.Graph.Inductive.Graphviz,
Data.Graph.Inductive.Monad,
Data.Graph.Inductive.NodeMap,
Data.Graph.Inductive.PatriciaTree,
@@ -45,6 +46,9 @@
Data.Graph.Inductive.Query.SP,
Data.Graph.Inductive.Query.TransClos,
Data.Graph.Inductive
+
+ other-modules:
+ Paths_fgl
+
build-depends: base < 5, mtl, containers, array
- extensions: MultiParamTypeClasses, OverlappingInstances, FlexibleInstances, ScopedTypeVariables
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-case-insensitive for openSUSE:Factory checked in at 2014-11-26 20:54:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-case-insensitive (Old)
and /work/SRC/openSUSE:Factory/.ghc-case-insensitive.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-case-insensitive"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-case-insensitive/ghc-case-insensitive.changes 2014-08-25 11:05:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-case-insensitive.new/ghc-case-insensitive.changes 2014-11-26 20:54:40.000000000 +0100
@@ -1,0 +2,12 @@
+Tue Sep 9 20:24:56 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 1.1.0.3
+* no changelog
+* for Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
+Tue Sep 2 08:52:04 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file
+
+-------------------------------------------------------------------
Old:
----
case-insensitive-1.0.0.1.tar.gz
New:
----
case-insensitive-1.1.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-case-insensitive.spec ++++++
--- /var/tmp/diff_new_pack.Kyj76m/_old 2014-11-26 20:54:41.000000000 +0100
+++ /var/tmp/diff_new_pack.Kyj76m/_new 2014-11-26 20:54:41.000000000 +0100
@@ -1,8 +1,7 @@
#
# spec file for package ghc-case-insensitive
#
-
-# Copyright (c) 2012 Peter Trommler <peter.trommler(a)ohm-hochschule.de>
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,55 +15,55 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-%global pkg_name case-insensitive
-
-%global common_summary Haskell case insensitive string comparison library
-%global common_description The Haskell module Data.CaseInsensitive provides the CI type constructor which can be parameterised by a string-like type like: String, ByteString, Text, etc. Comparisons of values of the resulting type will be insensitive to cases.
+%global pkg_name case-insensitive
Name: ghc-case-insensitive
-Version: 1.0.0.1
+Version: 1.1.0.3
Release: 0
-Summary: %{common_summary}
-
-Group: System/Libraries
+Summary: Case insensitive string comparison
License: BSD-3-Clause
-# BEGIN cabal2spec
-URL: http://hackage.haskell.org/package/%{pkg_name}
+Group: System/Libraries
+
+Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
-# END cabal2spec
+# Begin cabal-rpm deps:
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-hashable-devel
-Buildrequires: ghc-text-devel
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: ghc-text-devel
+# End cabal-rpm deps
%description
-%{common_description}
+The module @Data.CaseInsensitive@ provides the 'CI' type constructor which can
+be parameterised by a string-like type like: 'String', 'ByteString', 'Text',
+etc.. Comparisons of values of the resulting type will be insensitive to cases.
+
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Languages/Other
-Requires: ghc-compiler
-Requires(post): ghc-compiler
-Requires(postun): ghc-compiler
+Group: Development/Libraries/Other
+Provides: %{name}-static = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
%description devel
-%{common_description}
-This package contains the development files.
+This package provides the Haskell %{pkg_name} library development
+files.
+
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
@@ -80,5 +79,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc README.markdown
%changelog
++++++ case-insensitive-1.0.0.1.tar.gz -> case-insensitive-1.1.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/case-insensitive-1.0.0.1/Data/CaseInsensitive/Internal.hs new/case-insensitive-1.1.0.3/Data/CaseInsensitive/Internal.hs
--- old/case-insensitive-1.0.0.1/Data/CaseInsensitive/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/case-insensitive-1.1.0.3/Data/CaseInsensitive/Internal.hs 2014-01-14 00:28:43.000000000 +0100
@@ -0,0 +1,188 @@
+{-# LANGUAGE CPP, NoImplicitPrelude, DeriveDataTypeable #-}
+
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Unsafe #-}
+#endif
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : Data.CaseInsensitive.Internal
+-- Copyright : (c) 2011-2013 Bas van Dijk
+-- License : BSD-style (see the file LICENSE)
+-- Maintainer : Bas van Dijk <v.dijk.bas(a)gmail.com>
+--
+-- Internal module which exports the 'CI' type, constructor,
+-- associated instances and the 'FoldCase' class and instances.
+--
+-----------------------------------------------------------------------------
+
+module Data.CaseInsensitive.Internal ( CI
+ , mk
+ , unsafeMk
+ , original
+ , foldedCase
+ , map
+ , FoldCase(foldCase)
+ ) where
+
+--------------------------------------------------------------------------------
+-- Imports
+--------------------------------------------------------------------------------
+
+-- from base:
+import Data.Bool ( (||) )
+import Data.Char ( Char, toLower )
+import Data.Eq ( Eq, (==) )
+import Data.Function ( on )
+import Data.Monoid ( Monoid, mempty, mappend )
+import Data.Ord ( Ord, compare )
+import Data.String ( IsString, fromString )
+import Data.Typeable ( Typeable )
+import Data.Word ( Word8 )
+import Prelude ( String, (.), fmap, (&&), (+), (<=), (>=), otherwise )
+import Text.Read ( Read, readPrec )
+import Text.Show ( Show, showsPrec )
+
+import qualified Data.List as L ( map )
+
+#if __GLASGOW_HASKELL__ < 700
+import Control.Monad ( (>>) )
+import Prelude ( fromInteger )
+#endif
+
+-- from bytestring:
+import qualified Data.ByteString as B ( ByteString, map )
+import qualified Data.ByteString.Lazy as BL ( ByteString, map )
+
+-- from text:
+import qualified Data.Text as T ( Text, toCaseFold )
+import qualified Data.Text.Lazy as TL ( Text, toCaseFold, pack, unpack )
+
+-- from deepseq:
+import Control.DeepSeq ( NFData, rnf, deepseq )
+
+-- from hashable:
+import Data.Hashable ( Hashable, hashWithSalt )
+
+
+--------------------------------------------------------------------------------
+-- Case Insensitive Strings
+--------------------------------------------------------------------------------
+
+{-| A @CI s@ provides /C/ase /I/nsensitive comparison for the string-like type
+@s@ (for example: 'String', 'T.Text', 'B.ByteString', etc.).
+
+Note that @CI s@ has an instance for 'IsString' which together with the
+@OverloadedStrings@ language extension allows you to write case insensitive
+string literals as in:
+
+@
+\> (\"Content-Type\" :: 'CI' 'T.Text') == (\"CONTENT-TYPE\" :: 'CI' 'T.Text')
+True
+@
+
+-}
+data CI s = CI { original :: !s -- ^ Retrieve the original string-like value.
+ , foldedCase :: !s -- ^ Retrieve the case folded string-like value.
+ -- (Also see 'foldCase').
+ }
+ deriving Typeable
+
+-- | Make the given string-like value case insensitive.
+mk :: FoldCase s => s -> CI s
+mk s = CI s (foldCase s)
+
+-- | Constructs a 'CI' from an already case folded string-like
+-- value. The given string is used both as the 'original' as well as
+-- the 'foldedCase'.
+--
+-- This function is unsafe since the compiler can't guarantee that the
+-- provided string is case folded.
+unsafeMk :: FoldCase s => s -> CI s
+unsafeMk s = CI s s
+
+-- | Transform the original string-like value but keep it case insensitive.
+map :: FoldCase s2 => (s1 -> s2) -> (CI s1 -> CI s2)
+map f = mk . f . original
+
+instance (IsString s, FoldCase s) => IsString (CI s) where
+ fromString = mk . fromString
+
+instance Monoid s => Monoid (CI s) where
+ mempty = CI mempty mempty
+ CI o1 l1 `mappend` CI o2 l2 = CI (o1 `mappend` o2) (l1 `mappend` l2)
+
+instance Eq s => Eq (CI s) where
+ (==) = (==) `on` foldedCase
+
+instance Ord s => Ord (CI s) where
+ compare = compare `on` foldedCase
+
+instance (Read s, FoldCase s) => Read (CI s) where
+ readPrec = fmap mk readPrec
+
+instance Show s => Show (CI s) where
+ showsPrec prec = showsPrec prec . original
+
+instance Hashable s => Hashable (CI s) where
+ hashWithSalt salt = hashWithSalt salt . foldedCase
+
+instance NFData s => NFData (CI s) where
+ rnf (CI o f) = o `deepseq` f `deepseq` ()
+
+--------------------------------------------------------------------------------
+-- Folding (lowering) cases
+--------------------------------------------------------------------------------
+
+-- | Class of string-like types that support folding cases.
+--
+-- /Note/: In some languages, case conversion is a locale- and context-dependent
+-- operation. The @foldCase@ method is /not/ intended to be locale sensitive.
+-- Programs that require locale sensitivity should use appropriate versions of
+-- the case mapping functions from the @text-icu@ package:
+-- <http://hackage.haskell.org/package/text-icu>
+class FoldCase s where
+ foldCase :: s -> s
+
+ foldCaseList :: [s] -> [s]
+ foldCaseList = L.map foldCase
+
+instance FoldCase a => FoldCase [a] where
+ foldCase = foldCaseList
+
+-- | Note that @foldCase@ on @'B.ByteString's@ is only guaranteed to be correct for ISO-8859-1 encoded strings!
+instance FoldCase B.ByteString where foldCase = B.map toLower8
+
+-- | Note that @foldCase@ on @'BL.ByteString's@ is only guaranteed to be correct for ISO-8859-1 encoded strings!
+instance FoldCase BL.ByteString where foldCase = BL.map toLower8
+
+instance FoldCase Char where
+ foldCase = toLower
+ foldCaseList = TL.unpack . TL.toCaseFold . TL.pack
+
+instance FoldCase T.Text where foldCase = T.toCaseFold
+instance FoldCase TL.Text where foldCase = TL.toCaseFold
+instance FoldCase (CI s) where foldCase (CI _ l) = CI l l
+
+toLower8 :: Word8 -> Word8
+toLower8 w
+ | 65 <= w && w <= 90 ||
+ 192 <= w && w <= 214 ||
+ 216 <= w && w <= 222 = w + 32
+ | otherwise = w
+
+--------------------------------------------------------------------------------
+-- Rewrite RULES
+--------------------------------------------------------------------------------
+
+{-# RULES "mk/ByteString" forall (bs :: B.ByteString). mk bs = CI bs (foldCaseBS bs) #-}
+
+foldCaseBS :: B.ByteString -> B.ByteString
+foldCaseBS bs = B.map toLower8' bs
+ where
+ toLower8' :: Word8 -> Word8
+ toLower8' w
+ | 65 <= w && w <= 90 ||
+ 192 <= w && w <= 214 ||
+ 216 <= w && w <= 222 = w + 32
+ | otherwise = w
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/case-insensitive-1.0.0.1/Data/CaseInsensitive/Unsafe.hs new/case-insensitive-1.1.0.3/Data/CaseInsensitive/Unsafe.hs
--- old/case-insensitive-1.0.0.1/Data/CaseInsensitive/Unsafe.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/case-insensitive-1.1.0.3/Data/CaseInsensitive/Unsafe.hs 2014-01-14 00:28:43.000000000 +0100
@@ -0,0 +1,19 @@
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
+
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Unsafe #-}
+#endif
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : Data.CaseInsensitive.Unsafe
+-- Copyright : (c) 2011-2013 Bas van Dijk
+-- License : BSD-style (see the file LICENSE)
+-- Maintainer : Bas van Dijk <v.dijk.bas(a)gmail.com>
+--
+-- Provides an unsafe way to create a case insensitive string-like value.
+--
+-----------------------------------------------------------------------------
+
+module Data.CaseInsensitive.Unsafe ( unsafeMk ) where
+import Data.CaseInsensitive.Internal ( unsafeMk )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/case-insensitive-1.0.0.1/Data/CaseInsensitive.hs new/case-insensitive-1.1.0.3/Data/CaseInsensitive.hs
--- old/case-insensitive-1.0.0.1/Data/CaseInsensitive.hs 2013-03-29 08:34:43.000000000 +0100
+++ new/case-insensitive-1.1.0.3/Data/CaseInsensitive.hs 2014-01-14 00:28:43.000000000 +0100
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, NoImplicitPrelude, DeriveDataTypeable #-}
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
@@ -30,157 +30,4 @@
, map
, FoldCase(foldCase)
) where
-
---------------------------------------------------------------------------------
--- Imports
---------------------------------------------------------------------------------
-
--- from base:
-import Data.Bool ( (||) )
-import Data.Char ( Char, toLower )
-import Data.Eq ( Eq, (==) )
-import Data.Function ( on )
-import Data.Monoid ( Monoid, mempty, mappend )
-import Data.Ord ( Ord, compare )
-import Data.String ( IsString, fromString )
-import Data.Typeable ( Typeable )
-import Data.Word ( Word8 )
-import Prelude ( String, (.), fmap, (&&), (+), (<=), (>=), otherwise )
-import Text.Read ( Read, readPrec )
-import Text.Show ( Show, showsPrec )
-
-import qualified Data.List as L ( map )
-
-#if __GLASGOW_HASKELL__ < 700
-import Control.Monad ( (>>) )
-import Prelude ( fromInteger )
-#endif
-
--- from bytestring:
-import qualified Data.ByteString as B ( ByteString, map )
-import qualified Data.ByteString.Lazy as BL ( ByteString, map )
-
--- from text:
-import qualified Data.Text as T ( Text, toCaseFold )
-import qualified Data.Text.Lazy as TL ( Text, toCaseFold, pack, unpack )
-
--- from deepseq:
-import Control.DeepSeq ( NFData, rnf, deepseq )
-
--- from hashable:
-import Data.Hashable ( Hashable, hashWithSalt )
-
---------------------------------------------------------------------------------
--- Case Insensitive Strings
---------------------------------------------------------------------------------
-
-{-| A @CI s@ provides /C/ase /I/nsensitive comparison for the string-like type
-@s@ (for example: 'String', 'T.Text', 'B.ByteString', etc.).
-
-Note that @CI s@ has an instance for 'IsString' which together with the
-@OverloadedStrings@ language extension allows you to write case insensitive
-string literals as in:
-
-@
-\> (\"Content-Type\" :: 'CI' 'T.Text') == (\"CONTENT-TYPE\" :: 'CI' 'T.Text')
-True
-@
-
--}
-data CI s = CI { original :: !s -- ^ Retrieve the original string-like value.
- , foldedCase :: !s -- ^ Retrieve the case folded string-like value.
- -- (Also see 'foldCase').
- }
- deriving Typeable
-
--- | Make the given string-like value case insensitive.
-mk :: FoldCase s => s -> CI s
-mk s = CI s (foldCase s)
-
--- | Transform the original string-like value but keep it case insensitive.
-map :: FoldCase s2 => (s1 -> s2) -> (CI s1 -> CI s2)
-map f = mk . f . original
-
-instance (IsString s, FoldCase s) => IsString (CI s) where
- fromString = mk . fromString
-
-instance Monoid s => Monoid (CI s) where
- mempty = CI mempty mempty
- CI o1 l1 `mappend` CI o2 l2 = CI (o1 `mappend` o2) (l1 `mappend` l2)
-
-instance Eq s => Eq (CI s) where
- (==) = (==) `on` foldedCase
-
-instance Ord s => Ord (CI s) where
- compare = compare `on` foldedCase
-
-instance (Read s, FoldCase s) => Read (CI s) where
- readPrec = fmap mk readPrec
-
-instance Show s => Show (CI s) where
- showsPrec prec = showsPrec prec . original
-
-instance Hashable s => Hashable (CI s) where
- hashWithSalt salt = hashWithSalt salt . foldedCase
-
-instance NFData s => NFData (CI s) where
- rnf (CI o f) = o `deepseq` f `deepseq` ()
-
---------------------------------------------------------------------------------
--- Folding (lowering) cases
---------------------------------------------------------------------------------
-
--- | Class of string-like types that support folding cases.
---
--- /Note/: In some languages, case conversion is a locale- and context-dependent
--- operation. The @foldCase@ method is /not/ intended to be locale sensitive.
--- Programs that require locale sensitivity should use appropriate versions of
--- the case mapping functions from the @text-icu@ package:
--- <http://hackage.haskell.org/package/text-icu>
-class FoldCase s where
- foldCase :: s -> s
-
- foldCaseList :: [s] -> [s]
- foldCaseList = L.map foldCase
-
-instance FoldCase a => FoldCase [a] where
- foldCase = foldCaseList
-
--- | Note that @foldCase@ on @'B.ByteString's@ is only guaranteed to be correct for ISO-8859-1 encoded strings!
-instance FoldCase B.ByteString where foldCase = B.map toLower8
-
--- | Note that @foldCase@ on @'BL.ByteString's@ is only guaranteed to be correct for ISO-8859-1 encoded strings!
-instance FoldCase BL.ByteString where foldCase = BL.map toLower8
-
-instance FoldCase Char where
- foldCase = toLower
- foldCaseList = TL.unpack . TL.toCaseFold . TL.pack
-
-instance FoldCase T.Text where foldCase = T.toCaseFold
-instance FoldCase TL.Text where foldCase = TL.toCaseFold
-instance FoldCase (CI s) where foldCase (CI _ l) = CI l l
-
-toLower8 :: Word8 -> Word8
-toLower8 w
- | 65 <= w && w <= 90 ||
- 192 <= w && w <= 214 ||
- 216 <= w && w <= 222 = w + 32
- | otherwise = w
-
---------------------------------------------------------------------------------
--- Rewrite RULES
---------------------------------------------------------------------------------
-
-{-# RULES
- "mk/ByteString" forall (bs :: B.ByteString). mk bs = CI bs (foldCaseBS bs)
- #-}
-
-foldCaseBS :: B.ByteString -> B.ByteString
-foldCaseBS bs = B.map toLower8' bs
- where
- toLower8' :: Word8 -> Word8
- toLower8' w
- | 65 <= w && w <= 90 ||
- 192 <= w && w <= 214 ||
- 216 <= w && w <= 222 = w + 32
- | otherwise = w
+import Data.CaseInsensitive.Internal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/case-insensitive-1.0.0.1/case-insensitive.cabal new/case-insensitive-1.1.0.3/case-insensitive.cabal
--- old/case-insensitive-1.0.0.1/case-insensitive.cabal 2013-03-29 08:34:43.000000000 +0100
+++ new/case-insensitive-1.1.0.3/case-insensitive.cabal 2014-01-14 00:28:43.000000000 +0100
@@ -1,5 +1,5 @@
name: case-insensitive
-version: 1.0.0.1
+version: 1.1.0.3
cabal-version: >=1.8
build-type: Simple
license: BSD3
@@ -27,10 +27,11 @@
ghc-options: -Wall
build-depends: base >= 3 && < 4.8
, bytestring >= 0.9 && < 0.11
- , text >= 0.3 && < 0.12
+ , text >= 0.3 && < 1.2
, deepseq >= 1.1 && < 1.4
, hashable >= 1.0 && < 1.3
- exposed-modules: Data.CaseInsensitive
+ exposed-modules: Data.CaseInsensitive, Data.CaseInsensitive.Unsafe
+ other-modules: Data.CaseInsensitive.Internal
test-suite test-case-insensitive
type: exitcode-stdio-1.0
@@ -40,7 +41,7 @@
build-depends: case-insensitive
, base >= 3 && < 4.8
, bytestring >= 0.9 && < 0.11
- , text >= 0.3 && < 0.12
+ , text >= 0.3 && < 1.2
, HUnit >= 1.2.2 && < 1.3
, test-framework >= 0.2.4 && < 0.9
, test-framework-hunit >= 0.2.4 && < 0.4
@@ -57,5 +58,5 @@
build-depends: case-insensitive
, base >= 3 && < 4.8
, bytestring >= 0.9 && < 0.11
- , criterion >= 0.6.1 && < 0.7
+ , criterion >= 0.6.1 && < 0.9
, deepseq >= 1.1 && < 1.4
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-attoparsec for openSUSE:Factory checked in at 2014-11-26 20:54:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-attoparsec (Old)
and /work/SRC/openSUSE:Factory/.ghc-attoparsec.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-attoparsec"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-attoparsec/ghc-attoparsec.changes 2014-08-25 11:05:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-attoparsec.new/ghc-attoparsec.changes 2014-11-26 20:54:38.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Sep 2 08:34:11 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file
+
+-------------------------------------------------------------------
@@ -20 +25 @@
-- fixes bugs an performance issues
+- fixes bugs and performance issues
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-attoparsec.spec ++++++
--- /var/tmp/diff_new_pack.kJhvwg/_old 2014-11-26 20:54:39.000000000 +0100
+++ /var/tmp/diff_new_pack.kJhvwg/_new 2014-11-26 20:54:39.000000000 +0100
@@ -1,8 +1,7 @@
#
# spec file for package ghc-attoparsec
#
-
-# Copyright (c) 2012 Peter Trommler <peter.trommler(a)ohm-hochschule.de>
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,56 +15,54 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-%global pkg_name attoparsec
-
-%global common_summary Haskell fast combinator parsing for bytestrings and text
-%global common_description A fast parser combinator library for Haskell, aimed particularly at dealing efficiently with network protocols and complicated text/binary file formats.
+%global pkg_name attoparsec
Name: ghc-attoparsec
Version: 0.10.4.0
Release: 0
-Summary: %{common_summary}
-
-Group: System/Libraries
+Summary: Fast combinator parsing for bytestrings and text
License: BSD-3-Clause
-# BEGIN cabal2spec
-URL: http://hackage.haskell.org/package/%{pkg_name}
+Group: System/Libraries
+
+Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-rpm-macros %{!?without_hscolour:hscolour}
-# END cabal2spec
+BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
-Buildrequires: ghc-deepseq-devel
+BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-text-devel
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+# End cabal-rpm deps
%description
-%{common_description}
+A fast parser combinator library, aimed particularly at dealing efficiently
+with network protocols and complicated text/binary file formats.
+
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Languages/Other
-Requires: ghc-compiler
-Requires(post): ghc-compiler
-Requires(postun): ghc-compiler
+Group: Development/Libraries/Other
+Provides: %{name}-static = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
%description devel
-%{common_description}
-This package contains the development files.
+This package provides the Haskell %{pkg_name} library development files.
+
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
@@ -77,9 +74,10 @@
%files -f %{name}.files
%defattr(-,root,root,-)
-%doc LICENSE README.markdown
+%doc LICENSE
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc examples README.markdown
%changelog
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ghc-async for openSUSE:Factory checked in at 2014-11-26 20:54:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-async (Old)
and /work/SRC/openSUSE:Factory/.ghc-async.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-async"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-async/ghc-async.changes 2014-08-25 11:05:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-async.new/ghc-async.changes 2014-11-26 20:54:36.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Sep 9 20:19:55 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 2.0.1.5
+* update dependency for ghc 7.8
+* for Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
+Mon Sep 1 17:32:19 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file with cabal-rpm 0.8.6
+* require exact version of ghc-compiler
+
+-------------------------------------------------------------------
Old:
----
async-2.0.1.4.tar.gz
New:
----
async-2.0.1.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-async.spec ++++++
--- /var/tmp/diff_new_pack.OCnG6V/_old 2014-11-26 20:54:38.000000000 +0100
+++ /var/tmp/diff_new_pack.OCnG6V/_new 2014-11-26 20:54:38.000000000 +0100
@@ -1,8 +1,7 @@
#
# spec file for package ghc-async
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# Copyright (c) 2012 Peter Trommler, peter.trommler(a)ohm-hochschule.de
+# Copyright (c) 2014 SUSE LINUX Products 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,40 +18,51 @@
%global pkg_name async
-%global common_summary Haskell library to run IO operations asynchronously
-
-%global common_description This Haskell package provides a higher-level interface over threads, in which an Async a is a concurrent thread that will eventually deliver a value of type a. The package provides ways to create Async computations, wait for their results, and cancel them.
-
Name: ghc-async
-Version: 2.0.1.4
+Version: 2.0.1.5
Release: 0
-Summary: %{common_summary}
+Summary: Run IO operations asynchronously and wait for their results
License: BSD-3-Clause
Group: System/Libraries
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# BEGIN cabal2spec
Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_na…
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
BuildRequires: ghc-stm-devel
-# END cabal2spec
+# End cabal-rpm deps
%description
-%{common_description}
+This package provides a higher-level interface over threads, in which an @Async
+a@ is a concurrent thread that will eventually deliver a value of type @a@.
+The package provides ways to create @Async@ computations, wait for their
+results, and cancel them.
+
+Using @Async@ is safer than using threads in two ways:
+
+* When waiting for a thread to return a result, if the thread dies with an
+exception then the caller must either re-throw the exception ('wait') or handle
+it ('waitCatch'); the exception cannot be ignored.
+
+* The API makes it possible to build a tree of threads that are automatically
+killed when their parent dies (see 'withAsync').
+
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Languages/Other
-Requires: ghc-compiler
-Requires(post): ghc-compiler
-Requires(postun): ghc-compiler
+Group: Development/Libraries/Other
+Provides: %{name}-static = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
%description devel
-%{common_description}
-This package contains the development files.
+This package provides the Haskell %{pkg_name} library development files.
+
%prep
%setup -q -n %{pkg_name}-%{version}
++++++ async-2.0.1.4.tar.gz -> async-2.0.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/async-2.0.1.4/async.cabal new/async-2.0.1.5/async.cabal
--- old/async-2.0.1.4/async.cabal 2012-10-22 10:36:45.000000000 +0200
+++ new/async-2.0.1.5/async.cabal 2013-12-16 08:50:40.000000000 +0100
@@ -22,6 +22,10 @@
threads that are automatically killed when
their parent dies (see 'withAsync').
.
+ Changes in 2.0.1.5:
+ .
+ * Bump @base@ dependencies for GHC 7.8
+ .
Changes in 2.0.1.4:
.
* Bump @base@ dependency of test suite
@@ -48,7 +52,7 @@
.
* Added @Concurrently@ (with @Applicative@ and @Alternative@ instances)
-version: 2.0.1.4
+version: 2.0.1.5
license: BSD3
license-file: LICENSE
author: Simon Marlow
@@ -70,13 +74,13 @@
library
exposed-modules: Control.Concurrent.Async
- build-depends: base >= 4.3 && < 4.7, stm >= 2.2 && < 2.5
+ build-depends: base >= 4.3 && < 4.8, stm >= 2.2 && < 2.5
test-suite test-async
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: test-async.hs
- build-depends: base >= 4.3 && < 4.7,
+ build-depends: base >= 4.3 && < 4.8,
async,
test-framework,
test-framework-hunit,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package cabal-install for openSUSE:Factory checked in at 2014-11-26 20:54:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cabal-install (Old)
and /work/SRC/openSUSE:Factory/.cabal-install.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cabal-install"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cabal-install/cabal-install.changes 2014-08-25 11:05:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cabal-install.new/cabal-install.changes 2014-11-26 20:54:35.000000000 +0100
@@ -1,0 +2,11 @@
+Tue Sep 2 08:10:13 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 1.18.0.4 for Haskell Platform 2014.2.0.0
+* no upstream changelog
+
+-------------------------------------------------------------------
+Mon Sep 1 17:15:25 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file with cabal-rpm 0.8.6
+
+-------------------------------------------------------------------
Old:
----
cabal-install-1.16.0.2.tar.gz
New:
----
cabal-install-1.18.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cabal-install.spec ++++++
--- /var/tmp/diff_new_pack.NVf9qe/_old 2014-11-26 20:54:36.000000000 +0100
+++ /var/tmp/diff_new_pack.NVf9qe/_new 2014-11-26 20:54:36.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package cabal-install
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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,17 +17,19 @@
Name: cabal-install
-Version: 1.16.0.2
+Version: 1.18.0.5
Release: 0
-Summary: Command-line program to manage Haskell software
+Summary: The command-line interface for Cabal and Hackage
License: BSD-3-Clause
Group: Development/Languages/Other
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# BEGIN cabal2spec
Url: http://hackage.haskell.org/package/%{name}
Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{ve…
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-rpm-macros
+# Begin cabal-rpm deps:
BuildRequires: ghc-HTTP-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
@@ -36,19 +38,19 @@
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-network-devel
-BuildRequires: ghc-old-time-devel
BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-random-devel
-BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-stm-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-zlib-devel
-# END cabal2spec
+# End cabal-rpm deps
%description
-Command-line program to manage Haskell software by automating the fetching,
-configuration, compilation, and installation of Haskell libraries and programs
+The cabal command-line program simplifies the process of managing Haskell
+software by automating the fetching, configuration, compilation and
+installation of Haskell libraries and programs.
%prep
@@ -62,7 +64,8 @@
%files
%defattr(-,root,root,-)
-%doc LICENSE README
-%attr(755,root,root) %{_bindir}/cabal
+%doc LICENSE
+%doc README
+%{_bindir}/cabal
%changelog
++++++ cabal-install-1.16.0.2.tar.gz -> cabal-install-1.18.0.5.tar.gz ++++++
++++ 11192 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package alex for openSUSE:Factory checked in at 2014-11-26 20:54:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alex (Old)
and /work/SRC/openSUSE:Factory/.alex.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alex"
Changes:
--------
--- /work/SRC/openSUSE:Factory/alex/alex.changes 2014-08-25 11:05:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.alex.new/alex.changes 2014-11-26 20:54:32.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Sep 8 20:08:49 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- update to 3.1.3
+* fix ghc 7.8 builds
+* needed by Haskell Platform 2014.2.0.0
+
+-------------------------------------------------------------------
+Tue Sep 2 01:17:20 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- package examples
+- cleanup spec file
+
+-------------------------------------------------------------------
Old:
----
alex-3.0.5.tar.gz
New:
----
alex-3.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ alex.spec ++++++
--- /var/tmp/diff_new_pack.R2hjeR/_old 2014-11-26 20:54:33.000000000 +0100
+++ /var/tmp/diff_new_pack.R2hjeR/_new 2014-11-26 20:54:33.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package alex
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Peter Trommler peter.trommler(a)ohm-hochschule.de
#
# All modifications and additions to the file contributed by third parties
@@ -17,11 +17,8 @@
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
Name: alex
-Version: 3.0.5
+Version: 3.1.3
Release: 0
Summary: Tool for generating lexical analysers in Haskell
License: BSD-3-Clause
@@ -58,6 +55,7 @@
%files
%defattr(-,root,root,-)
%doc LICENSE ANNOUNCE README TODO
+%doc examples
%attr(755,root,root) %{_bindir}/%{name}
%{_datadir}/%{name}-%{version}
%{_mandir}/man1/*
++++++ alex-3.0.5.tar.gz -> alex-3.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/Setup.lhs new/alex-3.1.3/Setup.lhs
--- old/alex-3.0.5/Setup.lhs 2013-03-10 13:19:13.000000000 +0100
+++ new/alex-3.1.3/Setup.lhs 2013-11-28 09:35:19.000000000 +0100
@@ -13,6 +13,7 @@
import System.FilePath ((</>))
import Control.Exception ( IOException, try )
import System.Directory (removeFile)
+import Data.Char
main :: IO ()
main = defaultMainWithHooks simpleUserHooks{ postBuild = myPostBuild,
@@ -23,17 +24,20 @@
-- hack to turn cpp-style '# 27 "GenericTemplate.hs"' into
-- '{-# LINE 27 "GenericTemplate.hs" #-}'.
mungeLinePragma line = case symbols line of
- ["#", number, string] | length string >= 2
- && head string == '"'
- && last string == '"'
- -> case reads number of
- [(n, "")] -> "{-# LINE " ++ show (n :: Int) ++ " " ++ string ++ " #-}"
- _ -> line
+ syms | Just prag <- getLinePrag syms -> prag
-- Also convert old-style CVS lines, no idea why we do this...
("--":"$":"Id":":":_) -> filter (/='$') line
( "$":"Id":":":_) -> filter (/='$') line
_ -> line
+getLinePrag :: [String] -> Maybe String
+getLinePrag ("#" : n : string : rest)
+ | length rest <= 1 -- clang puts an extra field
+ , length string >= 2 && head string == '"' && last string == '"'
+ , all isDigit n
+ = Just $ "{-# LINE " ++ n ++ " " ++ string ++ " #-}"
+getLinePrag other = Nothing
+
symbols :: String -> [String]
symbols cs = case lex cs of
(sym, cs'):_ | not (null sym) -> sym : symbols cs'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/alex.cabal new/alex-3.1.3/alex.cabal
--- old/alex-3.0.5/alex.cabal 2013-03-10 13:19:13.000000000 +0100
+++ new/alex-3.1.3/alex.cabal 2013-11-28 09:35:19.000000000 +0100
@@ -1,19 +1,37 @@
name: alex
-version: 3.0.5
+version: 3.1.3
license: BSD3
license-file: LICENSE
copyright: (c) Chis Dornan, Simon Marlow
author: Chris Dornan and Simon Marlow
maintainer: Simon Marlow <marlowsd(a)gmail.com>
-bug-reports: mailto:marlowsd@gmail.com
+bug-reports: https://github.com/simonmar/alex/issues
stability: stable
homepage: http://www.haskell.org/alex/
synopsis: Alex is a tool for generating lexical analysers in Haskell
-description: Alex is a tool for generating lexical analysers in Haskell.
- It takes a description of tokens based on regular
- expressions and generates a Haskell module containing code
- for scanning text efficiently. It is similar to the tool
- lex or flex for C/C++.
+description:
+ Alex is a tool for generating lexical analysers in Haskell.
+ It takes a description of tokens based on regular
+ expressions and generates a Haskell module containing code
+ for scanning text efficiently. It is similar to the tool
+ lex or flex for C/C++.
+ .
+ Changes in 3.1.3:
+ .
+ * Fix for clang (XCode 5)
+ .
+ Changes in 3.1.2:
+ .
+ * Add missing file to extra-source-files
+ .
+ Changes in 3.1.1:
+ .
+ * Bug fixes (#24, #30, #31, #32)
+ .
+ Changes in 3.1.0:
+ .
+ * necessary changes to work with GHC 7.8.1
+
category: Development
cabal-version: >= 1.8
build-type: Custom
@@ -51,13 +69,17 @@
templates/GenericTemplate.hs
templates/wrappers.hs
tests/Makefile
- tests/simple.x
- tests/tokens.x
+ tests/simple.x
+ tests/null.x
+ tests/tokens.x
tests/tokens_gscan.x
tests/tokens_posn.x
tests/tokens_bytestring.x
tests/tokens_posn_bytestring.x
tests/tokens_strict_bytestring.x
+ tests/tokens_monad_bytestring.x
+ tests/tokens_monadUserState_bytestring.x
+ tests/tokens_bytestring_unicode.x
tests/unicode.x
source-repository head
@@ -107,4 +129,4 @@
test-suite tests
type: exitcode-stdio-1.0
main-is: test.hs
- build-depends: process
+ build-depends: base, process
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/dist/build/alex/alex-tmp/Parser.hs new/alex-3.1.3/dist/build/alex/alex-tmp/Parser.hs
--- old/alex-3.0.5/dist/build/alex/alex-tmp/Parser.hs 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/dist/build/alex/alex-tmp/Parser.hs 2013-11-28 09:35:19.000000000 +0100
@@ -21,7 +21,7 @@
import qualified Data.Array as Happy_Data_Array
import qualified GHC.Exts as Happy_GHC_Exts
--- parser produced by Happy Version 1.18.9
+-- parser produced by Happy Version 1.19.0
newtype HappyAbsSyn = HappyAbsSyn HappyAny
#if __GLASGOW_HASKELL__ >= 607
@@ -874,7 +874,22 @@
{-# LINE 1 "templates/GenericTemplate.hs" #-}
-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
-{-# LINE 30 "templates/GenericTemplate.hs" #-}
+{-# LINE 13 "templates/GenericTemplate.hs" #-}
+
+
+
+
+
+#if __GLASGOW_HASKELL__ > 706
+#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)
+#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)
+#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)
+#else
+#define LT(n,m) (n Happy_GHC_Exts.<# m)
+#define GTE(n,m) (n Happy_GHC_Exts.>=# m)
+#define EQ(n,m) (n Happy_GHC_Exts.==# m)
+#endif
+{-# LINE 45 "templates/GenericTemplate.hs" #-}
data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList
@@ -883,11 +898,11 @@
-{-# LINE 51 "templates/GenericTemplate.hs" #-}
+{-# LINE 66 "templates/GenericTemplate.hs" #-}
-{-# LINE 61 "templates/GenericTemplate.hs" #-}
+{-# LINE 76 "templates/GenericTemplate.hs" #-}
-{-# LINE 70 "templates/GenericTemplate.hs" #-}
+{-# LINE 85 "templates/GenericTemplate.hs" #-}
infixr 9 `HappyStk`
data HappyStk a = HappyStk a (HappyStk a)
@@ -922,7 +937,7 @@
happyFail i tk st
-1# -> {- nothing -}
happyAccept i tk st
- n | (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
+ n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
(happyReduceArr Happy_Data_Array.! rule) i tk st
where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))
@@ -930,18 +945,16 @@
happyShift new_state i tk st
- where (new_state) = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
- where (off) = indexShortOffAddr happyActOffsets st
- (off_i) = (off Happy_GHC_Exts.+# i)
- check = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#))
- then (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
- else False
- (action)
+ where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
+ where off = indexShortOffAddr happyActOffsets st
+ off_i = (off Happy_GHC_Exts.+# i)
+ check = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))
+ then EQ(indexShortOffAddr happyCheck off_i, i)
+ else False
+ action
| check = indexShortOffAddr happyTable off_i
| otherwise = indexShortOffAddr happyDefActions st
-{-# LINE 130 "templates/GenericTemplate.hs" #-}
-
indexShortOffAddr (HappyA# arr) off =
Happy_GHC_Exts.narrow16Int# i
@@ -963,13 +976,13 @@
-----------------------------------------------------------------------------
-- HappyState data type (not arrays)
-{-# LINE 163 "templates/GenericTemplate.hs" #-}
+{-# LINE 169 "templates/GenericTemplate.hs" #-}
-----------------------------------------------------------------------------
-- Shifting a token
happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =
- let (i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
+ let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
-- trace "shifting the error token" $
happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)
@@ -1012,23 +1025,26 @@
happyMonadReduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
- happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
- where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
- drop_stk = happyDropStk k stk
+ case happyDrop k (HappyCons (st) (sts)) of
+ sts1@((HappyCons (st1@(action)) (_))) ->
+ let drop_stk = happyDropStk k stk in
+ happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
happyMonad2Reduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
- happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
- where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
- drop_stk = happyDropStk k stk
-
- (off) = indexShortOffAddr happyGotoOffsets st1
- (off_i) = (off Happy_GHC_Exts.+# nt)
- (new_state) = indexShortOffAddr happyTable off_i
+ case happyDrop k (HappyCons (st) (sts)) of
+ sts1@((HappyCons (st1@(action)) (_))) ->
+ let drop_stk = happyDropStk k stk
+
+ off = indexShortOffAddr happyGotoOffsets st1
+ off_i = (off Happy_GHC_Exts.+# nt)
+ new_state = indexShortOffAddr happyTable off_i
+ in
+ happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
happyDrop 0# l = l
happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t
@@ -1043,9 +1059,9 @@
happyGoto nt j tk st =
{- nothing -}
happyDoAction j tk new_state
- where (off) = indexShortOffAddr happyGotoOffsets st
- (off_i) = (off Happy_GHC_Exts.+# nt)
- (new_state) = indexShortOffAddr happyTable off_i
+ where off = indexShortOffAddr happyGotoOffsets st
+ off_i = (off Happy_GHC_Exts.+# nt)
+ new_state = indexShortOffAddr happyTable off_i
@@ -1055,7 +1071,7 @@
-- parse error if we are in recovery and we fail again
happyFail 0# tk old_st _ stk@(x `HappyStk` _) =
- let (i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
+ let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
-- trace "failing" $
happyError_ i tk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/dist/build/alex/alex-tmp/Scan.hs new/alex-3.1.3/dist/build/alex/alex-tmp/Scan.hs
--- old/alex-3.0.5/dist/build/alex/alex-tmp/Scan.hs 2013-03-10 13:19:13.000000000 +0100
+++ new/alex-3.1.3/dist/build/alex/alex-tmp/Scan.hs 2013-11-28 09:35:19.000000000 +0100
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP,MagicHash,BangPatterns #-}
+{-# LANGUAGE CPP,MagicHash #-}
{-# LINE 13 "src/Scan.x" #-}
{-# OPTIONS_GHC -w #-}
@@ -39,7 +39,7 @@
alex_deflt :: AlexAddr
alex_deflt = AlexA# "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x2e\x00\x34\x00\x34\x00\x36\x00\x36\x00\xff\xff\x3f\x00\x3f\x00\x40\x00\x40\x00\x46\x00\x46\x00\x4a\x00\x4a\x00\x4d\x00\x4d\x00\x4e\x00\x4e\x00\x50\x00\x50\x00\xff\xff\x52\x00\x52\x00\x52\x00\x57\x00\x57\x00\x58\x00\x58\x00\x5a\x00\x5a\x00\x5f\x00\x5f\x00\x0b\x00\x0b\x00\x0b\x00\x09\x00\x09\x00\x09\x00\x62\x00\x62\x00\x65\x00\x65\x00\x52\x00\xff\xff\xff\xff\x67\x00\x67\x00\x67\x00\x6a\x00\x6a\x00\x6e\x00\x6e\x00\x93\x00\x93\x00\x93\x00\x93\x00\x82\x00\x82\x00\x82\x00\x7d\x00\x7d\x00\x7d\x00\xff\xff\x67\x00\x71\x00\x71\x00\x71\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
-alex_accept = listArray (0::Int,147) [[],[(AlexAcc (alex_action_21))],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[(AlexAccSkip)],[(AlexAcc (alex_action_0))],[(AlexAcc (alex_action_0))],[(AlexAcc (alex_action_1))],[(AlexAcc (alex_action_2))],[(AlexAcc (alex_action_2))],[(AlexAccPred (alex_action_3) (alexRightContext 108)),(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_5))],[(AlexAcc (alex_action_6))],[(AlexAcc (alex_action_7))],[(AlexAcc (alex_action_8))],[(AlexAcc (alex_action_9))],[(AlexAcc (alex_action_9))],[(AlexAcc (alex_action_9))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_10))],[(AlexAcc (alex_action_11))],[(AlexAcc (alex_action_11))],[(AlexAcc (alex_action_12))],[(AlexAcc (alex_action_12))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_15))],[(AlexAcc (alex_action_16))],[(AlexAcc (alex_action_17))],[(AlexAcc (alex_action_18))],[(AlexAcc (alex_action_19))],[(AlexAcc (alex_action_20))]]
+alex_accept = listArray (0::Int,147) [AlexAccNone,AlexAcc (alex_action_21),AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccSkip,AlexAcc (alex_action_0),AlexAcc (alex_action_0),AlexAcc (alex_action_1),AlexAcc (alex_action_2),AlexAcc (alex_action_2),AlexAccPred (alex_action_3) (alexRightContext 108)(AlexAcc (alex_action_4)),AlexAcc (alex_action_4),AlexAcc (alex_action_4),AlexAcc (alex_action_4),AlexAcc (alex_action_5),AlexAcc (alex_action_6),AlexAcc (alex_action_7),AlexAcc (alex_action_8),AlexAcc (alex_action_9),AlexAcc (alex_action_9),AlexAcc (alex_action_9),AlexAcc (alex_action_10),AlexAcc (alex_action_10),AlexAcc (alex_action_10),AlexAcc (alex_action_10),AlexAcc (alex_action_10),AlexAcc (alex_action_10),AlexAcc (alex_action_11),AlexAcc (alex_action_11),AlexAcc (alex_action_12),AlexAcc (alex_action_12),AlexAcc (alex_action_13),AlexAcc (alex_action_13),AlexAcc (alex_action_14),AlexAcc (alex_action_14),AlexAcc (alex_action_15),AlexAcc (alex_action_16),AlexAcc (alex_action_17),AlexAcc (alex_action_18),AlexAcc (alex_action_19),AlexAcc (alex_action_20)]
{-# LINE 75 "src/Scan.x" #-}
@@ -225,13 +225,25 @@
-- -----------------------------------------------------------------------------
-- INTERNALS and main scanner engine
-{-# LINE 37 "templates/GenericTemplate.hs" #-}
+{-# LINE 21 "templates/GenericTemplate.hs" #-}
+
-{-# LINE 47 "templates/GenericTemplate.hs" #-}
-data AlexAddr = AlexA# Addr#
+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
+#if __GLASGOW_HASKELL__ > 706
+#define GTE(n,m) (tagToEnum# (n >=# m))
+#define EQ(n,m) (tagToEnum# (n ==# m))
+#else
+#define GTE(n,m) (n >=# m)
+#define EQ(n,m) (n ==# m)
+#endif
+{-# LINE 51 "templates/GenericTemplate.hs" #-}
+
+
+data AlexAddr = AlexA# Addr#
+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
#if __GLASGOW_HASKELL__ < 503
uncheckedShiftL# = shiftL#
#endif
@@ -241,10 +253,10 @@
#ifdef WORDS_BIGENDIAN
narrow16Int# i
where
- !i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
- !high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
- !low = int2Word# (ord# (indexCharOffAddr# arr off'))
- !off' = off *# 2#
+ i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
+ high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
+ low = int2Word# (ord# (indexCharOffAddr# arr off'))
+ off' = off *# 2#
#else
indexInt16OffAddr# arr off
#endif
@@ -258,14 +270,14 @@
#ifdef WORDS_BIGENDIAN
narrow32Int# i
where
- !i = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`
+ i = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`
(b2 `uncheckedShiftL#` 16#) `or#`
(b1 `uncheckedShiftL#` 8#) `or#` b0)
- !b3 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))
- !b2 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))
- !b1 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
- !b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
- !off' = off *# 4#
+ b3 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))
+ b2 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))
+ b1 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
+ b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
+ off' = off *# 4#
#else
indexInt32OffAddr# arr off
#endif
@@ -274,6 +286,7 @@
+
#if __GLASGOW_HASKELL__ < 503
quickIndex arr i = arr ! i
#else
@@ -340,35 +353,40 @@
- let
- (!(base)) = alexIndexInt32OffAddr alex_base s
- (!((I# (ord_c)))) = fromIntegral c
- (!(offset)) = (base +# ord_c)
- (!(check)) = alexIndexInt16OffAddr alex_check offset
+ case fromIntegral c of { (I# (ord_c)) ->
+ let
+ base = alexIndexInt32OffAddr alex_base s
+ offset = (base +# ord_c)
+ check = alexIndexInt16OffAddr alex_check offset
- (!(new_s)) = if (offset >=# 0#) && (check ==# ord_c)
+ new_s = if GTE(offset,0#) && EQ(check,ord_c)
then alexIndexInt16OffAddr alex_table offset
else alexIndexInt16OffAddr alex_deflt s
in
- case new_s of
+ case new_s of
-1# -> (new_acc, input)
-- on an error, we want to keep the input *before* the
-- character that failed, not after.
_ -> alex_scan_tkn user orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)
-- note that the length is increased ONLY if this is the 1st byte in a char encoding)
new_input new_s new_acc
-
+ }
where
- check_accs [] = last_acc
- check_accs (AlexAcc a : _) = AlexLastAcc a input (I# (len))
- check_accs (AlexAccSkip : _) = AlexLastSkip input (I# (len))
- check_accs (AlexAccPred a predx : rest)
+ check_accs (AlexAccNone) = last_acc
+ check_accs (AlexAcc a ) = AlexLastAcc a input (I# (len))
+ check_accs (AlexAccSkip) = AlexLastSkip input (I# (len))
+
+ check_accs (AlexAccPred a predx rest)
| predx user orig_input (I# (len)) input
= AlexLastAcc a input (I# (len))
- check_accs (AlexAccSkipPred predx : rest)
+ | otherwise
+ = check_accs rest
+ check_accs (AlexAccSkipPred predx rest)
| predx user orig_input (I# (len)) input
= AlexLastSkip input (I# (len))
- check_accs (_ : rest) = check_accs rest
+ | otherwise
+ = check_accs rest
+
data AlexLastAcc a
= AlexNone
@@ -381,10 +399,12 @@
fmap f (AlexLastSkip x y) = AlexLastSkip x y
data AlexAcc a user
- = AlexAcc a
+ = AlexAccNone
+ | AlexAcc a
| AlexAccSkip
- | AlexAccPred a (AlexAccPred user)
- | AlexAccSkipPred (AlexAccPred user)
+
+ | AlexAccPred a (AlexAccPred user) (AlexAcc a user)
+ | AlexAccSkipPred (AlexAccPred user) (AlexAcc a user)
type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool
@@ -411,5 +431,6 @@
-- match when checking the right context, just
-- the first match will do.
+
-- used by wrappers
iUnbox (I# (i)) = i
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/doc/alex.xml new/alex-3.1.3/doc/alex.xml
--- old/alex-3.0.5/doc/alex.xml 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/doc/alex.xml 2013-11-28 09:35:19.000000000 +0100
@@ -362,7 +362,7 @@
<para>Alex takes a description of tokens based on regular
expressions and generates a Haskell module containing code for
scanning text efficiently. Alex is designed to be familiar to
- exisiting lex users, although it does depart from lex in a number
+ existing lex users, although it does depart from lex in a number
of ways.</para>
<figure id="fig-tokens" float="1"><title>A simple Alex specification.</title>
@@ -429,7 +429,7 @@
<programlisting><replaceable>regexp</replaceable> { <replaceable>code</replaceable> }</programlisting>
- <para>The meaming of a this rule is "if the input matches
+ <para>The meaning of a this rule is "if the input matches
<replaceable>regexp</replaceable>, then return
<replaceable>code</replaceable>". The code part along with the
braces can be replaced by simply
@@ -588,7 +588,7 @@
<para>The rules are heralded by the sequence
‘<literal><replaceable>id</replaceable> :-</literal>’
in the file. It doesn't matter what you use for the
- identifer, it is just there for documentation purposes. In
+ identifier, it is just there for documentation purposes. In
fact, it can be omitted, but the <literal>:-</literal> must be
left in.</para>
@@ -723,7 +723,7 @@
specification, such that only certain rules will match for a
given state.</para>
- <para>A startcode is simply an identifer, or the special
+ <para>A startcode is simply an identifier, or the special
start code ‘<literal>0</literal>’. Each rule
may be given a list of startcodes under which it
applies:</para>
@@ -851,7 +851,7 @@
<varlistentry>
<term><literal><replaceable>r</replaceable>*</literal></term>
<listitem>
- <para>Matches zero or more occurences of
+ <para>Matches zero or more occurrences of
<replaceable>r</replaceable>.</para>
</listitem>
</varlistentry>
@@ -859,7 +859,7 @@
<varlistentry>
<term><literal><replaceable>r</replaceable>+</literal></term>
<listitem>
- <para>Matches one or more occurences of
+ <para>Matches one or more occurrences of
<replaceable>r</replaceable>.</para>
</listitem>
</varlistentry>
@@ -867,7 +867,7 @@
<varlistentry>
<term><literal><replaceable>r</replaceable>?</literal></term>
<listitem>
- <para>Matches zero or one occurences of
+ <para>Matches zero or one occurrences of
<replaceable>r</replaceable>.</para>
</listitem>
</varlistentry>
@@ -1208,11 +1208,7 @@
:: user -- predicate state
-> AlexInput -- The current input
-> Int -- The "start code"
- -> Maybe ( -- Nothing on error or EOF
- AlexInput, -- The remaining input
- Int, -- Length of this token
- action -- The action (an unknown type)
- )</programlisting>
+ -> AlexReturn action</programlisting>
<para>The extra argument, of some type <literal>user</literal>,
is passed to each predicate.</para>
@@ -1278,7 +1274,7 @@
<para>The type signature for <literal>alexScanTokens</literal>
is commented out, because the <literal>token</literal> type is
- unkonwn. All of the actions in your lexical specification
+ unknown. All of the actions in your lexical specification
should have type:</para>
<programlisting>{ ... } :: String -> token</programlisting>
@@ -1374,6 +1370,12 @@
<programlisting>type AlexAction result = AlexInput -> Int -> Alex result
{ ... } :: AlexAction result</programlisting>
+ <para>The Alex file must also define a function
+ <literal>alexEOF</literal>, which will be executed on when the
+ end-of-file is scanned:</para>
+
+<programlisting>alexEOF :: Alex result</programlisting>
+
<para>The <literal>monad</literal> wrapper also provides some
useful combinators for constructing token actions:</para>
@@ -1403,7 +1405,7 @@
it during the whole lexing phase.</para>
<para>The generated code is the same as in the <literal>monad</literal>
- wrapper, except in 2 places:</para>
+ wrapper, except in 3 places:</para>
<para>1) The definition of the general state, which now refers to a
type (<literal>AlexUserState</literal>) that must be defined in the Alex file.</para>
@@ -1433,6 +1435,13 @@
Right ( _, a ) -> Right a
</programlisting>
+ <para>3) Two helper functions (<literal>alexGetUserState</literal>
+ and <literal>alexSetUserState</literal>) are defined.</para>
+
+<programlisting>
+alexGetUserState :: Alex AlexUserState
+alexSetUserState :: AlexUserState -> Alex ()
+</programlisting>
<para>Here is an example of code in the user's Alex file defining
the type and function:</para>
@@ -1450,19 +1459,19 @@
}
getLexerCommentDepth :: Alex Int
-getLexerCommentDepth = Alex $ \s@AlexState{alex_ust=ust} -> Right (s, lexerCommentDepth ust)
+getLexerCommentDepth = do ust <- alexGetUserState; return (lexerCommentDepth ust)
setLexerCommentDepth :: Int -> Alex ()
-setLexerCommentDepth ss = Alex $ \s -> Right (s{alex_ust=(alex_ust s){lexerCommentDepth=ss}}, ())
+setLexerCommentDepth ss = do ust <- alexGetUserState; alexSetUserState ust{lexerCommentDepth=ss}
getLexerStringValue :: Alex String
-getLexerStringValue = Alex $ \s@AlexState{alex_ust=ust} -> Right (s, lexerStringValue ust)
+getLexerStringValue = do ust <- alexGetUserState; return (lexerStringValue ust)
setLexerStringValue :: String -> Alex ()
-setLexerStringValue ss = Alex $ \s -> Right (s{alex_ust=(alex_ust s){lexerStringValue=ss}}, ())
+setLexerStringValue ss = do ust <- alexGetUserState; alexSetUserState ust{lexerStringValue=ss}
addCharToLexerStringValue :: Char -> Alex ()
-addCharToLexerStringValue c = Alex $ \s -> Right (s{alex_ust=(alex_ust s){lexerStringValue=c:lexerStringValue (alex_ust s)}}, ())
+addCharToLexerStringValue c = do ust <- alexGetUserState; alexSetUserState ust{lexerStringValue=c:(lexerStringValue ust)}
</programlisting>
</section>
@@ -1503,7 +1512,7 @@
<para>The point of using these wrappers is that
<literal>ByteString</literal>s provide a more memory efficient
- representaion of an input stream. They can also be somewhat faster to
+ representation of an input stream. They can also be somewhat faster to
process. Note that using these wrappers adds a dependency
on the <literal>ByteString</literal> modules, which live in the
<literal>bytestring</literal> package (or in the
@@ -1589,7 +1598,7 @@
<programlisting>
import qualified Data.ByteString.Lazy as ByteString
-ata AlexState = AlexState {
+data AlexState = AlexState {
alex_pos :: !AlexPosn, -- position at current input location
alex_inp :: ByteString.ByteString, -- the current input
alex_chr :: !Char, -- the character before the input
@@ -1712,7 +1721,7 @@
<term><option>--debug</option></term>
<listitem>
<para>Causes Alex to produce a lexer which will output
- debugging messsages as it runs.</para>
+ debugging messages as it runs.</para>
</listitem>
</varlistentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/src/CharSet.hs new/alex-3.1.3/src/CharSet.hs
--- old/alex-3.0.5/src/CharSet.hs 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/src/CharSet.hs 2013-11-28 09:35:19.000000000 +0100
@@ -126,7 +126,9 @@
charRangeToCharSpan :: Bool -> Range Char -> Maybe (Span Char)
charRangeToCharSpan _ (Range BoundaryAboveAll _) = Nothing
+charRangeToCharSpan _ (Range (BoundaryAbove c) _) | c == maxBound = Nothing
charRangeToCharSpan _ (Range _ BoundaryBelowAll) = Nothing
+charRangeToCharSpan _ (Range _ (BoundaryBelow c)) | c == minBound = Nothing
charRangeToCharSpan uni (Range x y) = Just (Span (l x) (h y))
where l b = case b of
BoundaryBelowAll -> '\0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/templates/GenericTemplate.hs new/alex-3.1.3/templates/GenericTemplate.hs
--- old/alex-3.0.5/templates/GenericTemplate.hs 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/templates/GenericTemplate.hs 2013-11-28 09:35:19.000000000 +0100
@@ -8,12 +8,29 @@
-- INTERNALS and main scanner engine
#ifdef ALEX_GHC
+#undef __GLASGOW_HASKELL__
+#define ALEX_IF_GHC_GT_500 #if __GLASGOW_HASKELL__ > 500
+#define ALEX_IF_GHC_LT_503 #if __GLASGOW_HASKELL__ < 503
+#define ALEX_IF_GHC_GT_706 #if __GLASGOW_HASKELL__ > 706
+#define ALEX_ELIF_GHC_500 #elif __GLASGOW_HASKELL__ == 500
+#define ALEX_IF_BIGENDIAN #ifdef WORDS_BIGENDIAN
+#define ALEX_ELSE #else
+#define ALEX_ENDIF #endif
+#define ALEX_DEFINE #define
+#endif
+
+#ifdef ALEX_GHC
#define ILIT(n) n#
#define IBOX(n) (I# (n))
#define FAST_INT Int#
-#define LT(n,m) (n <# m)
-#define GTE(n,m) (n >=# m)
-#define EQ(n,m) (n ==# m)
+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
+ALEX_IF_GHC_GT_706
+ALEX_DEFINE GTE(n,m) (tagToEnum# (n >=# m))
+ALEX_DEFINE EQ(n,m) (tagToEnum# (n ==# m))
+ALEX_ELSE
+ALEX_DEFINE GTE(n,m) (n >=# m)
+ALEX_DEFINE EQ(n,m) (n ==# m)
+ALEX_ENDIF
#define PLUS(n,m) (n +# m)
#define MINUS(n,m) (n -# m)
#define TIMES(n,m) (n *# m)
@@ -23,7 +40,6 @@
#define ILIT(n) (n)
#define IBOX(n) (n)
#define FAST_INT Int
-#define LT(n,m) (n < m)
#define GTE(n,m) (n >= m)
#define EQ(n,m) (n == m)
#define PLUS(n,m) (n + m)
@@ -34,18 +50,8 @@
#endif
#ifdef ALEX_GHC
-#undef __GLASGOW_HASKELL__
-#define ALEX_IF_GHC_GT_500 #if __GLASGOW_HASKELL__ > 500
-#define ALEX_IF_GHC_LT_503 #if __GLASGOW_HASKELL__ < 503
-#define ALEX_ELIF_GHC_500 #elif __GLASGOW_HASKELL__ == 500
-#define ALEX_IF_BIGENDIAN #ifdef WORDS_BIGENDIAN
-#define ALEX_ELSE #else
-#define ALEX_ENDIF #endif
-#endif
-
-#ifdef ALEX_GHC
data AlexAddr = AlexA# Addr#
-
+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
ALEX_IF_GHC_LT_503
uncheckedShiftL# = shiftL#
ALEX_ENDIF
@@ -88,6 +94,7 @@
#endif
#ifdef ALEX_GHC
+
ALEX_IF_GHC_LT_503
quickIndex arr i = arr ! i
ALEX_ELSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/templates/wrappers.hs new/alex-3.1.3/templates/wrappers.hs
--- old/alex-3.0.5/templates/wrappers.hs 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/templates/wrappers.hs 2013-11-28 09:35:19.000000000 +0100
@@ -75,6 +75,9 @@
Char, -- previous char
ByteString.ByteString) -- current input string
+ignorePendingBytes :: AlexInput -> AlexInput
+ignorePendingBytes i = i -- no pending bytes when lexing bytestrings
+
alexInputPrevChar :: AlexInput -> Char
alexInputPrevChar (p,c,s) = c
@@ -195,12 +198,20 @@
alexSetStartCode :: Int -> Alex ()
alexSetStartCode sc = Alex $ \s -> Right (s{alex_scd=sc}, ())
+#ifdef ALEX_MONAD_USER_STATE
+alexGetUserState :: Alex AlexUserState
+alexGetUserState = Alex $ \s@AlexState{alex_ust=ust} -> Right (s,ust)
+
+alexSetUserState :: AlexUserState -> Alex ()
+alexSetUserState ss = Alex $ \s -> Right (s{alex_ust=ss}, ())
+#endif
+
alexMonadScan = do
inp <- alexGetInput
sc <- alexGetStartCode
case alexScan inp sc of
AlexEOF -> alexEOF
- AlexError inp' -> alexError "lexical error"
+ AlexError ((AlexPn _ line column),_,_,_) -> alexError $ "lexical error at line " ++ (show line) ++ ", column " ++ (show column)
AlexSkip inp' len -> do
alexSetInput inp'
alexMonadScan
@@ -285,17 +296,19 @@
alexSetStartCode sc = Alex $ \s -> Right (s{alex_scd=sc}, ())
alexMonadScan = do
- inp <- alexGetInput
+ inp@(_,_,str) <- alexGetInput
sc <- alexGetStartCode
case alexScan inp sc of
AlexEOF -> alexEOF
- AlexError inp' -> alexError "lexical error"
+ AlexError ((AlexPn _ line column),_,_) -> alexError $ "lexical error at line " ++ (show line) ++ ", column " ++ (show column)
AlexSkip inp' len -> do
alexSetInput inp'
alexMonadScan
- AlexToken inp' len action -> do
+ AlexToken inp'@(_,_,str') len action -> do
alexSetInput inp'
action (ignorePendingBytes inp) len
+ where
+ len = ByteString.length str - ByteString.length str'
-- -----------------------------------------------------------------------------
-- Useful token actions
@@ -358,8 +371,8 @@
AlexEOF -> []
AlexError _ -> error "lexical error"
AlexSkip inp' len -> go inp'
- AlexToken inp' len act -> act (ByteString.take (fromIntegral len) str) : go inp'
-
+ AlexToken inp'@(_,str') _ act -> act (ByteString.take len str) : go inp'
+ where len = ByteString.length str - ByteString.length str'
#endif
@@ -372,7 +385,8 @@
AlexEOF -> []
AlexError _ -> error "lexical error"
AlexSkip inp' len -> go inp'
- AlexToken inp' len act -> act (ByteString.unsafeTake len str) : go inp'
+ AlexToken inp'@(AlexInput _ str') _ act -> act (ByteString.unsafeTake len str) : go inp'
+ where len = ByteString.length str - ByteString.length str'
#endif
@@ -388,7 +402,7 @@
where go inp@(pos,_,_,str) =
case alexScan inp 0 of
AlexEOF -> []
- AlexError ((AlexPn _ line column),_,_,_) -> error $ "lexical error at " ++ (show line) ++ " line, " ++ (show column) ++ " column"
+ AlexError ((AlexPn _ line column),_,_,_) -> error $ "lexical error at line " ++ (show line) ++ ", column " ++ (show column)
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (take len str) : go inp'
#endif
@@ -403,7 +417,7 @@
where go inp@(pos,_,str) =
case alexScan inp 0 of
AlexEOF -> []
- AlexError ((AlexPn _ line column),_,_) -> error $ "lexical error at " ++ (show line) ++ " line, " ++ (show column) ++ " column"
+ AlexError ((AlexPn _ line column),_,_) -> error $ "lexical error at line " ++ (show line) ++ ", column " ++ (show column)
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (ByteString.take (fromIntegral len) str) : go inp'
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/Makefile new/alex-3.1.3/tests/Makefile
--- old/alex-3.0.5/tests/Makefile 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/tests/Makefile 2013-11-28 09:35:19.000000000 +0100
@@ -10,7 +10,7 @@
HS_PROG_EXT = .bin
endif
-TESTS = unicode.x simple.x tokens.x tokens_posn.x tokens_gscan.x tokens_bytestring.x tokens_posn_bytestring.x tokens_strict_bytestring.x
+TESTS = unicode.x simple.x tokens.x tokens_posn.x tokens_gscan.x tokens_bytestring.x tokens_posn_bytestring.x tokens_strict_bytestring.x tokens_monad_bytestring.x tokens_monadUserState_bytestring.x null.x tokens_bytestring_unicode.x
TEST_ALEX_OPTS = --template=..
@@ -20,9 +20,6 @@
%.g.hs : %.x
$(ALEX) $(TEST_ALEX_OPTS) -g $< -o $@
-%.o : %.hs
- $(HC) $(HC_OPTS) -c -o $@ $<
-
CLEAN_FILES += *.n.hs *.g.hs *.info *.hi *.o *.bin *.exe
ALL_TEST_HS = $(shell echo $(TESTS) | sed -e 's/\([^\. ]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs/g')
@@ -32,7 +29,7 @@
%.run : %$(HS_PROG_EXT)
./$<
-%$(HS_PROG_EXT) : %.o
+%$(HS_PROG_EXT) : %.hs
$(HC) $(HC_OPTS) -package array -package bytestring $($*_LD_OPTS) $< -o $@
all :: $(ALL_TESTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/null.x new/alex-3.1.3/tests/null.x
--- old/alex-3.0.5/tests/null.x 1970-01-01 01:00:00.000000000 +0100
+++ new/alex-3.1.3/tests/null.x 2013-11-28 09:35:19.000000000 +0100
@@ -0,0 +1,71 @@
+{
+-- Tests the basic operation.
+module Main where
+
+import Data.Char (toUpper)
+import Control.Monad
+import System.Exit
+import System.IO
+import Prelude hiding (null)
+}
+
+%wrapper "monad"
+
+@word = [A-Za-z]+
+@null = \0
+
+$escchars = [abfnrtv\\"\'&]
+@escape = \\ ($escchars | \0)
+@gap = \\ $white+ \\
+@string = $printable # [\"] | " " | @escape | @gap
+
+@inComment = ([^\*] | $white)+ | ([\*]+ ([\x00-\xff] # [\/]))
+
+tokens :-
+
+$white+ ;
+
+<0> {
+ @null { null }
+ @word { word }
+ \" @string \" { string }
+ "--" @inComment \n { word }
+}
+
+{
+{- we can now have comments in source code? -}
+word (p,_,_,input) len = return (take len input)
+
+null (p,_,_,input) len = return "\0"
+
+string (p,_,_,input) len = return (drop 1 (reverse (drop 1 (reverse input))))
+
+alexEOF = return "stopped."
+
+scanner str = runAlex str $ do
+ let loop = do tok <- alexMonadScan
+ if tok == "stopped." || tok == "error."
+ then return [tok]
+ else do toks <- loop
+ return (tok:toks)
+ loop
+
+main = do
+ let test1 = scanner str1
+ when (test1 /= out1) $
+ do hPutStrLn stderr "Test 1 failed:"
+ print test1
+ exitFailure
+
+ let test2 = scanner str2
+ when (test2 /= out2) $
+ do hPutStrLn stderr "Test 2 failed:"
+ print test2
+ exitFailure
+
+str1 = "a\0bb\0ccc\0\0\"\\\0\""
+out1 = Right ["a","\NUL","bb","\NUL","ccc","\NUL","\NUL","\\\NUL", "stopped."]
+
+str2 = "."
+out2 = Left "lexical error at line 1, column 1"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/simple.x new/alex-3.1.3/tests/simple.x
--- old/alex-3.0.5/tests/simple.x 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/tests/simple.x 2013-11-28 09:35:19.000000000 +0100
@@ -69,5 +69,5 @@
out1 = Right ["BOL:a","b","c","D","E","F","PING!","MAGIC","EOL:eol", "BOL:bol", "BOTH:both", "stopped."]
str2 = "."
-out2 = Left "lexical error"
+out2 = Left "lexical error at line 1, column 1"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/tokens_bytestring_unicode.x new/alex-3.1.3/tests/tokens_bytestring_unicode.x
--- old/alex-3.0.5/tests/tokens_bytestring_unicode.x 1970-01-01 01:00:00.000000000 +0100
+++ new/alex-3.1.3/tests/tokens_bytestring_unicode.x 2013-11-28 09:35:19.000000000 +0100
@@ -0,0 +1,42 @@
+{
+{-# LANGUAGE OverloadedStrings #-}
+module Main (main) where
+import System.Exit
+import Data.ByteString.Lazy.Char8 (unpack)
+}
+
+%wrapper "basic-bytestring"
+
+$digit = 0-9 -- digits
+$alpha = [a-zA-Zαβ] -- alphabetic characters
+
+tokens :-
+
+ $white+ ;
+ "--".* ;
+ let { \s -> Let }
+ in { \s -> In }
+ $digit+ { \s -> Int (read (unpack s)) }
+ [\=\+\-\*\/\(\)] { \s -> Sym (head (unpack s)) }
+ $alpha [$alpha $digit \_ \']* { \s -> Var (unpack s) }
+
+{
+-- Each right-hand side has type :: ByteString -> Token
+
+-- The token type:
+data Token =
+ Let |
+ In |
+ Sym Char |
+ Var String |
+ Int Int |
+ Err
+ deriving (Eq,Show)
+
+main = if test1 /= result1 then exitFailure
+ else exitWith ExitSuccess
+
+-- \206\177\206\178\206\178 is "αββ" utf-8 encoded
+test1 = alexScanTokens " let in 012334\n=+*foo \206\177\206\178\206\178 bar__'"
+result1 = [Let,In,Int 12334,Sym '=',Sym '+',Sym '*',Var "foo",Var "\206\177\206\178\206\178",Var "bar__'"]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/tokens_monadUserState_bytestring.x new/alex-3.1.3/tests/tokens_monadUserState_bytestring.x
--- old/alex-3.0.5/tests/tokens_monadUserState_bytestring.x 1970-01-01 01:00:00.000000000 +0100
+++ new/alex-3.1.3/tests/tokens_monadUserState_bytestring.x 2013-11-28 09:35:19.000000000 +0100
@@ -0,0 +1,63 @@
+{
+{-# LANGUAGE OverloadedStrings #-}
+module Main (main) where
+import System.Exit
+import qualified Data.ByteString.Lazy.Char8 as B
+}
+
+%wrapper "monadUserState-bytestring"
+
+$digit = 0-9 -- digits
+$alpha = [a-zA-Z] -- alphabetic characters
+
+tokens :-
+
+ $white+ ;
+ "--".* ;
+ let { tok (\p s -> Let p) }
+ in { tok (\p s -> In p) }
+ $digit+ { tok (\p s -> Int p (read (B.unpack s))) }
+ [\=\+\-\*\/\(\)] { tok (\p s -> Sym p (head (B.unpack s))) }
+ $alpha [$alpha $digit \_ \']* { tok (\p s -> Var p (B.unpack s)) }
+
+{
+-- Each right-hand side has type :: AlexPosn -> String -> Token
+
+-- Some action helpers:
+tok f (p,_,input) len = return (f p (B.take (fromIntegral len) input))
+
+-- The token type:
+data Token =
+ Let AlexPosn |
+ In AlexPosn |
+ Sym AlexPosn Char |
+ Var AlexPosn String |
+ Int AlexPosn Int |
+ Err AlexPosn |
+ EOF
+ deriving (Eq,Show)
+
+alexEOF = return EOF
+
+main = if test1 /= result1 then do print test1; exitFailure
+ else exitWith ExitSuccess
+
+type AlexUserState = ()
+alexInitUserState = ()
+
+scanner str = runAlex str $ do
+ let loop = do tok <- alexMonadScan
+ if tok == EOF
+ then return [tok]
+ else do toks <- loop
+ return (tok:toks)
+ loop
+
+test1 = case scanner " let in 012334\n=+*foo bar__'" of
+ Left err -> error err
+ Right toks -> toks
+
+result1 = [Let (AlexPn 2 1 3),In (AlexPn 6 1 7),Int (AlexPn 9 1 10) 12334,Sym (AlexPn 16 2 1) '=',Sym (AlexPn 17 2 2) '+',Sym (AlexPn 18 2 3) '*',Var (AlexPn 19 2 4) "foo",Var (AlexPn 23 2 8) "bar__'", EOF]
+
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/tokens_monad_bytestring.x new/alex-3.1.3/tests/tokens_monad_bytestring.x
--- old/alex-3.0.5/tests/tokens_monad_bytestring.x 1970-01-01 01:00:00.000000000 +0100
+++ new/alex-3.1.3/tests/tokens_monad_bytestring.x 2013-11-28 09:35:19.000000000 +0100
@@ -0,0 +1,60 @@
+{
+{-# LANGUAGE OverloadedStrings #-}
+module Main (main) where
+import System.Exit
+import qualified Data.ByteString.Lazy.Char8 as B
+}
+
+%wrapper "monad-bytestring"
+
+$digit = 0-9 -- digits
+$alpha = [a-zA-Z] -- alphabetic characters
+
+tokens :-
+
+ $white+ ;
+ "--".* ;
+ let { tok (\p s -> Let p) }
+ in { tok (\p s -> In p) }
+ $digit+ { tok (\p s -> Int p (read (B.unpack s))) }
+ [\=\+\-\*\/\(\)] { tok (\p s -> Sym p (head (B.unpack s))) }
+ $alpha [$alpha $digit \_ \']* { tok (\p s -> Var p (B.unpack s)) }
+
+{
+-- Each right-hand side has type :: AlexPosn -> String -> Token
+
+-- Some action helpers:
+tok f (p,_,input) len = return (f p (B.take (fromIntegral len) input))
+
+-- The token type:
+data Token =
+ Let AlexPosn |
+ In AlexPosn |
+ Sym AlexPosn Char |
+ Var AlexPosn String |
+ Int AlexPosn Int |
+ Err AlexPosn |
+ EOF
+ deriving (Eq,Show)
+
+alexEOF = return EOF
+
+main = if test1 /= result1 then do print test1; exitFailure
+ else exitWith ExitSuccess
+
+scanner str = runAlex str $ do
+ let loop = do tok <- alexMonadScan
+ if tok == EOF
+ then return [tok]
+ else do toks <- loop
+ return (tok:toks)
+ loop
+
+test1 = case scanner " let in 012334\n=+*foo bar__'" of
+ Left err -> error err
+ Right toks -> toks
+
+result1 = [Let (AlexPn 2 1 3),In (AlexPn 6 1 7),Int (AlexPn 9 1 10) 12334,Sym (AlexPn 16 2 1) '=',Sym (AlexPn 17 2 2) '+',Sym (AlexPn 18 2 3) '*',Var (AlexPn 19 2 4) "foo",Var (AlexPn 23 2 8) "bar__'", EOF]
+
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alex-3.0.5/tests/unicode.x new/alex-3.1.3/tests/unicode.x
--- old/alex-3.0.5/tests/unicode.x 2013-03-10 13:19:12.000000000 +0100
+++ new/alex-3.1.3/tests/unicode.x 2013-11-28 09:35:19.000000000 +0100
@@ -75,7 +75,7 @@
out1 = Right ["PING!",".","stopped."]
str2 = "\n"
-out2 = Left "lexical error"
+out2 = Left "lexical error at line 1, column 1"
str3 = "αω --"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package hscolour for openSUSE:Factory checked in at 2014-11-26 20:54:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hscolour (Old)
and /work/SRC/openSUSE:Factory/.hscolour.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hscolour"
Changes:
--------
--- /work/SRC/openSUSE:Factory/hscolour/hscolour.changes 2014-08-03 15:36:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hscolour.new/hscolour.changes 2014-11-26 20:54:30.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Sep 12 07:06:06 UTC 2014 - peter.trommler(a)ohm-hochschule.de
+
+- regenerate spec file
+- build statically linked HsColour
+* saves several rounds of rebuilding when bootstrapping an new ghc
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hscolour.spec ++++++
--- /var/tmp/diff_new_pack.aEVscB/_old 2014-11-26 20:54:32.000000000 +0100
+++ /var/tmp/diff_new_pack.aEVscB/_new 2014-11-26 20:54:32.000000000 +0100
@@ -18,14 +18,13 @@
%global pkg_name hscolour
-%global common_summary Colorise Haskell code
-
-%global common_description A small Haskell script to colorise Haskell code. It currently has six output formats: ANSI terminal codes (optionally XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01 with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX, and mIRC chat codes.
+# link statically to Haskell libs for easier ghc bootstrapping
+%global ghc_without_dynamic 1
Name: hscolour
Version: 1.20.3
Release: 0
-Summary: Haskell %{pkg_name}
+Summary: Colorise Haskell code
License: GPL-2.0
Group: Development/Languages/Other
@@ -40,14 +39,17 @@
# END cabal2spec
%description
-%{common_description}
+A small Haskell script to colorise Haskell code. It currently has
+six output formats: ANSI terminal codes (optionally XTerm-256colour codes),
+HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01 with CSS and mouseover
+annotations, XHTML 1.0 with inline CSS styling, LaTeX, and mIRC chat codes.
%package -n ghc-%{pkg_name}
Summary: Haskell %{pkg_name} library
Group: Development/Languages/Other
%description -n ghc-%{pkg_name}
-%{common_description}
+Haskell library to colorise Haskell code.
%package -n ghc-%{pkg_name}-devel
Summary: Haskell %{pkg_name} library development files
@@ -58,7 +60,7 @@
Requires: ghc-%{pkg_name} = %{version}-%{release}
%description -n ghc-%{pkg_name}-devel
-%{common_description}
+Development files for Haskell library tocolorise Haskell code.
%prep
%setup -q
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0