Description: Upstream changes introduced in version 3.0.1-1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 alex (3.0.1-1) unstable; urgency=low
 .
   * New upstream release.  closes: #638988.
   * Update fix-bang-pattern.diff.
   * Add build dependency on libghc-quickcheck2-dev.
 .
 The person named in the Author field signed this changelog entry.
Author: Clint Adams <clint@debian.org>
Bug-Debian: http://bugs.debian.org/638988

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- /dev/null
+++ alex-3.0.1/newd/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+# debian/rules for alex
+# This file is public domain software, originally written by Joey Hess. 
+# Adapted for alex by Ian Lynagh.
+# Largely rewritten for cdbs and hlibrary.mk by Joachim Breitner in 2009.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DEB_BUILD_DEPENDENCIES = build-arch
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/hlibrary.mk
+
+clean::
+	[ ! -f doc/config.mk ] || $(MAKE) -C doc clean
+	# Remove these so setup clean doesn't remove the generated files
+	#rm -f src/Parser.y src/Scan.x
+	
+	rm -f debian/get_version.o debian/get_version.hi debian/get_version
+	rm -f doc/alex.1
+	# Hacks:
+	rm -f doc/config.log doc/config.status doc/config.mk doc/configure
+
+
+configure/alex::
+	# doc/configure is not shipped, generate it
+	cd doc && autoconf && rm -r autom4te.cache &&  ./configure --prefix=/usr
+
+	# used in build to stick version into man page
+	ghc --make debian/get_version.hs -o debian/get_version
+
+build/alex:: build-ghc-stamp
+	$(MAKE) -C doc html
+	sed -e "s#@LIBDIR@#/usr/lib/alex-`debian/get_version`#g" \
+	    -e "s#@DOCDIR@#/usr/share/doc/alex#g" \
+	    -e "s#@VERSION@#`debian/get_version`#g" \
+	  doc/alex.1.in > doc/alex.1
+
+install/alex:: debian/tmp-inst-ghc
+	dh_installdirs usr/share/doc/alex/html
+	cp -a doc/alex/* `pwd`/debian/`dh_listpackages`/usr/share/doc/alex/html
+
--- /dev/null
+++ alex-3.0.1/newd/watch
@@ -0,0 +1,5 @@
+version=3
+opts="downloadurlmangle=s|archive/([\w\d_-]+)/([\d\.]+)/|archive/$1/$2/$1-$2.tar.gz|,\
+filenamemangle=s|(.*)/$|alex-$1.tar.gz|" \
+    http://hackage.haskell.org/packages/archive/alex \
+    ([\d\.]*\d)/
--- /dev/null
+++ alex-3.0.1/newd/copyright
@@ -0,0 +1,40 @@
+This package was originally debianized by Ian Lynagh <igloo@debian.org>
+on 2003-09-08.
+
+It was downloaded from
+http://haskell.org/alex/alex-2.1.0rc.tar.gz
+
+Upstream Author: Simon Marlow (simonmar@microsoft.com)
+		
+Copyright:
+
+Copyright (c) 1995-2003, Chris Dornan and Simon Marlow
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of the copyright holders, nor the names of the
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+++ alex-3.0.1/newd/get_version.hs
@@ -0,0 +1,16 @@
+
+module Main (main) where
+
+import Data.Version ( showVersion )
+import Distribution.Package
+import Distribution.PackageDescription
+import Distribution.PackageDescription.Parse ( readPackageDescription )
+import Distribution.Simple.Utils
+import Distribution.Verbosity
+import Distribution.Version
+
+main :: IO ()
+main = do fp <- findPackageDesc "."
+          pd <- readPackageDescription normal fp
+          putStr $ showVersion $ pkgVersion $ package $ packageDescription pd
+
--- /dev/null
+++ alex-3.0.1/newd/alex.install
@@ -0,0 +1,2 @@
+dist-ghc/build/alex/alex usr/bin
+debian/tmp-inst-ghc/usr/share/alex* usr/share
--- /dev/null
+++ alex-3.0.1/newd/alex.manpages
@@ -0,0 +1 @@
+doc/alex.1
--- /dev/null
+++ alex-3.0.1/newd/compat
@@ -0,0 +1 @@
+7
--- /dev/null
+++ alex-3.0.1/newd/changelog
@@ -0,0 +1,184 @@
+alex (3.0.1-0exp1) experimental; urgency=low
+
+  * New upstream release.
+  * Update fix-bang-pattern.diff.
+  * Add build dependency on libghc-quickcheck2-dev.
+
+ -- Clint Adams <clint@debian.org>  Tue, 23 Aug 2011 11:21:06 -0400
+
+alex (2.3.5-3) unstable; urgency=low
+
+  * Update fix-bang-pattern.diff patch to add LANGUAGE option BanPatterns to
+    generated code (Closes: #635113).
+  * debian/control: Standards version (no changes required).
+
+ -- Erik de Castro Lopo <erikd@mega-nerd.com>  Sun, 24 Jul 2011 14:15:36 +1000
+
+alex (2.3.5-2) unstable; urgency=low
+
+  [ Erik de Castro Lopo ]
+  * Fix generated haskell code so it doesn't fail with -Werror
+    (Closes: #623067).
+
+  [ Giovanni Mascellani ]
+  * Team upload.
+
+ -- Giovanni Mascellani <gio@debian.org>  Sun, 17 Apr 2011 10:56:54 +0200
+
+alex (2.3.5-1) unstable; urgency=low
+
+  [ Erik de Castro Lopo ]
+  * New upstream.
+  * Remove patches/00-fix-warnings-on-big-endian.diff (fixed upstream).
+
+  [ Marco Silva ]
+  * Use ghc instead of ghc6
+
+  [ Joachim Breitner ]
+  * New upstream release
+
+ -- Joachim Breitner <nomeata@debian.org>  Tue, 29 Mar 2011 13:43:36 +0530
+
+alex (2.3.3-2) experimental; urgency=low
+
+  * Fix warnings in alex generated code on big endian systems (Closes: #594181).
+  * debian/control: Bump Standards-Version: to 3.9.1, no changes needed.
+
+ -- Erik de Castro Lopo <erikd@mega-nerd.com>  Sat, 30 Oct 2010 21:16:14 +1100
+
+alex (2.3.3-1) unstable; urgency=low
+
+  [ Erik de Castro Lopo ]
+  * New upstream version.
+
+  [ Joachim Breitner ]
+  * Source format 3.0 (quilt)
+
+ -- Erik de Castro Lopo <erikd@mega-nerd.com>  Wed, 31 Mar 2010 21:10:35 +1100
+
+alex (2.3.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Erik de Castro Lopo <erikd@mega-nerd.com>  Fri, 12 Mar 2010 20:25:20 +1100
+
+alex (2.3.1-3) unstable; urgency=low
+
+  * debian/control: Change Priority: to extra.
+  * debian/watch: Use format that works for --download-current-version.
+  * debian/watch: Add .tar.gz to downloaded filename.
+  * debian/watch: Include package name in downloaded .tar.gz.
+  * debian/watch: Remove spaces, since they're not allowed by uscan.
+  * debian/control: Use Vcs-Browser: field.
+  * debian/control: Bump Standards-Version: to 3.8.4, no changes needed.
+  * debian/control: Bump version of Build-Depends: on haskell-devscripts
+    to 0.7 and remove versioned Build-Depends: on ghc6.
+
+ -- Marco Túlio Gontijo e Silva <marcot@debian.org>  Sun, 21 Feb 2010 09:30:03 -0300
+
+alex (2.3.1-2) unstable; urgency=low
+
+  * debian/control: Add forgotten build-deps on autoconf, alex and happy to
+    resolve FTBFS (Closes: #551233)
+
+ -- Iain Lane <laney@ubuntu.com>  Fri, 16 Oct 2009 20:45:30 +0100
+
+alex (2.3.1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #530313)
+  * Let watchfile point to hackage
+  * Adopt for the Debian Haskell Group and adjust packaging.
+
+ -- Joachim Breitner <nomeata@debian.org>  Mon, 05 Oct 2009 17:22:19 +0200
+
+alex (2.2-0.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: Not in scope: `buildVerbose'", thanks to Matt Kraai for the
+    patch (Closes: #516277)
+
+ -- Joachim Breitner <nomeata@debian.org>  Wed, 18 Mar 2009 19:01:37 +0100
+
+alex (2.2-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream release (Closes: #464360)
+    - Cabal 1.2 is now required. (Closes: #460388)
+    - ByteString wrappers: use Alex to lex ByteStrings directly.
+    - Fixes a spelling mistake. (Closes: #419671)
+  * debian/control:
+    - Added Homepage field.
+    - Bump the build dependency on ghc6 to 6.8.2 as the packages needs
+      Cabal 1.2 to build.
+    - Bump the Standards-Version to 3.7.3. No changes needed.
+  * debian/copyright:
+    - Fix debian-copyright-file-uses-obsolete-national-encoding lintian
+      warning.
+    - Update debian/copyright file with info from upstream LICENSE file.
+  * debian/get_version.hs: Updated for Cabal 1.2
+  * debian/rules:
+    - Fix debian-rules-ignores-make-clean-error lintian warning.
+    - Remove the LICENSE installed by ./setup copy
+  * Add debian/watch file.
+
+ -- Arjan Oosting <arjan@debian.org>  Sun, 27 Apr 2008 15:31:08 +0200
+
+alex (2.1.0~rc1-1) unstable; urgency=low
+
+  * New upstream (release candidate) version.
+  * Removed alex/ prefixes from various paths in debian/rules.
+  * doc/configure generated by autoconf is in the Debian diff.
+  * Build using cabal:
+    * Various debian/rules changes.
+    * Create debian/get_version.hs for extracting the version from the cabal
+      file.
+    * Requires ghc6 >= 6.4.2.
+    * No longer tries to detect platform. Closes: #332980, #340326.
+  * Add 'XSLTPROC_OPTS = --nonet' to doc/config.mk.in.
+  * Remove src/Parser.y and src/Scan.x before cleaning so the generated
+    files don't get cleaned.
+  * Set Standards-Version to 3.7.2 (no changes needed).
+
+ -- Ian Lynagh (wibble) <igloo@debian.org>  Thu, 26 Oct 2006 17:28:46 +0000
+
+alex (2.0.1-1) unstable; urgency=low
+
+  * New upstream version.
+  * Compiled against new libgmp3-dev.
+  * Add build-deps on xsltproc, docbook-xml and docbook-xsl.
+  * Remove ps from "$(MAKE) -C alex/doc ps html" in debian/rules as
+    the ps docs don't build.
+  * Only copy the HTML docs into the install directory as the other
+    aren't built.
+  * index.html is now built for us, so we don't need to symlink
+    alex.html to it.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org>  Sun, 18 Sep 2005 20:11:47 +0000
+
+alex (2.0-3) unstable; urgency=low
+
+  * Added x86_64 Linux to configure{,.in}. Closes: #253167.
+  * Remove unportable {,} syntax from debian/rules.
+  * Delete alex/doc/alex.out in clean target.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org>  Thu, 15 Jul 2004 21:25:08 +0000
+
+alex (2.0-2) unstable; urgency=low
+
+  * Added s390, m68k, mips, hppa, arm and powerpc Linux to configure{,.in}
+
+ -- Ian Lynagh (wibble) <igloo@debian.org>  Wed, 01 Oct 2003 12:31:01 +0000
+
+alex (2.0-1) unstable; urgency=low
+
+  * Initial release. Closes: #151044.
+  * Changed configure{,.in} to not require flex.
+  * Wrote manpage for alex(1).
+  * Fix references to happy/parsers and version/verbose confusion in the docs.
+  * Changed wrapper to use $@ and ${1+"$@"} rather than $*
+  * When giving usage info, always use the name "alex" (otherwise
+    alex.bin is given).
+  * Add sparc case to configure{,.in}.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org>  Tue, 09 Sep 2003 15:14:27 +0000
+
--- /dev/null
+++ alex-3.0.1/newd/alex.examples
@@ -0,0 +1 @@
+examples/*
--- /dev/null
+++ alex-3.0.1/newd/control
@@ -0,0 +1,31 @@
+Source: alex
+Section: haskell
+Priority: extra
+Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
+Uploaders: Joachim Breitner <nomeata@debian.org>, Clint Adams <clint@debian.org>
+Standards-Version: 3.9.2
+Build-Depends: cdbs (>= 0.4.59),
+               haskell-devscripts (>= 0.7),
+               debhelper (>= 7),
+               ghc,
+               alex,
+               happy,
+               jade,
+               docbook-utils,
+               docbook-xsl,
+               docbook-xml,
+               xsltproc,
+               autoconf,
+               libghc-quickcheck2-dev
+Homepage: http://www.haskell.org/alex/
+Vcs-Darcs: http://darcs.debian.org/pkg-haskell/alex
+Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/alex
+
+Package: alex
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: lexical analyser generator for Haskell
+ Alex is a tool for generating lexical analysers in Haskell, given a
+ description of the tokens to be recognised in the form of regular
+ expressions. It is similar to the tool lex or flex for C/C++.
+
--- /dev/null
+++ alex-3.0.1/newd/patches/series
@@ -0,0 +1 @@
+fix-bang-pattern.diff
--- /dev/null
+++ alex-3.0.1/newd/patches/fix-bang-pattern.diff
@@ -0,0 +1,53 @@
+# Author : Erik de Castro Lopo <erikd@mega-nerd.com>
+# Description : Fix generated haskell code so it doesn't fail with -Werror.
+# Debian Version : 2.3.5
+# Date : Sun, 17 Apr 2011 15:45:41 +1000
+
+--- a/templates/GenericTemplate.hs
++++ b/templates/GenericTemplate.hs
+@@ -9,7 +9,7 @@
+ 
+ #ifdef ALEX_GHC
+ #define ILIT(n) n#
+-#define FAST_INT_BINDING(n) (n)
++#define FAST_INT_BINDING(n) (!(n))
+ #define IBOX(n) (I# (n))
+ #define FAST_INT Int#
+ #define LT(n,m) (n <# m)
+@@ -57,10 +57,10 @@
+ ALEX_IF_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#
+ ALEX_ELSE
+   indexInt16OffAddr# arr off
+ ALEX_ENDIF
+--- a/src/Scan.x
++++ b/src/Scan.x
+@@ -11,7 +11,7 @@
+ -------------------------------------------------------------------------------
+ 
+ {
+-{-# OPTIONS_GHC -w #-}
++{-# OPTIONS_GHC -w -XBangPatterns #-}
+ 
+ module Scan(lexer, AlexPosn(..), Token(..), Tkn(..), tokPosn) where
+ 
+--- a/src/Main.hs
++++ b/src/Main.hs
+@@ -203,7 +203,7 @@
+   hPutStrLn hdl code
+ 
+ optsToInject :: Target -> [CLIFlags] -> String
+-optsToInject GhcTarget _ = "{-# LANGUAGE CPP,MagicHash #-}\n"
++optsToInject GhcTarget _ = "{-# LANGUAGE CPP,MagicHash,BangPatterns #-}\n"
+ optsToInject _         _ = "{-# LANGUAGE CPP #-}\n"
+ 
+ importsToInject :: Target -> [CLIFlags] -> String
--- /dev/null
+++ alex-3.0.1/newd/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
