1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Simplify the selection of the root.

This commit is contained in:
Rob Rix 2018-03-21 20:19:08 -04:00
parent 6591e0fdc4
commit 865bf650ce

View File

@ -83,7 +83,7 @@ evaluateFiles :: forall term effects
-> IO (Final effects Value)
evaluateFiles parser paths = do
entry:xs <- traverse (parseFile parser) paths
let rootDir = dropFileName (blobPath (fst entry))
let rootDir = dropFileName (head paths)
pure . runAnalysis @(Evaluating term Value) . withModules (modulesForBlobs (Just rootDir) xs) $ evaluateModule (snd entry)
modulesForBlobs :: Maybe FilePath -> [(Blob, term)] -> [Module term]