> For the complete documentation index, see [llms.txt](https://frost-lang.gitbook.io/frost/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frost-lang.gitbook.io/frost/developer-manual/overview.md).

# Project Overview

The Frost compiler, written in Haskell, is organized into a modular architecture that emphasizes clean separation of concerns and maintainable code. The project structure follows a logical organization that supports the complete compilation pipeline from parsing to code generation.

## Core Components

* **Abstract Syntax Tree (AST)**
  * Located in `lib/Ast/`
  * Handles parsing and syntax representation
  * Includes preprocessor directives and type system
* **Code Generation**
  * Located in `lib/Codegen/`
  * Transforms AST into LLVM IR
  * Manages expression generation and control flow

## Directory Structure

* `app/`: Contains the main compiler entry point
* `lib/`: Houses the core compiler implementation
  * `Ast/Parser/`: Syntax parsing and AST construction
  * `Codegen/ExprGen/`: Expression and control flow generation
  * `Shared/`: Common utilities and helper functions
* `examples/`: Collection of Frost programs showcasing language features
  * `std/`: Standard library implementations
  * Various demonstration programs (donut.ff, mandelbrot.ff, etc.)
* `test/`: Comprehensive test suite
  * Unit tests for parser components
  * Integration tests for code generation
  * Specification tests for language features

## Build System

* Uses Cabal for package management
* Makefile for common development tasks
* Continuous integration scripts in `scripts/`

## Documentation

* `docs/`: Comprehensive documentation
  * User manual for language features
  * Developer documentation for compiler internals
  * Syntax specifications and examples

The project follows a test-driven development approach with extensive unit testing and continuous integration practices to maintain code quality and reliability.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frost-lang.gitbook.io/frost/developer-manual/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
