[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:46:21 UTC 2010


The following commit has been merged in the master branch:
commit c419df23a6f6c9eac808f3fe442517cc093ebb97
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sun Nov 14 03:23:12 2004 +0100

    Initial success
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.5--patch-26)

diff --git a/ChangeLog b/ChangeLog
index 1716fcb..22059dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.5
 #
 
+2004-11-13 20:23:12 GMT	John Goerzen <jgoerzen at complete.org>	patch-26
+
+    Summary:
+      Initial success
+    Revision:
+      missingh--head--0.5--patch-26
+
+
+    modified files:
+     ChangeLog debian/changelog debian/control debian/rules
+     libsrc/MissingH/Printf.hs
+
+
 2004-11-13 04:56:33 GMT	John Goerzen <jgoerzen at complete.org>	patch-25
 
     Summary:
diff --git a/debian/changelog b/debian/changelog
index 0276d20..2f16412 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+missingh (0.5.4) unstable; urgency=low
+
+  * Added build-dep-indep on libhugs-hunit and re-enabled Hugs unit tests.
+
+ -- John Goerzen <jgoerzen at complete.org>  Fri, 29 Oct 2004 08:39:28 -0500
+
 missingh (0.5.3) unstable; urgency=low
 
   * Don't run Hugs tests for now.  Closes: #278802.
diff --git a/debian/control b/debian/control
index b663b01..49f1002 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: missingh
 Priority: optional
 Maintainer: John Goerzen <jgoerzen at complete.org>
 Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.2.2), ghc6 (<< 6.2.3), haskell-devscripts (>= 0.5.1), libghc6-hunit-dev
-Build-Depends-Indep: debhelper (>= 4.0.0), haddock, hugs, haskell-devscripts (>= 0.5.1)
+Build-Depends-Indep: debhelper (>= 4.0.0), haddock, hugs, haskell-devscripts (>= 0.5.1), libhugs-hunit
 Standards-Version: 3.6.1
 Section: devel
 
diff --git a/debian/rules b/debian/rules
index 2af1124..0d1ebf4 100644
--- a/debian/rules
+++ b/debian/rules
@@ -73,7 +73,7 @@ builddocs-stamp:
 	dh_testdir
 
 	make doc
-	#make test-hugs
+	make test-hugs
 
 installdocs: builddocs
 	dh_testdir
diff --git a/libsrc/MissingH/Printf.hs b/libsrc/MissingH/Printf.hs
index 292e420..9bca0b3 100644
--- a/libsrc/MissingH/Printf.hs
+++ b/libsrc/MissingH/Printf.hs
@@ -31,7 +31,8 @@ This module provides various helpful utilities for using a C-style printf().
 Written by John Goerzen, jgoerzen\@complete.org
 -}
 
-module MissingH.Printf(
+module MissingH.Printf(sprintf,
+                       Value(..)
                        ) where
 
 import MissingH.Str
@@ -59,7 +60,7 @@ instance PFType String where
     fromValue (ValueString x) = x
     fromValue _ = error "fromValue string"
 
-
+{-
 instance PFFun String where
     toFun x (PFCall []) = x
     toFun _ _ = error "Too many arguments"
@@ -68,10 +69,29 @@ instance (PFType a, PFFun b) => PFFun (a -> b) where
     toFun f (PFCall (x:xs)) =
         toFun (f (fromValue x)) (PFCall xs)
     toFun _ _ = error "Too few arguments"
+-}
+
+{-
+instance PFFun String where
+    toFun [] (PFCall []) = []
+    toFun ('%' : xs) (PFCall (y:ys)) =
+        y : toFun 
+    toFun (x:xs) y =
+        x : toFun xs y
+    -}
+
+{- Sample attempt here -}
+sprintf :: String -> [Value] -> String
+
+sprintf [] [] = []
+sprintf ('%' : xs) (y : ys) = (fromValue y) ++ sprintf xs ys
+sprintf ('!' : xs) (y : ys) = show (((fromValue y)::Int) + 1) ++ sprintf xs ys
+sprintf (x:xs) y = x : sprintf xs y
+
 
 {- To try next: define a third pffun instance that itself works off the format string -}
 ----------------------------------------------------
-
+{-
 printf :: String -> PFFun
 printf "" = toFun ""
 printf ('%' : xs) = toFun (\x -> x ++ printf xs)
@@ -80,4 +100,4 @@ printf x =
          [y] -> toFun y
          [y : z] -> toFun (\a -> y ++ a ++ printf (join "%" z))
 
-               
\ No newline at end of file
+               -}
\ No newline at end of file

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list