src/HOL/Tools/Nitpick/nitpick_util.ML
changeset 53514 fa5b34ffe4a4
parent 53505 412f8c590c6c
child 53802 44bc6ff8f350
equal deleted inserted replaced
53513:1082a6fb36c6 53514:fa5b34ffe4a4
   297 fun pretty_maybe_quote pretty =
   297 fun pretty_maybe_quote pretty =
   298   let val s = Pretty.str_of pretty in
   298   let val s = Pretty.str_of pretty in
   299     if maybe_quote s = s then pretty else Pretty.enum "" "\"" "\"" [pretty]
   299     if maybe_quote s = s then pretty else Pretty.enum "" "\"" "\"" [pretty]
   300   end
   300   end
   301 
   301 
   302 fun hashw_term (t1 $ t2) = hashw (hashw_term t1, hashw_term t2)
   302 fun hashw_term (t1 $ t2) = ATP_Util.hashw (hashw_term t1, hashw_term t2)
   303   | hashw_term (Const (s, _)) = hashw_string (s, 0w0)
   303   | hashw_term (Const (s, _)) = ATP_Util.hashw_string (s, 0w0)
   304   | hashw_term (Free (s, _)) = hashw_string (s, 0w0)
   304   | hashw_term (Free (s, _)) = ATP_Util.hashw_string (s, 0w0)
   305   | hashw_term _ = 0w0
   305   | hashw_term _ = 0w0
   306 
   306 
   307 val hash_term = Word.toInt o hashw_term
   307 val hash_term = Word.toInt o hashw_term
   308 
   308 
   309 end;
   309 end;