let displayWarning msg_type location =
  if !Globals.flag_warnings then
    (incr warningsCounter;
     let string_to_print =
       match msg_type with
         1->  
           "%% Internal function "^location
           ^": warning(1): unhandled use case"
       | 2 -> 
           "%% Internal function "^location
           ^": warning(2): invalid variable"
       | 3 -> 
           "%% Internal function "^location
           ^": warning(3): invalid use of prime"
       | 4 -> 
           "%% Internal function "^location^
           ": warning(4): missing instantiation"
       | 5 -> 
           "%% Internal function "^location
           ^": warning(5): invalid fact"
       | 6 -> 
           "%% System in/out error: warning(6): the prelude file cannot be loaded"
       | 7 -> 
           "%% HLPSL spec: warning(7): unknown type of constant "^location
       | 8 ->
           "%% HLPSL spec: warning(8): "^location^": missing event"
       | 9 ->
           "%% HLPSL spec: warning(9): "^location^": forbidden event"
       | 10 ->
           "%% Semantical warning: "^location
       | 11 ->
           "%% HLPSL spec: warning(11): "^location
       | _ ->
           "%% Warning: "^location
     in
     prerr_endline string_to_print)