[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:10:29 UTC 2010


The following commit has been merged in the master branch:
commit 1f9217b9069b1f9e72a735f8dcb3d655c8609396
Author: John Goerzen <jgoerzen at complete.org>
Date:   Wed Jun 28 14:42:33 2006 +0100

    Hack MD5 for MissingH

diff --git a/MissingH/Checksum/MD5.lhs b/MissingH/Checksum/MD5.lhs
index be2cfeb..d183853 100644
--- a/MissingH/Checksum/MD5.lhs
+++ b/MissingH/Checksum/MD5.lhs
@@ -1,3 +1,16 @@
+>{- |
+>   Module     : MissingH.Checksum.MD5
+>   Copyright  : Copyright (C) 2001 Ian Lynagh 
+>   License    : Either BSD or GPL
+>
+>   Maintainer : Ian Lynagh <igloo at earth.li>
+>   Stability  : provisional
+>   Portability: portable
+>
+>Generation of MD5sums
+>
+>Written by Ian Lynagh, igloo\@earth.li
+>-}
 
 > module MD5 (md5,  md5s,  md5i,
 >             MD5(..), ABCD(..), Zord64, Str(..), BoolList(..), WordList(..)) where
@@ -13,10 +26,10 @@ Also need a rotate left function that actually works.
 
 #ifdef __GLASGOW_HASKELL__
 #define rotL rotateL
-#include "Zord64_EASY.hs"
+>type Zord64 = Word64
 #else
 
-> import Zord64_HARD
+> import MissingH.Checksum.MD5.Zord64_HARD
  
 > rotL :: Word32 -> Rotation -> Word32
 > rotL a s = shiftL a s .|. shiftL a (s-32)
@@ -33,8 +46,7 @@ Also need a rotate left function that actually works.
 > newtype BoolList = BoolList [Bool]
 > newtype WordList = WordList ([Word32], Zord64)
 
-Anything we want to work out the MD5 of must be an instance of class MD5
-
+>-- | Anything we want to work out the MD5 of must be an instance of class MD5
 > class MD5 a where
 >  get_next :: a -> ([Word32], Int, a) -- get the next blocks worth
 >  --                     \      \   \------ the rest of the input
@@ -106,21 +118,18 @@ YA instance that is believed will be useful
 ======================== EXPORTED FUNCTIONS ========================
 
 
-The simplest function, gives you the MD5 of a string as 4-tuple of
-32bit words.
-
+>{- |The simplest function, gives you the MD5 of a string as 4-tuple of
+> 32bit words. -}
 > md5 :: (MD5 a) => a -> ABCD
 > md5 m = md5_main False 0 magic_numbers m
 
 
-Returns a hex number ala the md5sum program
-
+>{- | Returns a hex number ala the md5sum program. -}
 > md5s :: (MD5 a) => a -> String
 > md5s = abcd_to_string . md5
 
 
-Returns an integer equivalent to the above hex number
-
+>{- | Returns an integer equivalent to hex number from 'md5s'. -}
 > md5i :: (MD5 a) => a -> Integer
 > md5i = abcd_to_integer . md5
 
diff --git a/MissingH/Checksum/MD5/Zord64_EASY.hs b/MissingH/Checksum/MD5/Zord64_EASY.hs
deleted file mode 100644
index 1bb4a9a..0000000
--- a/MissingH/Checksum/MD5/Zord64_EASY.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-
- type Zord64 = Word64
-

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list