Functions that
do what they say.

A language for whole apps: browser, server and CLI. The signature says what a function needs and how it can fail, the compiler holds the body to it, and the code still reads like plain code.

Alpha: foreign bindings are taken on trust

load_view : UserId ->{Users, Log; NotFound} UserView
This is the real compiler, running in your browser.

Read the signature

Every named function has one, right above its let. It is the whole contract: what the function takes, what it needs, how it can fail and what it returns.

type error NotFound = NotFound UserId

service Users =
  get : UserId ->{; NotFound} User

service Log =
  info : String ->{} Unit

load_view : UserId ->{Users, Log; NotFound} UserView
let load_view id =
  let user = Users.get id
  let view = to_view user
  Log.info "Loaded \{view.title}"
  view
UsersLog
The services it needs. A call to any other service does not compile.
NotFound
How it can fail. Handle it with try, or it stays in the caller's signature.
UserView
What it returns. The body gets there with plain calls: no yield, no flatMap.

Lines end where they are served

A service line runs up through every caller until provide serves it. An error line runs until try handles it. main picks the real services in one place, and a test picks its own, without changing the code under test.

main : Unit ->{; AppError} Unit
let main () = provide Layer.merge live_users live_log {
  try Log.info (load_view first).title with
  | NotFound id -> Log.info "no user \{show id}"
}
test_users : Layer none none {Users}
let test_users =
  Layer.succeed Users {
    get = fun id ->
      match find_user id with
      | Some user -> user
      | None -> Fail.fail (NotFound id)
  }

in_a_test : Unit ->{; NotFound} UserView
let in_a_test () =
  let layers = Layer.merge test_users test_log
  provide layers { load_view first }

One function, three signatures

TypeScript

async function loadView(id: UserId): Promise<UserView> {
  const user = await users.get(id);
  log.info(`Loaded ${user.name}`);
  return toView(user);
}

Says what it returns. What it needs and how it fails live in the body, the docs or your memory.

TypeScript + Effect

const loadView = (
  id: UserId,
): Effect<UserView, NotFound, Users | Log> =>
  Effect.gen(function* () {
    const user = yield* Users.get(id);
    yield* Log.info(`Loaded ${user.name}`);
    return toView(user);
  });

Says all of it, in the TypeScript and with the ecosystem you already have. The body is written with yield*.

Flick

load_view : UserId ->{Users, Log; NotFound} UserView
let load_view id =
  let user = Users.get id
  Log.info "Loaded \{user.name}"
  to_view user

Says all of it, and the body is plain calls. The price is a new language and a smaller ecosystem.

The rest is plain code

The signature is strict, so the body can be simple: the forms you reach for every day are here, and each of them still keeps to the signature.

Local state, pure outside

let mut, while, for and labelled break. digits changes its own variables and is still Int -> Int.

digits : Int -> Int
let digits n =
  let mut left = n
  let mut count = 1
  while left >= 10 do {
    left = left / 10
    count = count + 1
  }
  count

Effects you handle yourself

An effect declares operations, and try … with decides what each one does. Ask stays in the row until it is handled.

effect Ask =
  ask : String ->{} Int

total : Unit ->{Ask} Int
let total () = Ask.ask "apples" + Ask.ask "pears"

counted : Unit ->{} Int
let counted () =
  try total () with
  | Ask.ask "apples" -> 3
  | Ask.ask _ -> 4

Types that know their shape

Each constructor of a GADT says which type it builds, so eval gives an Int for Num and a Bool for Less, with no casts.

type Expr a =
  | Num Int : Expr Int
  | Less (Expr Int) (Expr Int) : Expr Bool
  | If (Expr Bool) (Expr a) (Expr a) : Expr a

eval : forall a. Expr a -> a
let rec eval e =
  match e with
  | Num n -> n
  | Less x y -> eval x < eval y
  | If c t f -> if eval c then eval t else eval f

No null

A missing value is an Option. let … else leaves the block when the pattern does not match, and orelse computes its fallback only on None.

build_user : RawInput -> Result InputError User
let build_user raw =
  let Some name = raw.name else Err MissingName
  let Some email = raw.email else Err MissingEmail
  let host = raw.host orelse "localhost"
  Ok { name = name; email = email; host = host }

Also in the language: defer and errdefer, lazy { … }, result { … }, holes in strings, Int8 to UInt64 and Float32, and deriving Generic.

One app. One language. No unchecked seams.

Conduit, the RealWorld demo app, is a Go server over PostgreSQL and a React client. Both depend on one package with the API contract, so a route that does not exist is a compile error on both sides.

contractserverGo, PostgreSQLclientReact, in the browser

contract

  • server Go, PostgreSQL
  • client React, in the browser

A stale column, checked against your migrations

std/Q001 Users has no column nmae

A path that disagrees with its parameters

FLICK-C001 PathParams "/items/:id/:rev" { id : String } does not hold

sql blocks are checked against the migrations in your project, not against a live database. ui runs only on JavaScript, and when part of the standard library does not compile to Go yet, the build says so with FLICK-P012, never at run time.

The server passed the official RealWorld API suite. The app ran the frontend suite in its full-stack mode: 75 tests passed, and the 65 that need a separate API or browser mocks do not apply. Both were last run by hand on 2026-11-18, not in CI: just conduit-api and just conduit-e2e.

