src/Pure/Thy/sessions.scala
changeset 75777 ed32b5554ed3
parent 75775 70a65ee4a738
child 75779 5470c67bd772
equal deleted inserted replaced
75776:72e77c8307ec 75777:ed32b5554ed3
   126         case Nil => this
   126         case Nil => this
   127         case errs => error(cat_lines(errs))
   127         case errs => error(cat_lines(errs))
   128       }
   128       }
   129 
   129 
   130     def base_info(session: String): Base_Info =
   130     def base_info(session: String): Base_Info =
   131       Base_Info(sessions_structure, errors, apply(session), Nil)
   131       Base_Info(base = apply(session), sessions_structure = sessions_structure, errors = errors)
   132   }
   132   }
   133 
   133 
   134   def deps(sessions_structure: Structure,
   134   def deps(sessions_structure: Structure,
   135     progress: Progress = new Progress,
   135     progress: Progress = new Progress,
   136     inlined_files: Boolean = false,
   136     inlined_files: Boolean = false,
   367 
   367 
   368 
   368 
   369   /* base info */
   369   /* base info */
   370 
   370 
   371   sealed case class Base_Info(
   371   sealed case class Base_Info(
   372     sessions_structure: Structure,
       
   373     errors: List[String],
       
   374     base: Base,
   372     base: Base,
   375     infos: List[Info]
   373     sessions_structure: Structure = Structure.empty,
       
   374     errors: List[String] = Nil,
       
   375     infos: List[Info] = Nil
   376   ) {
   376   ) {
   377     def check: Base_Info = if (errors.isEmpty) this else error(cat_lines(errors))
   377     def check: Base_Info = if (errors.isEmpty) this else error(cat_lines(errors))
   378     def session: String = base.session_name
   378     def session: String = base.session_name
   379   }
   379   }
       
   380 
       
   381   def base_info_empty(session: String): Base_Info =
       
   382     Base_Info(Base(session_name = session))
   380 
   383 
   381   def base_info(options: Options,
   384   def base_info(options: Options,
   382     session: String,
   385     session: String,
   383     progress: Progress = new Progress,
   386     progress: Progress = new Progress,
   384     dirs: List[Path] = Nil,
   387     dirs: List[Path] = Nil,
   451     val selected_sessions1 =
   454     val selected_sessions1 =
   452       full_sessions1.selection(Selection(sessions = session1 :: session :: include_sessions))
   455       full_sessions1.selection(Selection(sessions = session1 :: session :: include_sessions))
   453 
   456 
   454     val deps1 = Sessions.deps(selected_sessions1, progress = progress)
   457     val deps1 = Sessions.deps(selected_sessions1, progress = progress)
   455 
   458 
   456     Base_Info(full_sessions1, deps1.errors, deps1(session1), infos1)
   459     Base_Info(deps1(session1), sessions_structure = full_sessions1,
       
   460       errors = deps1.errors, infos = infos1)
   457   }
   461   }
   458 
   462 
   459 
   463 
   460   /* cumulative session info */
   464   /* cumulative session info */
   461 
   465