32961afd4f
ML-Doc is a system for documenting the interfaces of SML libraries. It can produce both HTML and LaTeX output. http://people.cs.uchicago.edu/~jhr/tools/ml-doc.html PR: ports/115932: Submitted by: Timothy Bourke <timbob@bigpond.com>
121 lines
2.5 KiB
Groff
121 lines
2.5 KiB
Groff
.\" $Id$
|
|
.\"
|
|
.\" The tool described by this document is:
|
|
.\" COPYRIGHT (c) 2007 The Fellowship of SML/NJ (http://smlnj.org)
|
|
.\" All rights reserved.
|
|
.\"
|
|
.Dd August 2, 2007
|
|
.Os FreeBSD 6.2
|
|
.Dt mkdoc 1
|
|
.\" ----------------------------------------
|
|
.Sh NAME
|
|
.\"
|
|
.Nm mkdoc
|
|
.Nd Turn SML signatures into rudimentary ML-Doc files.
|
|
.\"
|
|
.\" ----------------------------------------
|
|
.Sh SYNOPSIS
|
|
.Nm mk-doc
|
|
.Op Fl a | Fl b | Fl \&?
|
|
.Op Fl o Ar output-file
|
|
.Op Fl c Ar copyright
|
|
.Op Fl s | Sy +s Ar strid
|
|
.Op Fl f | Sy +f Ar fctid Ar arg-id Ar arg-sig
|
|
.Op Fl i | Sy +i Ar struct
|
|
.Ar sml-file ...
|
|
.\"
|
|
.\" ----------------------------------------
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
transforms an SML source file into SGML text for further processing by
|
|
.Xr ml-doc 1 .
|
|
The output file contains the required basic structure.
|
|
Further editing is required to produce useful documentation.
|
|
Comments from the SML source can be included in the output
|
|
.Po
|
|
the
|
|
.Fl a
|
|
and
|
|
.Fl b
|
|
options
|
|
.Pc as SGML comments.
|
|
.\"
|
|
.\" ----------------------------------------
|
|
.Sh OPTIONS
|
|
.Bl -tag -width indent
|
|
.\"
|
|
.It Fl \&?
|
|
Display a summary of options.
|
|
.\"
|
|
.It Fl a
|
|
Copy comments written
|
|
.Em after
|
|
a specification.
|
|
.\"
|
|
.It Fl b
|
|
Copy comments written
|
|
.Em before
|
|
a specification.
|
|
.\"
|
|
.It Fl o Ar outfile
|
|
Specify an output file to use instead of standard output.
|
|
.\"
|
|
.It Fl c Ar copyright
|
|
Insert the given copyright string into the output.
|
|
.\"
|
|
.It Fl s/ Ns Sy +s Ar strid
|
|
Instead of placing the generated
|
|
.Li SIGBODY
|
|
within
|
|
.Li SIGNATURE
|
|
tags, the file must contain a single signature, use
|
|
.Li STRUCTURE
|
|
tags with the specified
|
|
.Li STRID .
|
|
Bind opaquely if
|
|
.Sy +s
|
|
is given.
|
|
.\"
|
|
.It Fl f/ Ns Sy +f Ar fctid Ar arg-id Ar arg-sig
|
|
As per
|
|
.Fl s/ Ns Sy +s ,
|
|
but wrap the result in
|
|
.Li FUNCTOR
|
|
tags, with
|
|
.Ar fct
|
|
as
|
|
.Li FCTID ,
|
|
.Ar arg-id
|
|
as the functor argument
|
|
.Li ID ,
|
|
and
|
|
.Ar arg-sig
|
|
as its signature
|
|
.Li ID .
|
|
.\"
|
|
.It Fl i/ Ns Sy +i Ar struct
|
|
Attach, for each
|
|
.Sy -/+i
|
|
option given, a
|
|
.Li SIGINSTANCE ,
|
|
possibly with an
|
|
.Li OPAQUE
|
|
attribute, onto the output.
|
|
.\" ----------------------------------------
|
|
.Sh EXAMPLES
|
|
.Bd -literal -compact
|
|
mkdoc +i IntBinaryMap +i IntListMap Util/ord-map-sig.sml
|
|
mkdoc -f SplayMapFn K ORD_KEY Util/ord-map-sig.sml
|
|
.Ed
|
|
.\" ----------------------------------------
|
|
.Sh BUGS
|
|
Error messages are usually just uncaught exceptions.
|
|
.\" ----------------------------------------
|
|
.Sh SEE ALSO
|
|
.Xr ml-doc 1 .
|
|
.\" ----------------------------------------
|
|
.Sh AUTHORS
|
|
.An Emden Gansner Aq erg@research.att.com
|
|
wrote Mkdoc.
|
|
.An Dan Wang Aq danwang@cs.princeton.edu
|
|
added the comment extraction feature.
|