Commit 1759b24b authored by dterei's avatar dterei

Fix up debrecated lib usage in nofib.

parent da47ada7
......@@ -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
......
......@@ -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)
......
......@@ -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 \
......
......@@ -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 [])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment