sourcePublicCompiler.tri (1169B)
1 !import "prelude" !Local 2 !import "source.unit" !Local 3 4 -- Force the entire public Result (root, definitions) reply on both reducers. 5 -- The environment is an explicit runtime argument. 6 matchesSource = (environment source expected : 7 equal? (compileSource environment source) expected) 8 9 -- Apply the separately exported public bundle. 10 matchesSourceArtifact = (compiler environment source expected : 11 equal? (compiler environment source) expected) 12 13 -- Applying a compiled function checks its behavior without identifying any 14 -- particular lambda-elimination tree. Do not force unused definitions. 15 matchesSourceApplicationArtifact = (compiler environment source input expected : 16 lazyResult 17 (diagnostic rest : false) 18 (output rest : equal? ((fst output) input) expected) 19 (compiler environment source)) 20 21 -- A separate root projection is intentionally demand-limited. In particular, 22 -- an unused divergent definition may be present in the returned environment. 23 matchesSourceRootArtifact = (compiler environment source expected : 24 lazyResult 25 (diagnostic rest : false) 26 (output rest : equal? (fst output) expected) 27 (compiler environment source))