Lynx.Lean (Lynx v0.1.0)

Copy Markdown View Source

Lean source with its original file, span, and indentation.

Import this module to use ~LEAN. Lynx.Laws and Lynx.Case import it automatically. The resulting value can be stored in variables or attributes.

Summary

Functions

Reads Lean source from a file, such as shared tactics loaded with prelude.

Builds Lean source from a literal inline string or heredoc, without modifiers.

Types

t()

@type t() :: %Lynx.Lean{
  file: String.t(),
  indentation: non_neg_integer(),
  source: String.t(),
  span: pos_integer() | {pos_integer(), pos_integer()}
}

Functions

from_file!(path)

@spec from_file!(Path.t()) :: t()

Reads Lean source from a file, such as shared tactics loaded with prelude.

Diagnostics point to the file itself. Relative paths are expanded against the current working directory.

sigil_LEAN(arg1, arg2)

(macro)

Builds Lean source from a literal inline string or heredoc, without modifiers.