src/Pure/PIDE/document_id.scala
author wenzelm
Fri, 12 Feb 2021 12:13:24 +0100
changeset 73243 7f55a3e28c88
parent 71601 97ccf48c2f0c
child 75393 87ebf5a50283
permissions -rw-r--r--
more robust: resolve historic components via current tool to access current server;

/*  Title:      Pure/PIDE/document_id.scala
    Author:     Makarius

Unique identifiers for document structure.

NB: ML ticks forwards > 0, JVM ticks backwards < 0.
*/

package isabelle


object Document_ID
{
  type Generic = Long
  type Version = Generic
  type Command = Generic
  type Exec = Generic

  val none: Generic = 0
  val make: Counter = Counter.make()

  def apply(id: Generic): String = Value.Long.apply(id)
  def unapply(s: String): Option[Generic] = Value.Long.unapply(s)
}