[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:55:19 UTC 2010


The following commit has been merged in the master branch:
commit da2f2d046e930b3d7240bf6ff5ca31eb8d62f006
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Mar 15 03:31:41 2005 +0100

    added Maybe.hs
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-205)

diff --git a/ChangeLog b/ChangeLog
index f9a6e97..4c84f13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-03-14 20:31:41 GMT	John Goerzen <jgoerzen at complete.org>	patch-205
+
+    Summary:
+      added Maybe.hs
+    Revision:
+      missingh--head--0.7--patch-205
+
+
+    new files:
+     MissingH/Maybe.hs
+
+    modified files:
+     ChangeLog MissingH.cabal MissingH/Debian.hs
+
+
 2005-03-14 19:40:09 GMT	John Goerzen <jgoerzen at complete.org>	patch-204
 
     Summary:
diff --git a/MissingH.cabal b/MissingH.cabal
index 646d2d6..6a302c5 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -26,6 +26,7 @@ Exposed-Modules: MissingH.IO, MissingH.IO.Binary, MissingH.List,
   MissingH.Network.SocketServer,
   MissingH.Parsec,
   MissingH.Either,
+  MissingH.Maybe,
   MissingH.ConfigParser,
     MissingH.ConfigParser.Types,
     MissingH.ConfigParser.Parser,
diff --git a/MissingH/Debian.hs b/MissingH/Debian.hs
index 9ed8f81..b2c09e0 100644
--- a/MissingH/Debian.hs
+++ b/MissingH/Debian.hs
@@ -62,7 +62,7 @@ data DebVersion = DebVersion String
                 deriving (Eq)
 instance Ord DebVersion where
     compare v1 v2 = 
-        {- | This is OK since compareDebVersion should always be the same. -}
+        {- This is OK since compareDebVersion should always be the same. -}
         unsafePerformIO $ compareDebVersion v1 v2
 
 compareDebVersion :: DebVersion -> DebVersion -> IO Ordering
diff --git a/MissingH/Threads.hs b/MissingH/Maybe.hs
similarity index 56%
copy from MissingH/Threads.hs
copy to MissingH/Maybe.hs
index a863960..7e228b5 100644
--- a/MissingH/Threads.hs
+++ b/MissingH/Maybe.hs
@@ -1,4 +1,4 @@
-{- arch-tag: Thread utilities main file
+{- arch-tag: Maybe utilities
 Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
 
 This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -}
 
 {- |
-   Module     : MissingH.Threads
-   Copyright  : Copyright (C) 2004 John Goerzen
+   Module     : MissingH.Maybe
+   Copyright  : Copyright (C) 2005 John Goerzen
    License    : GNU GPL, version 2 or above
 
    Maintainer : John Goerzen, 
@@ -26,21 +26,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    Stability  : provisional
    Portability: portable
 
-This module provides various helpful utilities for dealing with threads.
+Utilities for working with the Either data type
 
-Written by John Goerzen, jgoerzen\@complete.org
+Copyright (c) 2004 John Goerzen, jgoerzen\@complete.org
 -}
-
-module MissingH.Threads(-- * I\/O utilities
-                        runInThread
-                       )
-where
-
-import Control.Concurrent
-
-{- | Takes a IO action and a function.  The IO action will be called in a 
-separate thread.  When it is completed, the specified function is called with
-its result.  This is a simple way of doing callbacks. -}
-
-runInThread :: IO a -> (a -> IO b) -> IO ThreadId
-runInThread action callback = forkIO $ action >>= callback >> return ()
+module MissingH.Maybe
+    (
+     forceMaybe
+) 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 Nothing = error "forceMaybe: Got Nothing"
+forceMaybe (Just x) = x

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list