Fix tests
This commit is contained in:
parent
94ef8fae79
commit
9077e96aeb
@ -10,8 +10,6 @@ import Utils (TimedFile(..), timeMaybe, mightExist)
|
|||||||
import Language.Haskell.GhcMod.Monad.Types
|
import Language.Haskell.GhcMod.Monad.Types
|
||||||
import Language.Haskell.GhcMod.Logging
|
import Language.Haskell.GhcMod.Logging
|
||||||
|
|
||||||
import Utils
|
|
||||||
|
|
||||||
data Cached m d a =
|
data Cached m d a =
|
||||||
Cached { cacheFile :: FilePath,
|
Cached { cacheFile :: FilePath,
|
||||||
cachedAction :: TimedCacheFiles -> d -> Maybe a -> m ([FilePath], a)
|
cachedAction :: TimedCacheFiles -> d -> Maybe a -> m ([FilePath], a)
|
||||||
|
@ -48,7 +48,6 @@ import Control.Monad.State.Strict (execStateT)
|
|||||||
import Control.Monad.State.Class
|
import Control.Monad.State.Class
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import Data.Traversable as T (mapM)
|
|
||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import Data.Set (Set)
|
import Data.Set (Set)
|
||||||
@ -58,7 +57,6 @@ import System.Directory
|
|||||||
|
|
||||||
import Language.Haskell.GhcMod.Logging
|
import Language.Haskell.GhcMod.Logging
|
||||||
import Language.Haskell.GhcMod.Logger
|
import Language.Haskell.GhcMod.Logger
|
||||||
import Language.Haskell.GhcMod.PathsAndFiles
|
|
||||||
import Language.Haskell.GhcMod.Monad.Types
|
import Language.Haskell.GhcMod.Monad.Types
|
||||||
import Language.Haskell.GhcMod.Types
|
import Language.Haskell.GhcMod.Types
|
||||||
import Language.Haskell.GhcMod.Gap (parseModuleHeader)
|
import Language.Haskell.GhcMod.Gap (parseModuleHeader)
|
||||||
@ -150,6 +148,7 @@ find env mn = liftIO $ do
|
|||||||
_ -> return Nothing
|
_ -> return Nothing
|
||||||
|
|
||||||
|
|
||||||
|
canonicalizeModulePath :: ModulePath -> IO ModulePath
|
||||||
canonicalizeModulePath (ModulePath mn fp) = ModulePath mn <$> canonicalizePath fp
|
canonicalizeModulePath (ModulePath mn fp) = ModulePath mn <$> canonicalizePath fp
|
||||||
|
|
||||||
canonicalizeModuleGraph :: MonadIO m => GmModuleGraph -> m GmModuleGraph
|
canonicalizeModuleGraph :: MonadIO m => GmModuleGraph -> m GmModuleGraph
|
||||||
|
@ -43,6 +43,7 @@ import Data.Maybe
|
|||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import Data.Either
|
import Data.Either
|
||||||
import Data.Foldable (foldrM)
|
import Data.Foldable (foldrM)
|
||||||
|
import Data.Traversable (traverse)
|
||||||
import Data.IORef
|
import Data.IORef
|
||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
|
@ -13,7 +13,6 @@ import Control.Monad.Error (Error(..))
|
|||||||
import qualified Control.Monad.IO.Class as MTL
|
import qualified Control.Monad.IO.Class as MTL
|
||||||
import Control.Exception (Exception)
|
import Control.Exception (Exception)
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Control.Arrow
|
|
||||||
import Data.Serialize
|
import Data.Serialize
|
||||||
import Data.Version
|
import Data.Version
|
||||||
import Data.List (intercalate)
|
import Data.List (intercalate)
|
||||||
|
@ -72,7 +72,7 @@ spec = do
|
|||||||
, mp "H"
|
, mp "H"
|
||||||
, mp "I"
|
, mp "I"
|
||||||
]
|
]
|
||||||
fileMap = mkFileMap smp
|
|
||||||
moduleMap = mkModuleMap smp
|
moduleMap = mkModuleMap smp
|
||||||
|
|
||||||
completeGraph =
|
completeGraph =
|
||||||
@ -104,8 +104,6 @@ spec = do
|
|||||||
]
|
]
|
||||||
|
|
||||||
g = GmModuleGraph {
|
g = GmModuleGraph {
|
||||||
gmgFileMap = fileMap,
|
|
||||||
gmgModuleMap = moduleMap,
|
|
||||||
gmgGraph = graph
|
gmgGraph = graph
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user