POLY(1)
π POLY(1) β the glow-up edition π
okay bestie, welcome to the polyc page from the General Commands Manual π«Ά this is a 1 (user commands) situation and it's literally about the Poly/ML compiler, so buckle up β¨
πΈ NAME πΈ
polyc β compile and link a Standard ML program using Poly/ML π
β¨ SYNOPSIS β¨
polyc sourcefile
π¦ DESCRIPTION π¦
so. polyc is a script, right? and what it does is compile a Standard ML program using the Poly/ML compiler, and then it makes an executable program out of it. iconic behavior, honestly. π
it's not a one-trick pony either β you can also use it to link object files that were created with the PolyML.export function together with the Poly/ML libraries, or to just produce an object file and dip. versatile queen π
when you're using it to compile a Standard ML program, it expects the main function to be called "main", like:
fun main() = print "Hello World\n";
yes, it literally needs that name. no cap.
and here's the vibe check on how it decides what you handed it: if the source file is a text file, it assumes it's ML source. if it's a binary file, it assumes it's an object file and it will get linked with the Poly/ML library. mystery solved, no notes. πβ¨
π OPTIONS π
-cβ compile but do not link. the object file gets written to a file whose name is based on the source file name, except any extension gets replaced with.oπ-ooutputβ write the executable file to"output". name it whatever you want, main character energy π--helpβ write a list of the arguments and exit. the "just tell me what's going on" button, we love her π
π SEE ALSO π
http://www.polyml.orgβ the Poly/ML web site π¦
and that's the whole page bestie!! this one came from Poly/ML Version 5.9.2, dated 2025 β shoutout to the footer for keeping us grounded π«Ά stay slaying, compile responsibly, and remember: main or it didn't happen πβ¨π
π¦ where this page comes from
- alpine 3.24: polyml-doc 5.9.2-r0 Β· LGPL-2.1-only
- arch rolling: polyml 5.9.2-1 Β· LGPL
- fedora 43: polyml 5.9.2-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: polyml 5.9.2-3.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: polyml 5.9.2
- nixpkgs unstable: polyml 5.9.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms