src/Pure/PIDE/document_id.scala
author wenzelm
Thu, 20 Feb 2014 16:56:51 +0100
changeset 55622 ce575c2212fc
parent 52537 4b5941730bd8
child 56744 0b74d1df4b8e
permissions -rw-r--r--
clarified markup cumulation order (see also 25306d92f4ad and 0009a6ebc83b), e.g. relevant for completion_context;

/*  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.make()

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