src/Pure/General/name_space.ML
changeset 77959 8d905eef9feb
parent 77958 d7eabea9f837
child 77960 1d82061fbb12
equal deleted inserted replaced
77958:d7eabea9f837 77959:8d905eef9feb
   151 
   151 
   152 local
   152 local
   153 
   153 
   154 fun mandatory xs = fold_rev (fn (x, b) => b ? cons x) xs [];
   154 fun mandatory xs = fold_rev (fn (x, b) => b ? cons x) xs [];
   155 
   155 
   156 fun mandatory_prefixes xs = mandatory xs :: mandatory_prefixes1 xs
   156 fun mandatory_prefixes1 [] = []
   157 and mandatory_prefixes1 [] = []
       
   158   | mandatory_prefixes1 ((x, true) :: xs) = map (cons x) (mandatory_prefixes1 xs)
   157   | mandatory_prefixes1 ((x, true) :: xs) = map (cons x) (mandatory_prefixes1 xs)
   159   | mandatory_prefixes1 ((x, false) :: xs) = map (cons x) (mandatory_prefixes xs);
   158   | mandatory_prefixes1 ((x, false) :: xs) = map (cons x) (mandatory_prefixes xs)
       
   159 and mandatory_prefixes xs = mandatory xs :: mandatory_prefixes1 xs
   160 
   160 
   161 fun mandatory_suffixes xs = map rev (mandatory_prefixes (rev xs));
   161 fun mandatory_suffixes xs = map rev (mandatory_prefixes (rev xs));
   162 
   162 
   163 fun accesses ((_: string, mandatory) :: rest) =
   163 fun accesses ((_: string, mandatory) :: rest) =
   164       let
   164       let