Language Guide
This guide covers the core concepts and features of the Keel programming language.
Fundamentals
- Basics — Values, types, comments, and core language concepts
- Variables — Declaring variables, type annotations, shadowing, and destructuring
- Operators — Arithmetic, comparison, logical, string, list, and pipe operators
- Functions — Defining functions, type signatures, higher-order functions, lambdas, and currying
- Control Flow — If expressions, case expressions, and pattern-based branching
Data Structures
- Types — Type aliases, enums, generics, records, and type inference
- Collections — Lists, tuples, records, and common operations
- Pattern Matching — Literals, constructors, guards, as-patterns, and exhaustiveness
- Modules — Inline modules, file modules, imports, aliases, and exports
- Error Handling — Understanding Keel's error messages and common mistakes
Code Structure
- Indentation and Scope — How indentation controls code structure, multiline arguments, and scoping rules
Data Science
- Temporal Types — Date, Time, DateTime, and Duration types
- DataFrame Expressions — Composable column expressions for efficient DataFrame operations
- DataFrame Type Safety — Schema annotations, column type checking, and compile-time performance
- Data Contracts — Compile-time validation of DataFrame column values
- Data Lineage — Track data provenance and transformation history
- DataFrame Reshaping — Reshape wide data to long format with
melt - Matrices — Matrix creation, arithmetic, decompositions, and DataFrame interop
Projects
- Tasks — Composing programs from multiple files with compile-time task execution
- Projects — Organizing code with manifests and permissions
Tooling
- Tracing and Debugging — Inspecting compilation and execution with
keel trace