Skip to content

Commit

Permalink
use of package time instead of old-time
Browse files Browse the repository at this point in the history
  • Loading branch information
atzedijkstra committed Nov 28, 2012
1 parent 1210fc8 commit 13b6c7b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion EHC/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,7 @@ HADDOCK_VERSION=$haddockVersion
# GHC version dependencies: packages passed as option, cabal packages
cabal_base_lib_depends="base mtl fgl directory hashable old-time uhc-util"
cabal_base_lib_depends="base mtl fgl directory hashable time uhc-util"
if test x$enableClr = "xyes"
then
cabal_base_lib_depends="$cabal_base_lib_depends language-cil"
Expand Down
2 changes: 1 addition & 1 deletion EHC/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ AC_SUBST(HADDOCK_CMD,$haddockCmd)
AC_SUBST(HADDOCK_VERSION, $haddockVersion)

# GHC version dependencies: packages passed as option, cabal packages
cabal_base_lib_depends="base mtl fgl directory hashable old-time uhc-util"
cabal_base_lib_depends="base mtl fgl directory hashable time uhc-util"
if test x$enableClr = "xyes"
then
cabal_base_lib_depends="$cabal_base_lib_depends language-cil"
Expand Down
4 changes: 2 additions & 2 deletions EHC/src/ehc/EHC/Common.chs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Used by all compiler driver code
%%[8 import({%{EH}Opts.CommandLine})
%%]

%%[50 import(System.Time, System.Directory)
%%[5050 import(System.Time, System.Directory)
%%]

-- 20121029 the time package cannot be used as System.Directory used old-time, and no conversion to UTCTime (from Data.Time) could be found
%%[5050 import(Data.Time, System.Directory) export(module Data.Time, module System.Directory)
%%[50 import(Data.Time, System.Directory) export(module Data.Time, module System.Directory)
%%]

%%[1
Expand Down
2 changes: 1 addition & 1 deletion EHC/src/ehc/EHC/CompilePhase/Module.chs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Module analysis
%%]
%%[50 import(qualified UHC.Util.Rel as Rel)
%%]
%%[50 import(System.Time, System.Directory)
%%[50 import(Data.Time, System.Directory)
%%]

%%[50 import({%{EH}EHC.Common})
Expand Down
2 changes: 1 addition & 1 deletion EHC/src/ehc/EHC/CompilePhase/Output.chs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Output generation, on stdout or file
%%]
%%[8 import(qualified Data.Map as Map, qualified Data.Set as Set)
%%]
%%[50 import(System.Time, System.Directory)
%%[50 import(Data.Time, System.Directory)
%%]

%%[8 import({%{EH}EHC.Common})
Expand Down
2 changes: 1 addition & 1 deletion EHC/src/ehc/EHC/CompileRun.chs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An EHC compile run maintains info for one compilation invocation
%%]
%%[8 import(System.IO, System.Exit, System.Environment, System.Process, System.Cmd(rawSystem))
%%]
%%[99 import(System.Time, System.CPUTime, System.Locale, Data.IORef, System.IO.Unsafe)
%%[99 import(Data.Time, System.CPUTime, System.Locale, Data.IORef, System.IO.Unsafe)
%%]
%%[99 import(System.Directory)
%%]
Expand Down
7 changes: 5 additions & 2 deletions EHC/src/ehc/EHC/CompileUnit.chs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ An EHC compile unit maintains info for one unit of compilation, a Haskell (HS) m
%%]

-- timestamps
%%[50 import(System.Time, System.Directory)
%%[5050 import(Data.Time, System.Directory)
%%]

-- 20121029 the time package cannot be used as System.Directory used old-time, and no conversion to UTCTime (from Data.Time) could be found
%%[5050 import(Data.Time, Data.Time.Clock, System.Directory) export(ClockTime,diffClockTimes,noTimeDiff)
%%[50 import(Data.Time, Data.Time.Clock, System.Directory) export(ClockTime,diffClockTimes,noTimeDiff,getClockTime)
-- | a for now alias for old-time ClockTime
type ClockTime = UTCTime

diffClockTimes = diffUTCTime

noTimeDiff :: NominalDiffTime
noTimeDiff = toEnum 0

getClockTime :: IO ClockTime
getClockTime = getCurrentTime
%%]

-- Force evaluation for IO
Expand Down

0 comments on commit 13b6c7b

Please sign in to comment.