Compiler.Backend
Functions for working with the Haskell-based Gren compiler backend.
The Gren compiler is currently split into two parts. One part written in Gren, and one
written in Haskell.
The end goal is to have everything written in Gren, and to have as
much code as possible shared with the community through gren-lang/compiler-node and
gren-lang/compiler-common.
downloadUrl :
SemanticVersion
-> Platform
-> CpuArchitecture
-> Result UnsupportedPlatform String
download :
Permission -> String -> Task Error (Response Bytes)
type Command
= Repl ReplFlags
| Make MakeFlags
| Docs DocsFlags
| PackageValidate PackageValidateFlags
| PackageBump PackageBumpFlags
| PackageDiff PackageDiffFlags
type alias ReplFlags =
{ interpreter : Maybe String
, projectPath : Path
, outline : Outline
, rootSources : Dict String SourceFile
, dependencies : Dict String { path : Path, outline : PkgOutline , sources : Dict String String }
}
type alias MakeFlags =
{ optimize : Bool
, sourcemaps : Bool
, output : Maybe MakeOutput
, report : Maybe {}
, projectPath : Path
, entryPoints : Array ModuleName
, outline : Outline
, rootSources : Dict String SourceFile
, dependencies : Dict String { path : Path, outline : PkgOutline , sources : Dict String String }
}
type MakeOutput
= StdOut
| DevNull
| Html String
| Js String
| Exe String
type alias DocsFlags =
{ output : Maybe DocsOutput
, report : Maybe {}
, projectPath : Path
, outline : Outline
, rootSources : Dict String SourceFile
, dependencies : Dict String { path : Path, outline : PkgOutline , sources : Dict String String }
}
type DocsOutput
= DocsStdOut
| DocsDevNull
| DocsJson String
type alias PackageValidateFlags =
{ projectPath : Path
, knownVersions : Array SemanticVersion
, previousVersion : Maybe { outline : Outline, rootSources : Dict String SourceFile , dependencies : Dict String { path : Path , outline : PkgOutline , sources : Dict String String }
}
, currentVersion : { outline : Outline, rootSources : Dict String SourceFile , dependencies : Dict String { path : Path , outline : PkgOutline , sources : Dict String String }
}
}
type alias PackageDiffFlags =
{ projectPath : Path
, firstPackage : { outline : Outline, rootSources : Dict String SourceFile , dependencies : Dict String { path : Path , outline : PkgOutline , sources : Dict String String }
}
, secondPackage : { outline : Outline, rootSources : Dict String SourceFile , dependencies : Dict String { path : Path , outline : PkgOutline , sources : Dict String String }
}
}
type alias SourceFile =
{ path : Path, data : String }
encodeCommand :
{ interactiveSession : Bool
, pathToString : Path -> String
}
-> Command
-> Bytes
run :
Permission -> RunOptions msg -> Cmd msg
compiler-node 4.0.0
Modules