src/HOL/Import/hol4rews.ML
changeset 21858 05f57309170c
parent 21546 268b6bed0cc8
child 22578 b0eb5652f210
equal deleted inserted replaced
21857:f9d085c2625c 21858:05f57309170c
   582     val defmaps = mk (HOL4DefMaps.get thy);
   582     val defmaps = mk (HOL4DefMaps.get thy);
   583 	fun new_name internal isa =
   583 	fun new_name internal isa =
   584 	    if internal
   584 	    if internal
   585 	    then
   585 	    then
   586 		let
   586 		let
   587 		    val paths = NameSpace.unpack isa
   587 		    val paths = NameSpace.explode isa
   588 		    val i = Library.drop(length paths - 2,paths)
   588 		    val i = Library.drop(length paths - 2,paths)
   589 		in
   589 		in
   590 		    case i of
   590 		    case i of
   591 			[seg,con] => output_thy ^ "." ^ seg ^ "." ^ con
   591 			[seg,con] => output_thy ^ "." ^ seg ^ "." ^ con
   592 		      | _ => error "hol4rews.dump internal error"
   592 		      | _ => error "hol4rews.dump internal error"
   636 		then ()
   636 		then ()
   637 		else out "\n\n"
   637 		else out "\n\n"
   638 
   638 
   639 	fun gen2replay in_thy out_thy s = 
   639 	fun gen2replay in_thy out_thy s = 
   640 	    let
   640 	    let
   641 		val ss = NameSpace.unpack s
   641 		val ss = NameSpace.explode s
   642 	    in
   642 	    in
   643 		if (hd ss = in_thy) then 
   643 		if (hd ss = in_thy) then 
   644 		    NameSpace.pack (out_thy::(tl ss))
   644 		    NameSpace.implode (out_thy::(tl ss))
   645 		else
   645 		else
   646 		    s
   646 		    s
   647 	    end 
   647 	    end 
   648 
   648 
   649 	val _ = if null mapped
   649 	val _ = if null mapped