mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
cleanup locateRunfiles jank
This commit is contained in:
parent
f9f03597e8
commit
82552003ae
@ -432,18 +432,13 @@ setImports paths dflags = dflags { importPaths = paths }
|
||||
|
||||
locateGhcVersionHeader :: IO GhcVersionHeader
|
||||
locateGhcVersionHeader = GhcVersionHeader <$> do
|
||||
resourcesDir <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "ghcversion.h")
|
||||
isDirectory <- doesDirectoryExist resourcesDir
|
||||
let path | isDirectory = resourcesDir </> "ghcversion.h"
|
||||
| otherwise = resourcesDir
|
||||
pure path
|
||||
resourcesDir <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc")
|
||||
pure (resourcesDir </> "ghcversion.h")
|
||||
|
||||
locateCppPath :: IO (Maybe FilePath)
|
||||
locateCppPath = do
|
||||
resourcesDir <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc" </> "hpp")
|
||||
isDirectory <- doesDirectoryExist resourcesDir
|
||||
let path | isDirectory = resourcesDir </> "hpp"
|
||||
| otherwise = resourcesDir
|
||||
resourcesDir <- locateRunfiles (mainWorkspace </> "compiler" </> "damlc")
|
||||
let path = resourcesDir </> "hpp"
|
||||
exists <- doesFileExist path
|
||||
pure (guard exists >> Just path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user