Use time package so we're ghc 7.6 compatible
This commit is contained in:
parent
2ca6e2ee08
commit
24f1613e91
3
Info.hs
3
Info.hs
@ -10,6 +10,7 @@ import Data.Generics
|
|||||||
import Data.List
|
import Data.List
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.Ord as O
|
import Data.Ord as O
|
||||||
|
import Data.Time.Clock
|
||||||
import DynFlags (tracingDynFlags)
|
import DynFlags (tracingDynFlags)
|
||||||
import Desugar
|
import Desugar
|
||||||
import GHC
|
import GHC
|
||||||
@ -159,7 +160,7 @@ inModuleContext opt fileName modstr action errmsg =
|
|||||||
moddef = "module " ++ sanitize modstr ++ " where"
|
moddef = "module " ++ sanitize modstr ++ " where"
|
||||||
header = moddef : imports
|
header = moddef : imports
|
||||||
importsBuf <- Gap.toStringBuffer header
|
importsBuf <- Gap.toStringBuffer header
|
||||||
clkTime <- Gap.liftIO getClockTime
|
clkTime <- Gap.liftIO getCurrentTime
|
||||||
setTargets [Target (TargetModule $ mkModuleName modstr) True (Just (importsBuf, clkTime))]
|
setTargets [Target (TargetModule $ mkModuleName modstr) True (Just (importsBuf, clkTime))]
|
||||||
doif m t = m >>= \ok -> if ok then t else goNext
|
doif m t = m >>= \ok -> if ok then t else goNext
|
||||||
sanitize = fromMaybe "SomeModule" . listToMaybe . words
|
sanitize = fromMaybe "SomeModule" . listToMaybe . words
|
||||||
|
@ -53,6 +53,7 @@ Executable ghc-mod
|
|||||||
, hlint >= 1.7.1
|
, hlint >= 1.7.1
|
||||||
, io-choice
|
, io-choice
|
||||||
, old-time
|
, old-time
|
||||||
|
, time
|
||||||
, process
|
, process
|
||||||
, regex-posix
|
, regex-posix
|
||||||
, syb
|
, syb
|
||||||
|
Loading…
Reference in New Issue
Block a user