From 2f038b92be6a2dd83ab803fd03fab933f3f9436f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 3 Aug 2018 13:39:11 -0400 Subject: [PATCH] More idiomatic home directory finding. Co-Authored-By: Ayman Nadeem --- src/Semantic/REPL.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Semantic/REPL.hs b/src/Semantic/REPL.hs index 2a72fceac..073e36099 100644 --- a/src/Semantic/REPL.hs +++ b/src/Semantic/REPL.hs @@ -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