Read the Conduit example

A compiler made of plugins

The compiler itself keeps types, effects and regions. sql, ui, cli, server, codec, component, refined and test are blocks of the standard library's plugin, and a package of yours adds a block the same way.

greet : Cli.Command {Host.Console} none
let greet = cli "greet" {
  description "Prints a greeting"
  /// Print in capitals
  flag loud : Bool
  /// Who to greet
  arg name : String
  handle fun { loud; name } ->
    let text = "Hello, \{name}"
    Platform.stdout_line (if loud then String.to_upper text else text)
}

A block expands into Flick code, and the compiler checks that code like any other, so errors and hovers land on what you wrote: point at loud.

# protos/flick.toml: a library with a block
[package]
name = "protos"
version = "0.1.0"
plugin = "protos.wasm"
load = ["proto"]

# the app's flick.toml: what it may reach
[plugins.protos]
fs-read = ["schema/"]
net = ["registry.example.com"]

[plugins.std]
disable = ["sql"]

A plugin is a WebAssembly component. It runs on a budget of fuel and 64 MiB of memory, and reaches no file, host or variable the project has not granted. Besides expanding blocks, it can check calls, rewrite the IR or the files a build writes, and turn files of other languages, such as .proto, into modules. Editors ask it for completion and hovers inside its blocks.

Backends and hosts are plugins too

flick/js and flick/go are WebAssembly components as well. --target picks one, and flick.lock pins it by hash. A backend reads the checked program and the inputs its request lists, nothing else: no files of its own, no clock, no network.

Each backend declares its own options, templates and commands: flick build --target go --help lists them, and [target.go] keeps them in flick.toml. Another backend plugs in the same way, pinned with [build.backend].

IRflick/jsNode, browser,Bun, Cloudflareflick/gonative programs

IR

  • flick/js Node, browser, Bun, Cloudflare
  • flick/go native programs

Where it runs

On JavaScript, effects run on Flick's own small runtime; the Effect adapter is an option, runtime = "effect". What a host gives, the console, the clock, randomness, the environment, the arguments and child processes, is a Host service that the signature names, and a test swaps it like any other.

hypot : Float -> Float -> Float
let hypot a b = Float.sqrt (a * a + b * b)
  @native "Math.hypot" when js
  @native "math.Hypot" when go

@native gives a function a host's own implementation on one target, over a Flick body that every other target uses. @when "js && !browser" keeps a whole module to the hosts it can run on.

[build]
target = "go"              # or --target js
environment = "go/native"  # or js/node, js/bun, …

[tools]
"flick/go" = ["go"]

[target.go]
cgo = true                 # declared by flick/go

Use the host, don't rewrite it

flick ffi import reads an npm package's .d.ts and writes the bindings, with a report on every export. The compiler takes a binding's signature on trust, so flick ffi check tells you when the declarations change.

In the other direction, flick build --emit-dts writes TypeScript declarations of Flick modules. On Go, bindings are written by hand for now.

lookup : String ->{Async; JsError} Option String
foreign lookup from "lookup-lib" "lookup"
  arity 1
  catch JsError.from_js
  nullable

For code you didn't write

A teammate, a library or a model wrote it, and now you are reviewing it. The signature tells you what it needs and how it fails before you read the body.

Mistakes are compile errors with codes. flick explain FLICK-E002 explains one, and --diagnostics json gives tools one event per line. The source stays about as long as the same app in Go and React: 29,979 tokens against 29,778 by GPT's tokenizer on 2026-11-18, for this one app. node tools/tokens/index.mjs repeats the count.

error[FLICK-E002]: the signature of load_view does not allow service Log, which its body needs

help: add service Log to the signature of load_view

load_view : UserId ->{Log, Users; NotFound} UserView

Contracts the compiler proves

require and ensure say what a function expects and what it promises. Every build checks their types, and flick prove proves them for pure code over integers and data, or answers with a counterexample.

consume : Int -> Int -> Int
let consume available used
where
  require (0 <= used && used <= available)
  ensure (fun rest -> 0 <= rest && rest + used == available)
=
  available - used

If ensure said available + 1

error[FLICK-T087]: the postcondition of consume is not established, e.g. when available = 0, used = 0

A refined type carries its check. Port.prove n makes a Port with no check at run time where the compiler proves it from the path, here from the if around it. Where it cannot, that is a compile error, such as FLICK-T077.

refined type Port = Int where fun n -> n > 0 && n < 65536

as_port : Int -> Option Port
let as_port n = if n > 0 && n < 65536 then Some (Port.prove n) else None
Proofs and flick prove

Proved, not promised

The rules behind this page are checked by a machine, in Lean 4.

That covers the core calculus under stated hypotheses, not the whole compiler, and the known differences from the checker are written down. The build fails on a missing proof or a new axiom.

  • Well-typed programs do not get stuckT1
  • Pure code makes only pure stepsT2a
  • Runtime code keeps to its rowT2b
  • Code uses a region only while it is liveT4′
What exactly is proved

End of the line. Change here for the docs

That was the overview. Each line below goes deeper, and you can get off at any station.

Flick is young and still growing. New stations open as the language does, so the journey goes on past this page.