@@ -22,8 +22,8 @@ import Idris.Unlit
23import Control.Monad.State
23import Control.Monad.State
24import Data.List
24import Data.List
25−import qualified Data.Set as S
26import qualified Data.Map as M
25import qualified Data.Map as M
26+import qualified Data.Set as S
27import Data.Time.Clock
27import Data.Time.Clock
28import System.Directory
28import System.Directory
29import Util.System (readSource)
29import Util.System (readSource)
@@ -57,8 +57,8 @@ getModuleFiles ts
57 -- need rebuilding, which we keep track of in the Set.
57 -- need rebuilding, which we keep track of in the Set.
58 -- The order of the list matters - things which get built first appear
58 -- The order of the list matters - things which get built first appear
59 -- in the list first. We'll remove any repetition later.
59 -- in the list first. We'll remove any repetition later.
60− modList :: [ModuleTree] ->
60+ modList :: [ModuleTree] ->
61− State (S.Set IFileType,
61+ State (S.Set IFileType,
62 M.Map IFileType (Bool, [IFileType])) [IFileType]
62 M.Map IFileType (Bool, [IFileType])) [IFileType]
63 modList [] = return []
63 modList [] = return []
64 modList (m : ms) = do (_, fs) <- modTree S.empty m
64 modList (m : ms) = do (_, fs) <- modTree S.empty m
@@ -76,7 +76,7 @@ getModuleFiles ts
76 let rechkDep = or rechkDep_in
76 let rechkDep = or rechkDep_in
78 (rebuild, res) <- get
78 (rebuild, res) <- get
80 -- Needs rechecking if 'rechk' is true, or if any of the
80 -- Needs rechecking if 'rechk' is true, or if any of the
81 -- modification times in 'deps' are later than tm, or
81 -- modification times in 'deps' are later than tm, or
82 -- if any dependency needed rechecking
82 -- if any dependency needed rechecking
@@ -86,12 +86,12 @@ getModuleFiles ts
86 -- Remove duplicates, but keep the last...
86 -- Remove duplicates, but keep the last...
87 let rnub = reverse . nub . reverse
87 let rnub = reverse . nub . reverse
89− let ret = if needsRechk
89+ let ret = if needsRechk
90 then (needsRechk, rnub (getSrc file : concat toBuilds))
90 then (needsRechk, rnub (getSrc file : concat toBuilds))
91 else (needsRechk, rnub (file : concat toBuilds))
91 else (needsRechk, rnub (file : concat toBuilds))
93 -- Cache the result
93 -- Cache the result
94− put (if needsRechk
94+ put (if needsRechk
95 then S.union path rebuild
95 then S.union path rebuild
96 else rebuild, M.insert file ret res)
96 else rebuild, M.insert file ret res)