[Pkg-haskell-commits] r868 - in /packages/haskell-uulib/trunk: README configure.in debian/changelog src/DDataProps.hs src/UU/DData/MultiSet.hs src/UU/Parsing/Interface.hs src/UU/Parsing/Perms.hs uulib.cabal.in

arjan at users.alioth.debian.org arjan at users.alioth.debian.org
Sun Dec 30 19:07:32 UTC 2007


Author: arjan
Date: Sun Dec 30 19:07:32 2007
New Revision: 868

URL: http://svn.debian.org/wsvn/pkg-haskell/?sc=1&rev=868
Log:
* New upstream snapshot release:
    - Many functions, like delete and insertMany, were returning invalid
      multisets. Namely, multisets where zero-occurrences are explicitly
      modelled. This is incorrect, and they were fixed so that they return
      valid multisets.
    - There is also a fix to multiset unions which was handling
      overlapping elements incorrectly. The fix changes the strictness of
      this function however.

Added:
    packages/haskell-uulib/trunk/src/DDataProps.hs
      - copied unchanged from r867, packages/haskell-uulib/branches/upstream/current/src/DDataProps.hs
Modified:
    packages/haskell-uulib/trunk/README
    packages/haskell-uulib/trunk/configure.in
    packages/haskell-uulib/trunk/debian/changelog
    packages/haskell-uulib/trunk/src/UU/DData/MultiSet.hs
    packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs
    packages/haskell-uulib/trunk/src/UU/Parsing/Perms.hs
    packages/haskell-uulib/trunk/uulib.cabal.in

Modified: packages/haskell-uulib/trunk/README
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/README?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/README (original)
+++ packages/haskell-uulib/trunk/README Sun Dec 30 19:07:32 2007
@@ -1,3 +1,6 @@
+Please check the right section in this file for instructions depending on how you obtained the source files.
+
+
 Installing uulib from a source distribution
 -------------------------------------------
 
@@ -9,11 +12,25 @@
   System wide installation (assumming GHC is the
   Haskell compiler) can be done like this:
 
-    ./configure
     ghc --make Setup.hs -o setup -package Cabal
     ./setup configure
     ./setup build
     ./setup install
+
+
+Installing uulib to a non-standard location
+-------------------------------------------
+
+  This is useful if you don't want (or can't)
+  modify system wide settings.
+
+    ghc --make Setup.hs -o setup -package Cabal
+    ./setup configure --prefix=/foo
+    ./setup build
+    ./setup install --user
+
+  The last command registers the package only for
+  the user.
 
 
 Installing uulib from the subversion repository
@@ -27,6 +44,10 @@
 
     autoconf
     ./configure
+  
+  NOTE: the above instructions are REQUIRED when you install from the
+  subversion repository. They are not needed when you download a
+  source distribution.
 
   This generates uulib.cabal which is needed for the cabal commands:
 
@@ -40,22 +61,6 @@
   the steps outlined above.
 
 
-Installing uulib to a non-standard location
--------------------------------------------
-
-  This is useful if you don't want (or can't)
-  modify system wide settings.
-
-    ./configure
-    ghc --make Setup.hs -o setup -package Cabal
-    ./setup configure --prefix=/foo
-    ./setup build
-    ./setup install --user
-
-  The last command registers the package only for
-  the user.
-
-
 Optionally generating Haddock Documentation
 -------------------------------------------
 
@@ -64,19 +69,3 @@
 
     ./setup haddock
 
-
-
-Revision information (for bug reporting)
-----------------------------------------
-
-Path: trunk
-URL: https://svn.cs.uu.nl:12443/repos/uust-repo/uulib/trunk
-Repository Root: https://svn.cs.uu.nl:12443/repos/uust-repo
-Repository UUID: 30b93d28-2606-0410-b7f1-95e0edb40354
-Revision: 178
-Node Kind: directory
-Schedule: normal
-Last Changed Author: arthurvl
-Last Changed Rev: 154
-Last Changed Date: 2007-05-09 13:55:16 +0200 (Wed, 09 May 2007)
-

