Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005363OCamlOCaml generalpublic2011-09-29 20:152013-08-31 12:44
Assigned Toprotz 
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version 
Summary0005363: OCaml shebang syntax error
Description$ cat
#!/usr/bin/env ocamlrun ocaml

let rec main = print_string "Hello World!\n"

$ ./
Hello World!

$ ocaml
Hello World!

$ ocamlc -o hello
File "", line 1, characters 0-1:
Error: Syntax error

$ ocamlopt -o hello
File "", line 1, characters 0-1:
Error: Syntax error

Similar to Erlang, OCaml permits shebangs in scripted mode, but borks in compiled mode. Please instruct the ocamlc and ocamlopt compilers to ignore shebangs.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
protz (manager)
2011-12-21 14:53


That definitely seems wrong to me. Either you're developing a shell script, or you're writing a compiled program. The tasks achieved by the two styles are so different that I'm having a hard time seeing why you're switching back-and-forth between interpreted and compiled.

If you're just testing some features, why don't you just run ocaml inside a terminal?



- Issue History
Date Modified Username Field Change
2011-09-29 20:15 mcandre New Issue
2011-12-21 14:53 protz Note Added: 0006455
2011-12-21 14:54 protz Status new => resolved
2011-12-21 14:54 protz Resolution open => won't fix
2011-12-21 14:54 protz Assigned To => protz
2013-08-31 12:44 xleroy Status resolved => closed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker