1/* Title: Pure/PIDE/document_id.scala 2 Author: Makarius 3 4Unique identifiers for document structure. 5 6NB: ML ticks forwards > 0, JVM ticks backwards < 0. 7*/ 8 9package isabelle 10 11 12object Document_ID 13{ 14 type Generic = Long 15 type Version = Generic 16 type Command = Generic 17 type Exec = Generic 18 19 val none: Generic = 0 20 val make = Counter.make() 21 22 def apply(id: Generic): String = Value.Long.apply(id) 23 def unapply(s: String): Option[Generic] = Value.Long.unapply(s) 24} 25