Compiler.Paths

Paths commonly used by the compiler.

projectRoot : Permission -> Task Error Path

Search the filesystem for the root of a Gren project, starting with the current working directory and moving up towards the filesystem root.

projectOutline : Permission -> Task Error Path

Similar to projectRoot, but returns the Path to the gren.json file of a project.

type CacheRoot

A system specific Path to a directory where it's common to cache things. The compiler will use this path to store package sources and the backend binary.

cacheRoot :
Platform
-> Dict String String
-> Path
-> SemanticVersion
-> CacheRoot

Construct a CacheRoot using the current Platform, environment variables, the user's home directory and the current compiler version.

cacheRootToPath : CacheRoot -> Path

Convert the CacheRoot to a Path.

backendBinary : Platform -> CacheRoot -> Path

The Path where we'll store the backend binary.

packageSources : CacheRoot -> Path

The Path where we'll store package sources prior to turning them into gren_packages bundles.

repl : CacheRoot -> Path

The Path for the project that backs the gren repl command.

exists : Permission -> Path -> Task x Bool

Checks to see if the given Path points to a real file.