Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Uri (URI Atom)

Definition

Uri Text

Fields

FieldTypeDescription
contentsTextThe URI string

Nix Source ↔ AST

# Nix
https://example.com

# AST (wrapped in Constant)
{
  "tag": "Constant",
  "contents": { "tag": "Uri", "contents": "https://example.com" }
}

Note

In Nix, URIs are a distinct literal type (not strings). They are written without quotes and must be valid URIs.

  • Constant: wrapper for atoms in expressions

Nix Library Access

syntax.mkUri "https://example.com"
syntax.mkConstant (syntax.mkUri "https://example.com")