[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:47:04 UTC 2010


The following commit has been merged in the master branch:
commit e72a2960a3183db03a710377894968eb894f49fc
Author: John Goerzen <jgoerzen at complete.org>
Date:   Mon Nov 15 21:35:32 2004 +0100

    Eliminated lhs files; added showValue to Types.hs
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.5--patch-57)

diff --git a/ChangeLog b/ChangeLog
index 8d03846..89a1d57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,23 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.5
 #
 
+2004-11-15 14:35:32 GMT	John Goerzen <jgoerzen at complete.org>	patch-57
+
+    Summary:
+      Eliminated lhs files; added showValue to Types.hs
+    Revision:
+      missingh--head--0.5--patch-57
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/Printf/Printer.hs
+     libsrc/MissingH/Printf/Types.hs
+
+    renamed files:
+     libsrc/MissingH/Printf/Printer.lhs
+       ==> libsrc/MissingH/Printf/Printer.hs
+
+
 2004-11-15 05:26:21 GMT	John Goerzen <jgoerzen at complete.org>	patch-56
 
     Summary:
diff --git a/libsrc/MissingH/Printf/Printer.lhs b/libsrc/MissingH/Printf/Printer.hs
similarity index 98%
rename from libsrc/MissingH/Printf/Printer.lhs
rename to libsrc/MissingH/Printf/Printer.hs
index 9a30180..2e1ec8c 100644
--- a/libsrc/MissingH/Printf/Printer.lhs
+++ b/libsrc/MissingH/Printf/Printer.hs
@@ -1,6 +1,5 @@
-arch-tag: Printf printer declarations
+-- arch-tag: Printf printer declarations
 
-\begin{code}
 module MissingH.Printf.Printer (get_conversion_func, thousandify, octalify, hexify, fix_width
 ) where
 
@@ -168,7 +167,7 @@ print_string argv _ _ mp
 
 -- Corresponds to %H (Haskell extension)
 show_arg :: ConversionFunc
-show_arg argv flags mw mp = (print_string (toValue (show argv))) flags mw mp
+show_arg argv flags mw mp = (print_string (toValue (showValue argv))) flags mw mp
 
 lower_hex, upper_hex :: Bool
 lower_hex = False
@@ -197,14 +196,12 @@ thousandify :: String -> String
 thousandify = reverse . t . reverse
     where t (x1:x2:x3:xs@(_:_)) = x1:x2:x3:',':t xs
           t xs = xs
-\end{code}
 
 
 ----------------------------------------------------------------------
 -- FROM Ian Lynagh's Parser.lhs
 ----------------------------------------------------------------------
 
-\begin{code}
 
 fix_width :: [Flag] -> Maybe Width -> String -> String
 fix_width _ Nothing e = e
@@ -220,4 +217,4 @@ fix_width flags (Just w) e = exp_spaced
                        else if w < 0 then exp_left_padded
                                       else exp_right_padded
 
-\end{code}
+
diff --git a/libsrc/MissingH/Printf/Types.hs b/libsrc/MissingH/Printf/Types.hs
index db4748c..8ae1a67 100644
--- a/libsrc/MissingH/Printf/Types.hs
+++ b/libsrc/MissingH/Printf/Types.hs
@@ -13,6 +13,11 @@ data Value =
            | ValueChar Char
              deriving (Eq, Show)
 
+showValue :: Value -> String
+showValue (ValueRational x) = show x
+showValue (ValueChar x) = [x]
+showValue (ValueString x) = x
+
 class PFType a where
     toValue :: a -> Value
     fromValue :: Value -> a

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list