Modified: packages/haskell-uulib/trunk/configure.in
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/configure.in?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/configure.in (original)
+++ packages/haskell-uulib/trunk/configure.in Sun Dec 30 19:07:32 2007
@@ -29,26 +29,6 @@
 AC_PATH_PROG(LD,ld)
 AC_PATH_PROG(GREP,grep)
 AC_PATH_PROG(CHMOD,chmod)
-AC_PATH_PROG(GHC,ghc)
-
-# determine GHC version
-ghcVersion=`$GHC --numeric-version`
-AC_SUBST(GHC_VERSION, $ghcVersion)
-
-# after ghc 6.4.1 the names of cabal option(s) changed
-case $ghcVersion in
-  6.4.1)
-    optCabalInstances=AllowUndecidableInstances
-    srcDirsField=Hs-Source-Dir
-    ;;
-  *)
-    optCabalInstances=UndecidableInstances
-    srcDirsField=Hs-Source-Dirs
-    ;;
-esac
-
-AC_SUBST(EXTENSIONS,"$optCabalInstances")
-AC_SUBST(SRC_DIRS_FIELD,"$srcDirsField")
 
 # cheap relative_dir, see GH for proper use
 relative_dir=.

Modified: packages/haskell-uulib/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/debian/changelog?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/debian/changelog (original)
+++ packages/haskell-uulib/trunk/debian/changelog Sun Dec 30 19:07:32 2007
@@ -1,5 +1,13 @@
-haskell-uulib (0.9.3~snapshot20070528-2~pre2) unstable; urgency=low
+haskell-uulib (0.9.3~snapshot20071230-1~pre1) unstable; urgency=low
 
+  * New upstream snapshot release:
+      - Many functions, like delete and insertMany, were returning invalid
+        multisets. Namely, multisets where zero-occurrences are explicitly
+        modelled. This is incorrect, and they were fixed so that they return
+        valid multisets.
+      - There is also a fix to multiset unions which was handling
+        overlapping elements incorrectly. The fix changes the strictness of
+        this function however.
   * debian/control:
     - Bump build depency on haskell-devscripts to 0.6.0 which ships
       dh_haskell_depends and generates haddock API documentation.
@@ -21,7 +29,7 @@
     - Replace the call to debian/mk-haskell-depends with a call to
       dh_haskell_depends.
   
- -- Arjan Oosting <arjan at debian.org>  Sun, 30 Dec 2007 17:21:44 +0100
+ -- Arjan Oosting <arjan at debian.org>  Sun, 30 Dec 2007 20:07:08 +0100
 
 haskell-uulib (0.9.3~snapshot20070528-1) unstable; urgency=low
 

Modified: packages/haskell-uulib/trunk/src/UU/DData/MultiSet.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/src/UU/DData/MultiSet.hs?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/src/UU/DData/MultiSet.hs (original)
+++ packages/haskell-uulib/trunk/src/UU/DData/MultiSet.hs Sun Dec 30 19:07:32 2007
@@ -164,7 +164,7 @@
 -- | /O(1)/. Create a singleton multi set.
 single :: a -> MultiSet a
 single x 
-  = MultiSet (M.single x 0)
+  = MultiSet (M.single x 1)
     
 {--------------------------------------------------------------------
   Insertion, Deletion
@@ -177,6 +177,8 @@
 -- | /O(min(n,W))/. The expression (@insertMany x count mset@)
 -- inserts @count@ instances of @x@ in the multi set @mset at .
 insertMany ::  Ord a => a -> Int -> MultiSet a -> MultiSet a
+-- We still expect not to get count < 0
+insertMany x 0 multiset = multiset
 insertMany x count (MultiSet m)          
   = MultiSet (M.insertWith (+) x count m)
 
@@ -185,7 +187,7 @@
 delete x (MultiSet m)
   = MultiSet (M.updateWithKey f x m)
   where
-    f x n  | n > 0     = Just (n-1)
+    f x n  | n > 1     = Just (n-1)
            | otherwise = Nothing
 
 -- | /O(log n)/. Delete all occurrences of an element.
@@ -226,7 +228,14 @@
 -- | The union of a list of multisets.
 unions :: Ord a => [MultiSet a] -> MultiSet a
 unions multisets
-  = MultiSet (M.unions [m | MultiSet m <- multisets])
+  -- Original, wrong
+  -- = MultiSet (M.unions [m | MultiSet m <- multisets])
+  -- Map has no unionsWith
+  -- = MultiSet (M.unionsWith (+) [m | MultiSet m <- multisets])
+  -- Correct, but requires Data.List.foldl'
+  -- = MultiSet (foldl' (M.unionWith (+)) M.empty [m | MultiSet m <- multisets])
+  -- Correct, but not strict like the original (M.unions uses foldStrict)
+  = foldr union empty multisets
 
 {--------------------------------------------------------------------
   Filter and partition

Modified: packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs (original)
+++ packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs Sun Dec 30 19:07:32 2007
@@ -1,3 +1,4 @@
+{-# OPTIONS -fglasgow-exts  #-}
 module UU.Parsing.Interface 
        ( AnaParser, pWrap, pMap
        , module UU.Parsing.MachineInterface
@@ -34,6 +35,9 @@
   -- | Sequential composition. Often used in combination with <$>.
   -- The function returned by parsing the left-hand side is applied 
   -- to the value returned by parsing the right-hand side.
+  -- Note: Implementations of this combinator should lazily match on
+  -- and evaluate the right-hand side parser. The derived combinators 
+  -- for list parsing will explode if they do not.
   (<*>) :: p (a->b) -> p a -> p b
   -- | Value ignoring versions of sequential composition. These ignore
   -- either the value returned by the parser on the right-hand side or 

Modified: packages/haskell-uulib/trunk/src/UU/Parsing/Perms.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/src/UU/Parsing/Perms.hs?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/src/UU/Parsing/Perms.hs (original)
+++ packages/haskell-uulib/trunk/src/UU/Parsing/Perms.hs Sun Dec 30 19:07:32 2007
@@ -1,3 +1,4 @@
+{-# OPTIONS -fglasgow-exts  #-}
 module UU.Parsing.Perms(Perms(), pPerms, pPermsSep, succeedPerms, (~*~), (~$~)) where
 
 import UU.Parsing
@@ -53,4 +54,4 @@
                 let empty          = fromMaybe  pFail mbempty
                     pars (Br t p)  = flip ($) <$ fsep <*> p <*> p2p sep t
                 in foldr (<|>) empty (map pars nonempties)              
-        p2p_sep =  p2p sep                   
+        p2p_sep =  p2p sep                   

Modified: packages/haskell-uulib/trunk/uulib.cabal.in
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/uulib.cabal.in?rev=868&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/uulib.cabal.in (original)
+++ packages/haskell-uulib/trunk/uulib.cabal.in Sun Dec 30 19:07:32 2007
@@ -1,7 +1,7 @@
 name: uulib
 version: @VERSION@
 license: OtherLicense
-maintainer: Alexey Rodriguez <alexey at cs.uu.nl>
+maintainer: Arie Middelkoop <ariem at cs.uu.nl>
 Build-Depends: base, haskell98
 exposed-modules: UU.Parsing.CharParser UU.Parsing.Derived
                  UU.Parsing.Interface UU.Parsing.MachineInterface
@@ -17,5 +17,5 @@
                  UU.Pretty.Basic UU.Parsing.Machine    
                  UU.DData.IntMap  
                  UU.DData.IntSet        
-Extensions:  RankNTypes CPP @EXTENSIONS@
- at SRC_DIRS_FIELD@: src
+Extensions:  RankNTypes FunctionalDependencies TypeSynonymInstances UndecidableInstances FlexibleInstances MultiParamTypeClasses FlexibleContexts CPP
+Hs-Source-Dirs: src




More information about the Pkg-haskell-commits mailing list