Nominal/Parser.thy
changeset 1434 d2d8020cd20a
parent 1433 7a9217a7f681
child 1436 04dad9b0136d
equal deleted inserted replaced
1433:7a9217a7f681 1434:d2d8020cd20a
   508     map (map (fn (_, antys, _, bns) => (map fst antys, bns))) dt_strs
   508     map (map (fn (_, antys, _, bns) => (map fst antys, bns))) dt_strs
   509 
   509 
   510   fun prep_bn env bn_str =
   510   fun prep_bn env bn_str =
   511     case (Syntax.read_term lthy bn_str) of
   511     case (Syntax.read_term lthy bn_str) of
   512        Free (x, _) => (NONE, env_lookup env x)
   512        Free (x, _) => (NONE, env_lookup env x)
   513      | Const (a, T) $ Free (x, _) => (SOME (Const (a, T), false), env_lookup env x)
   513      | Const (a, T) $ Free (x, _) => (SOME (Const (a, T), true), env_lookup env x)
   514      | _ => error (bn_str ^ " not allowed as binding specification.");  
   514      | _ => error (bn_str ^ " not allowed as binding specification.");  
   515  
   515  
   516   fun prep_typ env (i, opt_name) = 
   516   fun prep_typ env (i, opt_name) = 
   517     case opt_name of
   517     case opt_name of
   518       NONE => []
   518       NONE => []