ATS2

1 program Added 2026-02-26T16:54:16Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: ATS/LF, Applied Type System 2
Provenance: commit 20b60a15e4 · authored 2026-02-26T17:54:47+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

ATS (0.61)A-3 (0.20)Red/System (0.17)Atlast (0.16)Red (0.15)

LLM-contributed programs

Fibonacci Sequence

Provenance: commit 20b60a15e4 · authored 2026-02-26T17:54:47+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.dats · license: Public Domain · added: 2026-02-26T16:54:16Z
(*
** Fibonacci sequence in ATS2
*)
#include "share/atspre_staload.hats"

fun fib (n: int): int =
  if n <= 1 then n
  else fib(n-1) + fib(n-2)

implement main0 () = {
  val () = println! ("fib(0)  = ", fib 0)
  val () = println! ("fib(1)  = ", fib 1)
  val () = println! ("fib(5)  = ", fib 5)
  val () = println! ("fib(10) = ", fib 10)
  val () = println! ("fib(15) = ", fib 15)
}

Contribute — propose a file extension

Tell us where to find evidence about ATS2 (mapped to pl/ats2). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/ATS2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← ATS AtScript →