Skip to content

Instantly share code, notes, and snippets.

@VienosNotes
Created November 19, 2012 11:05
Show Gist options
  • Select an option

  • Save VienosNotes/4110138 to your computer and use it in GitHub Desktop.

Select an option

Save VienosNotes/4110138 to your computer and use it in GitHub Desktop.
run ocaml on interpreter
#!/usr/bin/env perl
use 5.12.0;
my $usage = <<EOS
usage: \$runocaml filename
EOS
;
my $filename = shift // die "Error: No filename \n$usage";
-f $filename or die "$filename not found.\n$usage";
say `echo '#use "$filename";;' | ocaml`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment