[Pkg-haskell-commits] r999 - in /packages/haskell-uulib/branches/upstream/0.9.5: Makefile.in VERSION configure.in src/DDataProps.hs src/UU/Parsing/Examples.hs uulib.cabal.in

arjan at users.alioth.debian.org arjan at users.alioth.debian.org
Sat Jan 19 22:17:53 UTC 2008


Author: arjan
Date: Sat Jan 19 22:17:53 2008
New Revision: 999

URL: http://svn.debian.org/wsvn/pkg-haskell/?sc=1&rev=999
Log: (empty)

Added:
    packages/haskell-uulib/branches/upstream/0.9.5/Makefile.in
    packages/haskell-uulib/branches/upstream/0.9.5/VERSION
    packages/haskell-uulib/branches/upstream/0.9.5/configure.in
    packages/haskell-uulib/branches/upstream/0.9.5/src/DDataProps.hs
    packages/haskell-uulib/branches/upstream/0.9.5/src/UU/Parsing/Examples.hs
    packages/haskell-uulib/branches/upstream/0.9.5/uulib.cabal.in

Added: packages/haskell-uulib/branches/upstream/0.9.5/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/Makefile.in?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/Makefile.in (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/Makefile.in Sat Jan 19 22:17:53 2008
@@ -1,0 +1,77 @@
+# Simple makefile to build UUAG.
+# Nothing fancy, just as simple as possible to get things done quickly.
+#   --Alexey
+
+help:
+	@echo Build system for the UU libraries
+	@echo Targets:
+	@echo
+	@echo dist - Create source distributions
+
+MV        = @MV@
+RM        = @RM@
+RM_F      = $(RM) -f
+CP        = @CP@
+FIND      = @FIND@
+MKDIR     = @MKDIR@
+VERSION   = @VERSION@
+
+
+# Directories
+SRC_DIR = src
+NAME = uulib
+
+
+#
+# distribution (for the time being source only and unix)
+#
+
+DISTTYPE=src
+
+ifeq ($(DISTTYPE),win32)
+        TARCZVF    := zip -r
+        TAREXT     := .zip
+else
+        TARCZVF    := tar cvzf
+        TAREXT     := .tar.gz
+endif
+
+# the name is hard-coded
+
+TODAY  := $(shell date '+%Y-%m-%d')
+DLABEL := $(NAME)-$(TODAY)
+VLABEL := $(NAME)-$(VERSION)
+DTLABEL:= $(NAME)-$(TODAY)-$(DISTTYPE)
+VTLABEL:= $(NAME)-$(VERSION)-$(DISTTYPE)
+
+dist_makedirs:
+	$(RM_F) -r $(DLABEL)
+	$(RM_F) -r $(VLABEL)
+	$(MKDIR) -p $(DLABEL)
+	for dir in `$(FIND) $(SRC_DIR) -type d -not -path '*/.svn*'`; do $(MKDIR) -p $(DLABEL)/$${dir}; done
+
+dist_copy: dist_makedirs $(SRC_HS_SEM) $(SRC_HS_SYN)
+	$(CP) -p LICENSE-LGPL \
+		 COPYRIGHT \
+		 VERSION \
+		 README \
+		 Makefile.in \
+		 configure \
+		 configure.in \
+		 uulib.cabal \
+		 uulib.cabal.in \
+		 Setup.hs \
+		 $(DLABEL)
+# populate sources
+	for file in `$(FIND) $(SRC_DIR) -name '*.hs' -type f -not -path '*/.svn*'`; do $(CP) -p $${file} $(DLABEL)/$${file}; done
+
+dist_pack: dist_copy
+	$(TARCZVF) $(DTLABEL)$(TAREXT) $(DLABEL)
+	$(MV) $(DLABEL) $(VLABEL)
+	$(TARCZVF) $(VTLABEL)$(TAREXT) $(VLABEL)
+
+dist: dist_info dist_pack
+
+dist_info:
+	@echo "* Generating distributions..."
+

Added: packages/haskell-uulib/branches/upstream/0.9.5/VERSION
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/VERSION?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/VERSION (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/VERSION Sat Jan 19 22:17:53 2008
@@ -1,0 +1,1 @@
+0.9.3

Added: packages/haskell-uulib/branches/upstream/0.9.5/configure.in
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/configure.in?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/configure.in (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/configure.in Sat Jan 19 22:17:53 2008
@@ -1,0 +1,47 @@
+dnl
+dnl UULIB configure script
+dnl
+dnl Parts borrowed from Generic Haskell's configure script
+
+AC_INIT(VERSION)
+
+# Safety check: Ensure that we are in the correct source directory.
+AC_CONFIG_SRCDIR([uulib.cabal.in])
+
+AC_PATH_PROG(CUT,cut)
+
+if test "$CUT" = ""; then
+  AC_MSG_ERROR([Cannot continue without cut.])
+fi
+
+# other programs
+AC_PATH_PROG(MV,mv)
+AC_PATH_PROG(CP,cp)
+AC_PATH_PROG(RM,rm)
+AC_PATH_PROG(MKDIR,mkdir)
+AC_PATH_PROG(TOUCH,touch)
+AC_PATH_PROG(DIFF,diff)
+AC_PATH_PROG(FIND,find)
+AC_PATH_PROG(SORT,sort)
+AC_PATH_PROG(UNIQ,uniq)
+AC_PATH_PROG(AR,ar)
+AC_PATH_PROG(RANLIB,ranlib)
+AC_PATH_PROG(LD,ld)
+AC_PATH_PROG(GREP,grep)
+AC_PATH_PROG(CHMOD,chmod)
+
+# cheap relative_dir, see GH for proper use
+relative_dir=.
+
+# checking for VERSION file
+if test -r "${relative_dir}/VERSION"; then
+   FULLVERSION=`cat ${relative_dir}/VERSION`
+   VERSION=`echo ${FULLVERSION} | ${CUT} -f1 -d' '`;
+else
+   AC_MSG_ERROR([Cannot find VERSION file.]);
+fi
+AC_SUBST(FULLVERSION)
+AC_SUBST(VERSION)
+
+
+AC_OUTPUT(Makefile uulib.cabal)

Added: packages/haskell-uulib/branches/upstream/0.9.5/src/DDataProps.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/src/DDataProps.hs?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/src/DDataProps.hs (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/src/DDataProps.hs Sat Jan 19 22:17:53 2008
@@ -1,0 +1,51 @@
+
+import UU.DData.MultiSet
+
+import Test.QuickCheck
+
+type MInt = MultiSet Int
+
+-- Can a singleton multiset constructed from a singleton list?
+propSingle :: Int -> Bool
+propSingle x = single x == fromList [x]
+
+-- Singleton multisets have one occurrence of an element.
+propSingle2 :: Int -> Bool
+propSingle2 x = occur x (single x) == 1
+
+-- An element occurring once has occurrence zero if deleted.
+propDelete :: Int -> Bool
+propDelete x = (occur x $ delete x $ fromList [x]) == 0
+
+-- An element with 0 occurrences does not show in the occurrences list.
+propDelete2 :: Int -> Bool
+propDelete2 x = (toOccurList $ delete x $ fromList [x]) == []
+
+-- Insertion of 0-occurring elements
+propInsert :: Int -> Bool
+propInsert x = (occur x $ insertMany x 0 empty) == 0
+
+-- Deletiong of an element with one occurrence yields a valid multiset.
+propValid :: Int -> Bool
+propValid x = valid $ delete x $ fromList [x]
+
+-- Union of non-disjoint multisets adds the occurrences of overlapping elements.
+propUnion :: Bool
+propUnion =  (toOccurList $ unions [fromList "abbc", fromList "aabdd"]) == [('a',3),('b',3),('c',1),('d',2)]
+
+-- This property fails if for example the result of delete has the following occurrence list [('a',0)]
+-- while equality assumes that zero-occurring elements do not appear in that list.
+propEq :: Bool
+propEq = delete 'a' (fromList "a") == empty
+
+-- A bit silly, most properties do not really need quickcheck
+testMM = do
+       quickCheck propSingle
+       quickCheck propSingle2
+       quickCheck propDelete
+       quickCheck propDelete2
+       quickCheck propInsert
+       quickCheck propValid
+       quickCheck propUnion
+       quickCheck propEq
+

Added: packages/haskell-uulib/branches/upstream/0.9.5/src/UU/Parsing/Examples.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/src/UU/Parsing/Examples.hs?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/src/UU/Parsing/Examples.hs (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/src/UU/Parsing/Examples.hs Sat Jan 19 22:17:53 2008
@@ -1,0 +1,28 @@
+module Examples where
+
+import UU.Parsing
+import UU.Parsing.CharParser
+
+a = pSym 'a'
+b = pSym 'b'
+c = pSym 'c'
+
+test p inp = do result <- parseIO p inp
+                putStrLn (show result)
+
+ta = test a "a"
+tb = test b "a"
+tc = test c "abc"
+
+t3 = test (pToks "xyz" ) "xy"
+t4 = test (pToks "xyz" ) "xz"
+
+pChar = 'a' <..> 'z'
+pIdent = pList pChar
+
+if_as_ident   = ((("This is the identifier: ") ++) <$> pIdent)
+if_as_keyword = ((("This is the keyword: ")    ++) <$> pToks "if")
+t5 = test if_as_ident   "if"
+t6 = test if_as_keyword "if"
+
+t7 = test (if_as_ident <* pCost 2 <|> if_as_keyword <* pCost 2) "if"

Added: packages/haskell-uulib/branches/upstream/0.9.5/uulib.cabal.in
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/branches/upstream/0.9.5/uulib.cabal.in?rev=999&op=file
==============================================================================
--- packages/haskell-uulib/branches/upstream/0.9.5/uulib.cabal.in (added)
+++ packages/haskell-uulib/branches/upstream/0.9.5/uulib.cabal.in Sat Jan 19 22:17:53 2008
@@ -1,0 +1,21 @@
+name: uulib
+version: @VERSION@
+license: OtherLicense
+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
+                 UU.Parsing.Merge UU.Parsing.Offside UU.Parsing.Perms
+                 UU.Parsing.StateParser UU.Parsing UU.DData.IntBag 
+                 UU.DData.Map UU.DData.MultiSet UU.DData.Queue
+                 UU.DData.Scc UU.DData.Seq UU.DData.Set UU.PPrint
+                 UU.Pretty.Ext UU.Pretty UU.Scanner.GenToken UU.Scanner.GenTokenOrd
+                 UU.Scanner.GenTokenParser UU.Scanner.GenTokenSymbol
+                 UU.Scanner.Position UU.Scanner.Scanner
+                 UU.Scanner.Token UU.Scanner.TokenParser UU.Scanner.TokenShow
+                 UU.Scanner UU.Util.BinaryTrees UU.Util.PermTree UU.Util.Utils
+                 UU.Pretty.Basic UU.Parsing.Machine    
+                 UU.DData.IntMap  
+                 UU.DData.IntSet        
+Extensions:  RankNTypes FunctionalDependencies TypeSynonymInstances UndecidableInstances FlexibleInstances MultiParamTypeClasses FlexibleContexts CPP
+Hs-Source-Dirs: src




More information about the Pkg-haskell-commits mailing list