<commit_before>open Curses

fun main () = 
let
  val mainWin = initscr ()
  val key = ref #" "
  fun setupColor () = 
    if has_colors () then (
      start_color ();
      init_pair (1, 1, 0); (* red *)
      init_pair (2, 2, 0); (* green *)
      color_set (1, NULL);
      ())
    else ()
in
  noecho ();
  (* keypad (mainWin, true); *)
  setupColor ();
  color_set (1, NULL);
  mvaddstr (2, 2, "Press any key ('q' to quit)...");
  refresh ();
  while !key <> #"q" do (
    key := Char.chr (getch ());
    color_set (2, NULL);
    mvaddstr (4, 2, String.str (!key));
    refresh ()
  );
  delwin mainWin;
  endwin ();
  refresh ()
end<commit_msg>Fix: main should return unit.<commit_after>open Curses

fun main () = 
let
  val mainWin = initscr ()
  val key = ref #" "
  fun setupColor () = 
    if has_colors () then (
      start_color ();
      init_pair (1, 1, 0); (* red *)
      init_pair (2, 2, 0); (* green *)
      color_set (1, NULL);
      ())
    else ()
in
  noecho ();
  (* keypad (mainWin, true); *)
  setupColor ();
  color_set (1, NULL);
  mvaddstr (2, 2, "Press any key ('q' to quit)...");
  refresh ();
  while !key <> #"q" do (
    key := Char.chr (getch ());
    color_set (2, NULL);
    mvaddstr (4, 2, String.str (!key));
    refresh ()
  );
  delwin mainWin;
  endwin ();
  refresh ();
  ()
end
{'fraction_non_alphanumeric': 0.18835098335854766, 'fraction_numerical': 0.019667170953101363, 'mean_word_length': 2.3836317135549874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '735445', 'n_tokens_mistral': 519, 'n_tokens_neox': 492, 'n_words': 145}