src/Pure/theory.ML
changeset 10930 7c7a7b0e1d0c
parent 10494 305b37c8d8a3
child 11501 3b6415035d1a
equal deleted inserted replaced
10929:ccceb5fb517d 10930:7c7a7b0e1d0c
   139 val subthy = Sign.subsig o pairself sign_of;
   139 val subthy = Sign.subsig o pairself sign_of;
   140 val eq_thy = Sign.eq_sg o pairself sign_of;
   140 val eq_thy = Sign.eq_sg o pairself sign_of;
   141 
   141 
   142 (*check for some theory*)
   142 (*check for some theory*)
   143 fun requires thy name what =
   143 fun requires thy name what =
   144   if exists (equal name) (Sign.stamp_names_of (sign_of thy)) then ()
   144   if Sign.exists_stamp name (sign_of thy) then ()
   145   else error ("Require theory " ^ quote name ^ " as an ancestor for " ^ what);
   145   else error ("Require theory " ^ quote name ^ " as an ancestor for " ^ what);
   146 
   146 
   147 fun assert_super thy1 thy2 =
   147 fun assert_super thy1 thy2 =
   148   if subthy (thy1, thy2) then thy2
   148   if subthy (thy1, thy2) then thy2
   149   else raise THEORY ("Not a super theory", [thy1, thy2]);
   149   else raise THEORY ("Not a super theory", [thy1, thy2]);