src/Pure/Tools/doc.scala
changeset 52541 97c950217d7f
parent 52448 082a1c8c2c89
child 52542 19d674acb764
     1.1 --- a/src/Pure/Tools/doc.scala	Sat Jul 06 21:50:14 2013 +0200
     1.2 +++ b/src/Pure/Tools/doc.scala	Sat Jul 06 21:51:35 2013 +0200
     1.3 @@ -18,7 +18,7 @@
     1.4      Path.split(Isabelle_System.getenv("ISABELLE_DOCS")).map(dir =>
     1.5        if (dir.is_dir) dir
     1.6        else error("Bad documentation directory: " + dir))
     1.7 -
     1.8 +    
     1.9  
    1.10    /* contents */
    1.11  
    1.12 @@ -33,12 +33,21 @@
    1.13    sealed abstract class Entry
    1.14    case class Section(text: String) extends Entry
    1.15    case class Doc(name: String, title: String) extends Entry
    1.16 +  case class Text_File(path: Path) extends Entry
    1.17  
    1.18    private val Section_Entry = new Regex("""^(\S.*)\s*$""")
    1.19    private val Doc_Entry = new Regex("""^\s+(\S+)\s+(.+)\s*$""")
    1.20  
    1.21 +  private val release_notes =
    1.22 +    List(Section("Release notes"),
    1.23 +      Text_File(Path.explode("~~/ANNOUNCE")),
    1.24 +      Text_File(Path.explode("~~/README")),
    1.25 +      Text_File(Path.explode("~~/NEWS")),
    1.26 +      Text_File(Path.explode("~~/COPYRIGHT")),
    1.27 +      Text_File(Path.explode("~~/CONTRIBUTORS")))
    1.28 +
    1.29    def contents(): List[Entry] =
    1.30 -    for {
    1.31 +    (for {
    1.32        line <- contents_lines()
    1.33        entry <-
    1.34          line match {
    1.35 @@ -46,7 +55,7 @@
    1.36            case Doc_Entry(name, title) => Some(Doc(name, title))
    1.37            case _ => None
    1.38          }
    1.39 -    } yield entry
    1.40 +    } yield entry) ::: release_notes
    1.41  
    1.42  
    1.43    /* view */