src/Pure/Syntax/ast.ML
changeset 81232 9867b5cf3f7a
parent 81218 94bace5078ba
child 81234 ae0ccabd0aab
equal deleted inserted replaced
81231:808d940fa838 81232:9867b5cf3f7a
   102 
   102 
   103 
   103 
   104 (* strip_positions *)
   104 (* strip_positions *)
   105 
   105 
   106 fun strip_positions (Appl ((t as Constant c) :: u :: (v as Variable x) :: asts)) =
   106 fun strip_positions (Appl ((t as Constant c) :: u :: (v as Variable x) :: asts)) =
   107       if member (op =) Term_Position.markers c andalso not (null (Term_Position.decode x))
   107       if member (op =) Term_Position.markers c andalso Term_Position.detect x
   108       then mk_appl (strip_positions u) (map strip_positions asts)
   108       then mk_appl (strip_positions u) (map strip_positions asts)
   109       else Appl (map strip_positions (t :: u :: v :: asts))
   109       else Appl (map strip_positions (t :: u :: v :: asts))
   110   | strip_positions (Appl asts) = Appl (map strip_positions asts)
   110   | strip_positions (Appl asts) = Appl (map strip_positions asts)
   111   | strip_positions ast = ast;
   111   | strip_positions ast = ast;
   112 
   112