chore: remove obsolete built-in search path

This commit is contained in:
Sebastian Ullrich 2020-05-19 14:54:47 +02:00 committed by Leonardo de Moura
parent 18a89abbe6
commit dc56eb7a86

View file

@ -48,19 +48,13 @@ pure sp
def getBuiltinSearchPath : IO SearchPath := do
appDir ← IO.appDir;
let libDir := appDir ++ pathSep ++ ".." ++ pathSep ++ "src" ++ pathSep ++ "Init";
libDirExists ← IO.isDir libDir;
if libDirExists then do
path ← realPathNormalized libDir;
let installedLibDir := appDir ++ pathSep ++ ".." ++ pathSep ++ "lib" ++ pathSep ++ "lean" ++ pathSep ++ "Init";
installedLibDirExists ← IO.isDir installedLibDir;
if installedLibDirExists then do
path ← realPathNormalized installedLibDir;
pure $ HashMap.empty.insert "Init" path
else do
let installedLibDir := appDir ++ pathSep ++ ".." ++ pathSep ++ "lib" ++ pathSep ++ "lean" ++ pathSep ++ "Init";
installedLibDirExists ← IO.isDir installedLibDir;
if installedLibDirExists then do
path ← realPathNormalized installedLibDir;
pure $ HashMap.empty.insert "Init" path
else
pure ∅
else
pure ∅
def addSearchPathFromEnv (sp : SearchPath) : IO SearchPath := do
val ← IO.getEnv "LEAN_PATH";