Your first program
A Taipan program is a .tpn file. Its top level runs from top to bottom, as a Python script’s does.
def greet(name: str) -> str: return f"Hello, {name}!"
for name in ["Ada", "Grace"]: print(greet(name))Hello, Ada!Hello, Grace!Run it with taipan run:
taipan run hello.tpnTypes are checked first
Section titled “Types are checked first”Before anything runs, the compiler checks the whole program. Function parameters and results are annotated, and everything else is inferred. A mistake is reported with its place and, often, how to fix it, and nothing runs:
def greet(name: str) -> str: return f"Hello, {name}!"
let count = 3print(greet(count))hello.tpn:5:13: error TP0200: expected str, found inttaipan check checks a program without running it, which is what editors and CI usually want. Each error code has a page under Diagnostics.
Building
Section titled “Building”taipan build writes a program that runs without the compiler:
taipan build hello.tpn -o outdotnet out/hello.dllWith --native, it’s a single native executable that doesn’t need .NET installed at all. See Native builds.
Arguments and input
Section titled “Arguments and input”Arguments after -- go to the program, as sys.argv:
taipan run copy.tpn -- source.txt target.txtimport sys
if len(sys.argv) < 2: print("usage: count <word>...")else: print(len(sys.argv) - 1, "words")usage: count <word>...Set up your editor. If you know Python, read Taipan for Python developers; otherwise, take the Tour of Taipan.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.