POLY(1)

πŸ“¦
version 5.9.2 Β· 2 versions
, in alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– 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 πŸ“
  • -o output β€” 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 🌈


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