support dummy term;
authorwenzelm
Thu, 17 Oct 2019 21:31:53 +0200
changeset 70897 2cc7c05b3b3c
parent 70896 8017d382a0d7
child 70898 c13d9d3ee128
support dummy term;
src/Pure/term.scala
--- a/src/Pure/term.scala	Thu Oct 17 21:03:59 2019 +0200
+++ b/src/Pure/term.scala	Thu Oct 17 21:31:53 2019 +0200
@@ -56,7 +56,8 @@
   case class Const(name: String, typargs: List[Typ] = Nil) extends Term
   {
     override def toString: String =
-      "Const(" + name + (if (typargs.isEmpty) "" else "," + typargs) + ")"
+      if (this == dummy) "_"
+      else "Const(" + name + (if (typargs.isEmpty) "" else "," + typargs) + ")"
   }
   case class Free(name: String, typ: Typ = dummyT) extends Term
   {
@@ -79,6 +80,9 @@
       }
   }
 
+  def dummy_pattern(ty: Typ): Term = Const("Pure.dummy_pattern", List(ty))
+  val dummy: Term = dummy_pattern(dummyT)
+
   sealed abstract class Proof
   case object MinProof extends Proof
   case class PBound(index: Int) extends Proof