Skip to content

Getting Started

Chris Michael edited this page Sep 2, 2026 · 3 revisions

Pudu

Getting Started

GHC 9.10+ · Cabal 3.12+

Status: compiler, interpreter, REPL, formatter, documentation tools, and LSP implemented.

Build and test

From the repository root:

cabal build all
cabal test all --test-show-details=direct

Run a command without installing:

cabal run pudu -- check path/to/Main.pudu
cabal run pudu -- run path/to/Main.pudu

Install or refresh

Development builds currently share version 0.1.0.0, so version text cannot prove that the shell or editor found the current compiler. Install to a known directory and verify behavior:

mkdir -p "$HOME/.local/bin"
cabal install exe:pudu --installdir="$HOME/.local/bin" --overwrite-policy=always
export PATH="$HOME/.local/bin:$PATH"
hash -r
test "$(command -v pudu)" = "$HOME/.local/bin/pudu"
pudu check test-fixtures/tooling/RecentLanguage.pudu
node test/lsp-session.mjs "$(command -v pudu)"

A minimal program

module Main

export fn main() -> Int {
  print("hello from Pudu")
  0
}
pudu check Main.pudu
pudu run Main.pudu

An exported main is the program entry point. An integer result becomes the process exit status; unit prints nothing; another returned value is rendered.

Interactive use

$ pudu
puduci> 1 + 1
2
puduci> :t "hello"
"hello" :: Str

Use :? for commands. See CLI REPL And Documentation.

The Worked Programs appendix continues with complete modules for failure, patterns, sets, and task scopes.

Related

Clone this wiki locally