"  (define my-fn (lambda (a b) (+ a b)))"
"DocParser get_exports extracts module exports"
"DocParser skips standalone sections without definitions"
"  ;;' This section has prose but no following definition."
"parse_text parses annotations from string input"
"(module str-mod
  (export add)

  ;;' @description Add two numbers together.
  ;;' @examples
  ;;' (add 1 2)  ; => 3
  (define add (lambda (a b) (+ a b)))
)"
"string-input modules get annotation-based docs via eval_text"
"(module str-ann-mod
  (export greet)

  ;;' @description Create a greeting message.
  ;;' @examples
  ;;' (greet \"world\")  ; => \"hello, world\"
  (define greet (lambda (name) (string-append \"hello, \" name)))
)"
"annotation-based docs are available via compiler"
"  ;;' @description Add two numbers together."
"DocParser loads reference docs and filters by kind"
"@param tags produce arl_doc$arguments via compiler"

annotation-based docs are available via compiler

<arl_error/error/condition>
Error: File not found: D:	emp\2026_02_23_11_20_16_15377\Rtmp4WUrHm\filee1810e48f3.arl

@param tags produce arl_doc$arguments via compiler

<arl_error/error/condition>
Error: File not found: D:	emp\2026_02_23_11_20_16_15377\Rtmp4WUrHm/test_cache_module.arl

# Covers circular imports, module caching, error cleanup
test_that("import non-existent module fails gracefully", {
test_that("same file imported with different path strings uses one module (absolute path alias)", {
path_abs <- normalizePath(module_file, winslash = "/", mustWork = TRUE)
engine$eval(engine$read(sprintf('(import "%s" :refer :all)', path_abs))[[1]], env = env)
n_after_first <- engine$eval(engine$read("(getn)")[[1]], env = env)
engine$eval(engine$read(sprintf('(import "%s" :refer :all)', path_rel))[[1]], env = env)
n_after_second <- engine$eval(engine$read("(getn)")[[1]], env = env)
test_that("module is cached after first load", {
# Second load - should still get cached value
# (Note: actual caching behavior depends on implementation)
test_that("load returns last value from module", {
result <- engine$eval_text(sprintf('(load "%s")', module_path))
# Should return 30 (the last expression)
test_that("load with syntax error in module", {
test_that("load with runtime error in module", {
# Create a module that errors at runtime
test_that("multiple loads of same module", {
test_that("load can access previously defined symbols", {
# Create a module that uses predefined symbols
test_that("circular import dependency produces clear error", {
on.exit(unlink(temp_dir, recursive = TRUE), add = TRUE)
# Module A imports B, Module B imports A
"Circular dependency detected: circ-a -> circ-b -> circ-a"
test_that("import-runtime is reserved and errors", {
# Loading empty module should succeed and return NULL or similar
# Result behavior may vary - just ensure no crash
test_that("load module with only comments", {