equal
deleted
inserted
replaced
36 Symbol.Text_Chunk.File(name.node) |
36 Symbol.Text_Chunk.File(name.node) |
37 } |
37 } |
38 |
38 |
39 object Blobs_Info |
39 object Blobs_Info |
40 { |
40 { |
41 val none: Blobs_Info = Blobs_Info(Nil, -1) |
41 val none: Blobs_Info = Blobs_Info(Nil) |
42 |
42 |
43 def errors(msgs: List[String]): Blobs_Info = |
43 def errors(msgs: List[String]): Blobs_Info = |
44 Blobs_Info(msgs.map(msg => Exn.Exn[Blob](ERROR(msg))), -1) |
44 Blobs_Info(msgs.map(msg => Exn.Exn[Blob](ERROR(msg)))) |
45 } |
45 } |
46 |
46 |
47 sealed case class Blobs_Info(blobs: List[Exn.Result[Blob]], index: Int) |
47 sealed case class Blobs_Info(blobs: List[Exn.Result[Blob]], index: Int = -1) |
48 |
48 |
49 |
49 |
50 |
50 |
51 /** accumulated results from prover **/ |
51 /** accumulated results from prover **/ |
52 |
52 |
473 val src_path = Path.explode(file) |
473 val src_path = Path.explode(file) |
474 val name = Document.Node.Name(resources.append(node_name, src_path)) |
474 val name = Document.Node.Name(resources.append(node_name, src_path)) |
475 val content = get_blob(name).map(blob => (blob.bytes.sha1_digest, blob.chunk)) |
475 val content = get_blob(name).map(blob => (blob.bytes.sha1_digest, blob.chunk)) |
476 Blob(name, src_path, content) |
476 Blob(name, src_path, content) |
477 }).user_error) |
477 }).user_error) |
478 Blobs_Info(blobs, loaded_files.index) |
478 Blobs_Info(blobs, index = loaded_files.index) |
479 } |
479 } |
480 } |
480 } |
481 |
481 |
482 def build_blobs_info( |
482 def build_blobs_info( |
483 syntax: Outer_Syntax, |
483 syntax: Outer_Syntax, |
494 val src_path = Path.explode(file) |
494 val src_path = Path.explode(file) |
495 val name = Document.Node.Name((dir + src_path).expand.implode_symbolic) |
495 val name = Document.Node.Name((dir + src_path).expand.implode_symbolic) |
496 Blob.read_file(name, src_path) |
496 Blob.read_file(name, src_path) |
497 }).user_error |
497 }).user_error |
498 } |
498 } |
499 Blobs_Info(blobs, -1) |
499 Blobs_Info(blobs) |
500 } |
500 } |
501 } |
501 } |
502 |
502 |
503 |
503 |
504 final class Command private( |
504 final class Command private( |