src/Pure/PIDE/document_id.scala
author wenzelm
Thu, 18 Jan 2018 21:41:30 +0100
changeset 67463 a5ca98950a91
parent 66415 96ad7d5ff613
child 71601 97ccf48c2f0c
permissions -rw-r--r--
clarified access to antiquotation options; define explicit variants of antiquotations; output proper Latex.text; misc tuning and clarification;

/*  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 = Value.Long.apply(id)
  def unapply(s: String): Option[Generic] = Value.Long.unapply(s)
}