Esc
Start typing to search...

Frequently Asked Questions

General

What is Keel?

Keel is a functional programming language designed for clarity, safety, and developer productivity. It features:

  • Strong static typing with inference
  • Immutability by default
  • Pattern matching
  • Lazy evaluation
  • Clean, readable syntax

Why create another programming language?

Keel aims to bring functional programming concepts to a wider audience with a gentler learning curve. It emphasizes:

  • Practical defaults over theoretical purity
  • Clear error messages
  • Excellent tooling out of the box
  • Gradual adoption of advanced concepts

What can I build with Keel?

Keel is suitable for:

  • Command-line tools
  • Web backends (with frameworks)
  • Data processing pipelines
  • Compilers and interpreters
  • Scripts and automation

Is Keel production-ready?

Keel is currently in alpha. It's suitable for experimentation and small projects, but the language and APIs may change. We recommend waiting for 1.0 for production use.

Language

Is Keel purely functional?

Keel is primarily functional but pragmatic. Side effects are tracked in the type system (IO monad), but you're not forced into pure functions everywhere.

Does Keel have null?

No. Keel uses Maybe for optional values:

type Maybe a = Some a | None

This forces explicit handling of missing values.

How does error handling work?

Keel uses Result for operations that can fail:

type Result a e = Ok a | Err e

No exceptions for expected errors. Unexpected errors (bugs) use error or panic.

Is Keel lazy or strict?

Keel uses lazy evaluation by default. Values are computed only when needed. Use ! to force strict evaluation when needed.

Does Keel have type classes?

Yes. Type classes provide ad-hoc polymorphism:

class Show a where
  fn show: a -> String

instance Show Int where
  fn show n = intToString n

What about higher-kinded types?

Keel supports higher-kinded types:

class Functor f where
  fn map: (a -> b) -> f a -> f b

Tooling

What editors are supported?

Keel provides editor support through a Language Server (LSP) and tree-sitter grammar:

  • VS Code / Positron: Full LSP support via the keel-vscode extension — completion, diagnostics, formatting, REPL, Jupyter notebooks
  • Helix: Full support (tree-sitter + LSP) with built-in configuration
  • Zed: Syntax highlighting and format-on-save via keel-zed-extension
  • Neovim: Full support via nvim-treesitter and nvim-lspconfig
  • Emacs: Support planned for future release

See the Editor Setup Guide for configuration instructions.

Is there a package manager?

A package manager is planned but not yet implemented. Keel currently ships with a comprehensive standard library that covers most common needs including List, String, Math, Decimal, Date, Time, Duration, DateTime, IO, HTTP, JSON, DataFrame, Table, ValueLabelSet, Result, and Maybe.

How do I format code?

keel fmt

Formatting is opinionated and consistent. Format-on-save is available in VS Code and Zed.

How do I run tests?

A built-in testing framework is planned but not yet implemented. See the Testing page for the intended design.

Performance

How fast is Keel?

Keel compiles to native code and is designed for good performance. Benchmarks show it's competitive with other functional languages.

Lazy evaluation can cause unexpected performance characteristics.

How is memory managed?

Keel uses garbage collection. The GC is optimized for functional programming patterns (lots of short-lived allocations).

Can I do low-level programming?

Keel provides escape hatches for performance-critical code, but it's primarily a high-level language. Consider FFI for truly low-level needs.

Interop

Can Keel call C code?

Yes, via FFI:

foreign import ccall "math.h sin"
  fn c_sin: Float -> Float

Can I use Keel from other languages?

Keel can export C-compatible functions for use from C, Python, etc.

Is there JavaScript/WASM support?

WASM compilation is on the roadmap. JavaScript interop is not currently a priority.

Community

How can I contribute?

See the Contributing Guide. We welcome:

  • Bug reports
  • Documentation improvements
  • Feature proposals
  • Code contributions

Where can I get help?

Is Keel open source?

Yes, Keel is open source under the MIT license. The source code is on Codeberg.

Comparison

How does Keel compare to Haskell?

Keel is inspired by Haskell but aims for practicality:

  • Simpler module system
  • Fewer language extensions
  • More batteries-included stdlib
  • Easier FFI

How does Keel compare to Elm?

Both emphasize simplicity, but:

  • Keel is general-purpose, not web-focused
  • Keel has more advanced type features
  • Keel supports effects beyond Cmd/Sub model

How does Keel compare to Rust?

Different goals:

  • Rust: Systems programming, zero-cost abstractions
  • Keel: Application programming, developer ergonomics

Keel has garbage collection and no borrow checker.