@@ -1,11 +1,8 @@
1{-# OPTIONS_GHC -Wall #-}
1{-# OPTIONS_GHC -Wall #-}
2module Elm.Internal.Paths where
2module Elm.Internal.Paths where
4−import System.Directory (doesFileExist)
4+import Build.Utils (getDataFile)
5−import System.Environment (getEnv)
6−import System.FilePath ((</>))
7import System.IO.Unsafe (unsafePerformIO)
5import System.IO.Unsafe (unsafePerformIO)
8−import qualified Paths_Elm as This
10-- |Name of directory for all of a project's dependencies.
7-- |Name of directory for all of a project's dependencies.
11dependencyDirectory :: FilePath
8dependencyDirectory :: FilePath
@@ -25,14 +22,3 @@ runtime = unsafePerformIO $ getDataFile "elm-runtime.js"
25-- |The absolute path to Elm's core library documentation.
22-- |The absolute path to Elm's core library documentation.
26docs :: FilePath
23docs :: FilePath
27docs = unsafePerformIO $ getDataFile "docs.json"
24docs = unsafePerformIO $ getDataFile "docs.json"
29−-- |The absolute path to a data file
30−getDataFile :: FilePath -> IO FilePath
32− path <- This.getDataFileName name
33− exists <- doesFileExist path
37− env <- getEnv "ELM_HOME"
38− return (env </> name)