1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

More idiomatic home directory finding.

Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
Rob Rix 2018-08-03 13:39:11 -04:00
parent 45da491c6f
commit 2f038b92be

View File

@ -36,7 +36,7 @@ import Semantic.Telemetry
import Semantic.Telemetry.Log (LogOptions, Message(..), writeLogMessage)
import Semantic.Util
import System.Console.Haskeline
import qualified System.Environment as System
import System.Directory (getHomeDirectory)
import System.FilePath
{-
@ -104,7 +104,7 @@ repl proxy parser paths = defaultConfig debugOptions >>= \ config -> runM . runD
blobs <- catMaybes <$> traverse IO.readFile (flip File (Language.reflect proxy) <$> paths)
package <- fmap (fmap quieterm) <$> parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs (Language.reflect proxy) [])
modules <- topologicalSort <$> runImportGraphToModules proxy (snd <$> package)
homeDir <- liftIO (System.getEnv "HOME")
homeDir <- liftIO getHomeDirectory
prefs <- liftIO (readPrefs (homeDir <> "/.haskeline"))
let settings = Settings
{ complete = noCompletion