1.1 --- a/src/Tools/isac/Interpret/calchead.sml Tue Sep 14 12:12:42 2010 +0200
1.2 +++ b/src/Tools/isac/Interpret/calchead.sml Tue Sep 14 15:46:56 2010 +0200
1.3 @@ -931,37 +931,23 @@
1.4 of a SubProblem ? see ME/ptyps.sml 'type met '.*)
1.5 fun is_copy_named_idstr str =
1.6 case (rev o explode) str of
1.7 - (*"_"::_ ::"_"::_ => true*)
1.8 - "'"::"'"::"'"::_ => true
1.9 - | _ => false;
1.10 -(*> is_copy_named_idstr "v_i'''";
1.11 -val it = true : bool
1.12 - > is_copy_named_idstr "e_";
1.13 -val it = false : bool
1.14 - > is_copy_named_idstr "L___";
1.15 -val it = true : bool
1.16 -*)
1.17 + (*"_":: _ ::"_"::_ => true*)
1.18 + "'":: _ ::"'"::_ => (tracing ((strs2str o (rev o explode)) str ^ " T");
1.19 + true)
1.20 + | _ => (tracing ((strs2str o (rev o explode)) str ^ " F"); false);
1.21 +fun is_copy_named (_, (_, t)) = (is_copy_named_idstr o free2str) t;
1.22 +
1.23 (*.should this formal argument (of a model-pattern) create a new identifier?.*)
1.24 fun is_copy_named_generating_idstr str =
1.25 if is_copy_named_idstr str
1.26 then case (rev o explode) str of
1.27 - "_"::"_"::"_"::_ => false
1.28 + (*"_"::"_"::"_"::_ => false*)
1.29 + "'"::"'"::"'"::_ => false
1.30 | _ => true
1.31 else false;
1.32 -(*> is_copy_named_generating_idstr "v_i'''";
1.33 -val it = true : bool
1.34 - > is_copy_named_generating_idstr "L___";
1.35 -val it = false : bool
1.36 -*)
1.37 -
1.38 -(*.can this formal argument (of a model-pattern) be omitted in the arg-list
1.39 - of a SubProblem ? see ME/ptyps.sml 'type met '.*)
1.40 -fun is_copy_named (_,(_,t)) = (is_copy_named_idstr o free2str) t;
1.41 -(*.should this formal argument (of a model-pattern) create a new identifier?.*)
1.42 -fun is_copy_named_generating (_,(_,t)) =
1.43 +fun is_copy_named_generating (_, (_, t)) =
1.44 (is_copy_named_generating_idstr o free2str) t;
1.45
1.46 -
1.47 (*.split type-wrapper from scr-arg and build part of an ori;
1.48 an type-error is reported immediately, raises an exn,
1.49 subsequent handling of exn provides 2nd part of error message.*)