[commit: nofib] master: Fix up debrecated lib usage in nofib. (1759b24)
David Terei
davidterei at gmail.com
Thu Mar 29 11:31:25 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/nofib
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1759b24b8878dbcbb3eec62e4079b68fa30753eb
>---------------------------------------------------------------
commit 1759b24b8878dbcbb3eec62e4079b68fa30753eb
Author: David Terei <davidterei at gmail.com>
Date: Thu Mar 29 01:45:17 2012 -0700
Fix up debrecated lib usage in nofib.
>---------------------------------------------------------------
fibon/Hackage/Crypto/Data/Digest/SHA1.hs | 2 +-
fibon/Hackage/Crypto/Data/LargeWord.hs | 12 ++++++------
fibon/Hackage/Gf/Makefile | 2 +-
.../Gf/src/compiler/GF/Compile/ReadFiles.hs | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fibon/Hackage/Crypto/Data/Digest/SHA1.hs b/fibon/Hackage/Crypto/Data/Digest/SHA1.hs
index ffebfe9..60cc1bd 100644
--- a/fibon/Hackage/Crypto/Data/Digest/SHA1.hs
+++ b/fibon/Hackage/Crypto/Data/Digest/SHA1.hs
@@ -93,7 +93,7 @@ blockWord8sIn512 =
g [] = Nothing
g xs = Just (splitAt 64 xs)
-fromBytes :: (Bits a) => [a] -> a
+fromBytes :: (Num a, Bits a) => [a] -> a
fromBytes input =
let dofb accum [] = accum
dofb accum (x:xs) = dofb ((shiftL accum 8) .|. x) xs
diff --git a/fibon/Hackage/Crypto/Data/LargeWord.hs b/fibon/Hackage/Crypto/Data/LargeWord.hs
index b7aaf69..d2a881d 100644
--- a/fibon/Hackage/Crypto/Data/LargeWord.hs
+++ b/fibon/Hackage/Crypto/Data/LargeWord.hs
@@ -62,7 +62,7 @@ instance LargeWord Word64 where
data LargeKey a b = LargeKey a b
deriving (Eq, Ord)
-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
LargeWord (LargeKey a b) where
largeWordToInteger (LargeKey lo hi) =
largeWordToInteger lo + (2^(bitSize lo)) * largeWordToInteger hi
@@ -96,17 +96,17 @@ instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
where conv = integerToLargeWord . largeWordToInteger
largeBitSize ~(LargeKey lo hi) = largeBitSize lo + largeBitSize hi
-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => Show (LargeKey a b) where
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => Show (LargeKey a b) where
showsPrec p = showInt . largeWordToInteger
-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
Num (LargeKey a b) where
(+) = largeWordPlus
fromInteger = integerToLargeWord
-- Larger keys are instances of Bits provided their constituents are keys.
-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
Bits (LargeKey a b) where
(.&.) = largeWordAnd
(.|.) = largeWordOr
@@ -130,11 +130,11 @@ aoflk = undefined
boflk :: (LargeKey a b) -> b
boflk = undefined
-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
Integral (LargeKey a b) where
toInteger = largeWordToInteger
-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
+instance (Num a, Num b, Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
Real (LargeKey a b)
instance Enum (LargeKey a b)
diff --git a/fibon/Hackage/Gf/Makefile b/fibon/Hackage/Gf/Makefile
index bb17635..c02187f 100644
--- a/fibon/Hackage/Gf/Makefile
+++ b/fibon/Hackage/Gf/Makefile
@@ -115,7 +115,7 @@ SRCS = src/compiler/GF/Data/BacktrackM.hs \
src/compiler/GFC.hs \
src/compiler/GF.hs
PROG_ARGS += --quiet --src --make -f haskell Eng.gf EngReal.gf FreDescr.gf EngDescr.gf Fre.gf FreReal.gf
-HC_OPTS += -isrc/compiler -isrc/runtime/haskell -igenerated -package array -package base -package bytestring -package containers -package directory -package filepath -package haskeline -package mtl -package old-time -package pretty -package process -package random -package unix -optP-DUSE_INTERRUPT
+HC_OPTS += -isrc/compiler -isrc/runtime/haskell -igenerated -package array -package base -package bytestring -package containers -package directory -package filepath -package haskeline -package mtl -package time -package pretty -package process -package random -package unix -optP-DUSE_INTERRUPT
CLEAN_FILES += BeschFre.gfo \
Cat.gfo \
CatEng.gfo \
diff --git a/fibon/Hackage/Gf/src/compiler/GF/Compile/ReadFiles.hs b/fibon/Hackage/Gf/src/compiler/GF/Compile/ReadFiles.hs
index b96d312..0b8f039 100644
--- a/fibon/Hackage/Gf/src/compiler/GF/Compile/ReadFiles.hs
+++ b/fibon/Hackage/Gf/src/compiler/GF/Compile/ReadFiles.hs
@@ -37,15 +37,15 @@ import Control.Monad
import Data.Char
import Data.List
import Data.Maybe(isJust)
+import Data.Time.Clock
import qualified Data.ByteString.Char8 as BS
import qualified Data.Map as Map
-import System.Time
import System.Directory
import System.FilePath
import Text.PrettyPrint
type ModName = String
-type ModEnv = Map.Map ModName (ClockTime,[ModName])
+type ModEnv = Map.Map ModName (UTCTime,[ModName])
-- | Returns a list of all files to be compiled in topological order i.e.
@@ -135,7 +135,7 @@ gf2gfo opts file = maybe (gfoFile (dropExtension file))
-- From the given Options and the time stamps computes
-- whether the module have to be computed, read from .gfo or
-- the environment version have to be used
-selectFormat :: Options -> Maybe ClockTime -> Maybe ClockTime -> Maybe ClockTime -> (CompStatus,Maybe ClockTime)
+selectFormat :: Options -> Maybe UTCTime -> Maybe UTCTime -> Maybe UTCTime -> (CompStatus,Maybe UTCTime)
selectFormat opts mtenv mtgf mtgfo =
case (mtenv,mtgfo,mtgf) of
(_,_,Just tgf) | fromSrc -> (CSComp,Nothing)
@@ -160,7 +160,7 @@ data CompStatus =
| CSEnv -- gfo is in env
deriving Eq
-type ModuleInfo = (ModName,CompStatus,Maybe ClockTime,[ModName],InitPath)
+type ModuleInfo = (ModName,CompStatus,Maybe UTCTime,[ModName],InitPath)
importsOfModule :: SourceModule -> (ModName,[ModName])
importsOfModule (m,mi) = (modName m,depModInfo mi [])
More information about the Cvs-ghc
mailing list