On 6 May 2014, at 12:56, David Matthews <david.matth...@prolingua.co.uk> wrote:

> Hi Rob,
> I've been away and I'm now just trying to catch up.
> 
> On 23/04/2014 17:13, Rob Arthan wrote:
>> I have a couple of comments and a query about polyc (which seemed 
>> particularly attractive
>> on Cygwin, where there seems to be quite a long list of libraries you need 
>> to know
>> about if you are going to call the linker directly).
>> 
>> The comment is that the help text is a bit misleading as it has more 
>> functionality
>> than just compiling and linking a source file, e.g., you can pass it the 
>> name of
>> an object file and it will link it with libpolymain and libpolyml.
> 
> I take it you mean the text that gets printed with polyc --help.  The man 
> page contains a bit more.  Any suggestions for a suitable, brief replacement?

Yes, that is what I meant. I had a go at this, but came to a halt when I 
realised that the implementation didn’t quite match the man page or my 
expectations. I expected polyc to use the file name extension to distinguish 
between source files and object files. The man page says it treats text files 
as source files and binary files as object files. The implementation checks the 
extension first and uses that to make the distinction if it recognises it. 
Otherwise it has a go at using the file program to see if the file is a text 
file. Was this actually what was intended? It seems odd not just to rely on the 
extensions (perhaps making them case insensitive, so you would recognise foo.ml 
and FOO.SML as well as foo.ML and foo.sml).

Here is the text I would propose for the implementation I expected:

Usage: polyc [OPTION]... [SOURCEFILE | OBJECTFILE]

Compile and/or link a file with Poly/ML.

A Standard ML source file has extension .ML or .sml and must define
a function 'main' of type 'unit -> unit' that will be called when the
executable is run. An object file has a .o extension.

Options:

   -c           Compile but do not link, writing an object file with the
                same base name as the source file
   -o <file>    Write the executable file to <file> (default 'a.out')
                Ignored if not linking
   --help       Write this help text and exit

Regards,

Rob.

_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to