---
name: "patsopt"
section: "1"
platform: "linux"
package: "ats2-lang"
version: "0.4.2-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/patsopt"
---

# patsopt(1)

ATS2 to C compiler

## NAME

patsopt - ATS2 to C compiler

## SYNOPSIS

**patsopt** \[\<options\>\] \[-o *\<file\>*\] \<specifications\>*...*

## DESCRIPTION

**patsopt** is the compiler from ATS2 to C.  It is most commonly invoked by **patscc** which is the preferred frontend for compiling ATS2 code. If no output filename is specified then the default is standard output. The output option **-o \<file\>** must be specified before any other specifications are given.

## OPTIONS

**patsopt** takes a number of commands with parameters to determine its behavior:

- **--depgen**

  Generate dependency lists.

- **--gline**

  Generate line pragma information in target code.

- **-h, --help**

  Print the usage information.

- **--taggen**

  Generate tagging information on syntactic entities.

- **-tc, --typecheck**

  Typecheck the given ATS source files, but go no further.

- **-v, --version**

  Show ATS2/Postiats version and gcc version.

## SPECIFICATIONS

**patsopt** takes a number of command-line specifications of the files it is to process.

- **-d, --dynamic \<filenames\>**

  Dynamically load the filenames.

- **-o, --output \<filename\>**

  Specify the output filename.

- **-s, --static \<filenames\>**

  Statically load the filenames.

- **patsopt -o test.c -d test.dats**

  ## EXAMPLES

Compile test.dats to a C file.

**patsopt -tc -d test.dats**

Typecheck test.dats only.

## SEE ALSO

[**patscc**(1)](/patscc/1.md),\
 These programs are documented fully by **The ATS2/Postiats user's manual** available via the web at http://www.ats-lang.org/

## AUTHOR

patsopt was written by Hongwei Xi.

This manual page was written by Matthew Danish \<mrd@debian.org\>, for the Debian project (and may be used by others).
