[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 15:12:52 UTC 2010
The following commit has been merged in the master branch:
commit 0f0a3952567fa8e94355bf48b4a9461150a6a824
Author: John Goerzen <jgoerzen at complete.org>
Date: Sat Oct 21 02:36:33 2006 +0100
Checkpointing
diff --git a/MissingH.cabal b/MissingH.cabal
index edc08c5..ae8b6c2 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -21,6 +21,7 @@ Exposed-Modules: MissingH.Str, MissingH.IO, MissingH.IO.Binary, MissingH.List,
MissingH.Str.CSV,
MissingH.Cmd,
MissingH.ProgressTracker,
+ MissingH.Quantity,
MissingH.Map, MissingH.Path, MissingH.Path.NameManip,
MissingH.Path.FilePath, MissingH.Path.WildMatch, MissingH.Path.Glob,
MissingH.Time, MissingH.Time.ParseDate,
diff --git a/MissingH/ProgressTracker.hs b/MissingH/ProgressTracker.hs
index 9ee2754..8f60e73 100644
--- a/MissingH/ProgressTracker.hs
+++ b/MissingH/ProgressTracker.hs
@@ -27,7 +27,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Tools for tracking the status of a long operation.
-Written by John Goerzen, jgoerzen\@complete.org -}
+Written by John Goerzen, jgoerzen\@complete.org
+
+See also "MissingH.StatusBar" -}
module MissingH.ProgressTracker (
-- * Introduction
diff --git a/MissingH/Quantity.hs b/MissingH/Quantity.hs
index 736ad17..7e73588 100644
--- a/MissingH/Quantity.hs
+++ b/MissingH/Quantity.hs
@@ -49,12 +49,14 @@ data SizeOpts = SizeOpts { base :: Int, -- ^ The base from which calculations ar
{- | Predefined definitions for byte measurement in groups of 1024, from 0 to
2**80 -}
+binaryOpts :: SizeOpts
binaryOpts = SizeOpts {base = 2,
firstPower = 0,
suffixes = " KMGTPEZY",
powerIncr = 10}
{- | Predefined definitions for SI measurement, from 10**-24 to 10**24. -}
+siOpts :: SizeOpts
siOpts = SizeOpts {base = 10,
firstPower = -24,
suffixes = "yzafpnum kMGTPEZY",
diff --git a/MissingH/Maybe.hs b/MissingH/StatusBar.hs
similarity index 53%
copy from MissingH/Maybe.hs
copy to MissingH/StatusBar.hs
index 58dd737..1a1aa04 100644
--- a/MissingH/Maybe.hs
+++ b/MissingH/StatusBar.hs
@@ -1,5 +1,5 @@
-{- arch-tag: Maybe utilities
-Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+{-
+Copyright (C) 2006 John Goerzen <jgoerzen at complete.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,30 +17,31 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
{- |
- Module : MissingH.Maybe
- Copyright : Copyright (C) 2005 John Goerzen
+ Module : MissingH.StatusBar
+ Copyright : Copyright (C) 2006 John Goerzen
License : GNU GPL, version 2 or above
Maintainer : John Goerzen <jgoerzen at complete.org>
Stability : provisional
Portability: portable
-Utilities for working with the Either data type
+Tool for maintaining a status bar, supporting multiple simultaneous tasks,
+as a layer atop "MissingH.ProgressTracker".
-Copyright (c) 2004 John Goerzen, jgoerzen\@complete.org
--}
-module MissingH.Maybe
- (
- forceMaybe, forceMaybeMsg
-) where
-
-{- | Pulls a Just value out of a Maybe value. If the Maybe value is
-Nothing, raises an exception with error. -}
-forceMaybe :: Maybe a -> a
-forceMaybe = forceMaybeMsg "forceMaybe: Got Nothing"
-
-{- | Like 'forceMaybe', but lets you customize the error message raised if
-Nothing is supplied. -}
-forceMaybeMsg :: String -> Maybe a -> a
-forceMaybeMsg msg Nothing = error msg
-forceMaybeMsg _ (Just x) = x
+Written by John Goerzen, jgoerzen\@complete.org -}
+
+module MissingH.StatusBar (
+ )
+
+where
+import MissingH.ProgressTracker
+import Control.Concurrent.MVar
+
+data StatusBar =
+ StatusBar {masterP :: ProgressTracker,
+ components :: [ProgressTracker],
+ width :: Int,
+ renderer :: Integer -> String}
+
+newStatus :: ProgressTracker -> Int -> (Integer -> String) -> IO StatusBar
+newStatus =
\ No newline at end of file
diff --git a/TODO b/TODO
index 0bfc883..3ad668f 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-arch-tag: TODO file
+Document MissingH/Quantity and see if it has tests yet
Test forceEitherMsg
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list