ml-nlffigen(1)
π bestie, welcome to ml-nlffigen(1) from the General Commands Manual π
okay so this is the page for ml-nlffigen(1), and it's giving "Debian wrote this because upstream didn't ship a man page" energy. Let's get into it, no cap. π¦
πΈ NAME πΈ
ml-nlffigenβ SML No Longer Foreign Function Interface tool
β¨ SYNOPSIS β¨
ml-nlffigen [option] -- file
π DESCRIPTION π
This manual page documents briefly the ml-nlffigen command. This manual page was written for the Debian distribution because the original program does not have a manual page. (Debian said "fine, I'll do it myself" π)
ml-nlffigen, a glue-code generator for the new NLFFI foreign function interface. The generator reads C source code and emits ML code along with a description file for CM. Literally the matchmaker between your C code and your ML code. π«Ά
π₯ OPTIONS π₯
A summary of options is included below. Buckle up, bestie, there are a lot. π
-dirdir,-dd β Output directory where all generated files are placed. default:NLFFI-Generated.-allSUβ Instructsml-nlffigento include all structs and unions, even those that are defined in included files (as opposed to files explicitly listed as arguments). default:off.-widthw,-ww β Sets output line width (just a guess) to w. default:75.-smloptionx β Instructsml-nlffigento include x into the list of options to annotate.smlentries in the generated.cmfile with. default:noguid.-guidβ Removes the default-noguidfrom the list of sml options. (This re-enables strict handling of type- and object-identity but can have negative impact on CM cutoff recompilation performance if the programmer routinely removes the entire tree ofml-nlffigen-generated files during development.)-lambdasplitx,-lsx β Instructsml-nlffigento generate"lambdasplit"options for all ML files (see CM manual for what this means; it does not currently work anyway because cross-module inlining is broken). default:nothing.-targett,-tt β Sets the target to t (which must be one of"sparc-unix","x86-unix", or"x86-win32"). default: current architecture.-light,-lβ Suppress"heavy"versions of function wrappers and field accessors; also resets any earlier-heavyto default. default: not suppressed.-heavy,-hβ suppress"light"versions of function wrappers and field accessors; also resets any earlier-lightto default. default: not suppressed-namedargs,-naβ Instructml-nlffigento generated function wrappers that use named arguments (ML records) instead of tuples if there is enough information for this in the C source; (this is not always very useful). default:off.-nocollectβ Do not do the following: Collect enum constants from truly unnamed enumerations (those without tags that occur at toplevel or in an unnamed context, i.e., not in a typedef or another named struct or union) into a single artificial enumeration tagged by'(single apostrohe). The corresponding ML-side representative will be a structure namedE_'.-enum-constructors,-ecβ When possible (i.e., if all values of a given enumeration are different from each other), make the ML representation type of the enumeration a datatype. The default (and fallback) is to make that type the same asMLRep.Signed.int.-libhandleh,-lhh β Use the variable h to refer to the handle to the shared library object. Given the constraints of CM, h must have the form of a long ML identifier, e.g.,MyLibrary.libhandle.default:Library.libh.-includef,-addf β Mention file f in the generated.cmfile. This option is necessary at least once for providing the library handle. It can be used arbitrarily many times, resulting in more than one such programmer-supplied file to be mentioned. If f is relative, then it must be relative to the directory specified in the-dirdir option.-cmfilef,-cmf β Specify name of the generated.cmfile, relative to the directory specified by the-dirdir option. default:nlffi-generated.cm.-cppopto β The string o gets added to the list of options to be passed to cpp (the C preprocessor). The list of options gets substituted for%oin the cpp command line template.-Ux β The string-Uxgets added to the list of cpp options.-Dx β The string-Dxgets added to the list of cpp options.-Ix β The string-Ixgets added to the list of cpp options.-versionβ Just write the version number ofml-nlffigento standard output and then quit.-matchr,-mr β Normallyml-nlffigenwill include ML definitions for a C declaration if the C declaration textually appears in one of the files specified at the command line. Definitions in#include-dfiles will normally not appear (unless their absence would lead to inconsistencies). By specifying-matchr,ml-nlffigenwill also include definitions that occur in recursively#include-dfiles for which the awk-style regular expression r matches their names.-prefixp,-pp β Generated ML structure names will all have prefix p (in addition to the usual"S_"or"U_"or"F_"...)-gensymg,-gg β Names"gensym-ed"byml-nlffigen(for anonymous struct/union/ enums) will get an additional suffix_g. (This should be used if output from several indepdendent runs ofml-nlffigenare to coexist in the same ML program.)--β Terminate processing of options, remaining arguments are taken to be C sources.
π SEE ALSO π
sml(1),ml-build(1).- This program described in more detail in NLFFI: A new SML/NJ Foreign-Function Interface , Matthias Blume, which is available in
/usr/share/doc/smlnj-doc/nlffi.pdf.gz.
π«Ά AUTHOR π«Ά
This manual page was written by Aaron Matthew Read <amread@nyx.net>, for the Debian GNU/Linux system (but may be used by others).
mwah π that's the whole page, bestie. It was ml-nlffigen(1) from the General Commands Manual, dated April 25, 2003. Periodt. πβ¨
π¦ where this page comes from
- debian bookworm: ml-nlffigen 110.79-8
- ubuntu jammy: ml-nlffigen 110.79-6
- ubuntu noble: ml-nlffigen 110.79-8build1
- ubuntu resolute: ml-nlffigen 110.79-8build1
- ubuntu stonking: ml-nlffigen 110.79-8build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms