rbt
rbt copied to clipboard
implement FileMapping
As in ADR 008 (docs/adrs/008-unified-inputs.md) we need some data structure like this to avoid conflicts between jobs and source files:
FileMapping := { sourceFile : Str, workspacePath : Str }
sourceFile : Str -> FileMapping
sourceFile = \path -> @FileMapping { sourceFile : path, workspacePath : path }
withWorkspacePath : FileMapping, Str -> FileMapping
withWorkspacePath = \@FileMapping { sourceFile }, workspacePath ->
@FileMapping { sourceFile, workspacePath }
Right now we're just using a Str for input paths—they should be replaced by this data structure.