Home / Docs / Diagnostics
U7008: Invalid ita.una or itaty.una
ita.una or itaty.una holds an error. U7008 reports it at its line.
Why Una rejects it
From edition 0.4, a package describes itself in ita.una, and a workspace in itaty.una (ADR 0122, spec/30). Both are written in Una's own lexical syntax, by a closed grammar: a head ita <name> with its version and edition lines, then sections in a fixed order (sources, needs, replace, trust, labels, trusted, escapes, boundaries, contracts, run, drive, serve). Nothing in them is evaluated: there are no expressions, no interpolation and no includes.
U7008 reports, at its line:
- a syntax error,
- an unknown, repeated or misplaced line or section,
- a value of the wrong form or out of range,
- an edition before
0.4, - a directory that holds both
ita.unaanduna.toml, - a reserved local name,
- a
from gitorigin, - a
foreignsection or grant, - an invalid limit line under a grant (a form other than
at most <n> per second,minuteorhour,at most <n> at onceandwaiting at most <n>, a count below 1 or above 2147483647, a limit under a grant other thanhttp, or a kind of limit given twice; ADR 0117 rule 8, spec/27 §9), - every error that
una.tomlreports as U7002 for the setting it corresponds to, and - a
requires, or a refined parameter or result type, onhandleoron_stopof the module aservesection names, or oninit,steporon_stopof the module adrivesection names, a precondition that no call of the host establishes (spec/31 §7, spec/26 §2).
For a drive module, a refinement inside a type argument counts too, as in step(edit state: Option[Pos], input: Tick) with kind Pos = Int where it > 0: the host hands the state on by its type without its refinements.
The repair at a glance
ita demo
- version 0.1
+ version 0.1.0
edition 0.4Failing example
ita demo
version 0.1
edition 0.4lock 1
solver
encoding "una-smt-1"
name "z3"
version "5.1.0"
logic "QF_UFLIA"
steps 5000000
seed 0module demo
pub one() -> Int = 1Fixed example
ita demo
version 0.1.0
edition 0.4lock 1
solver
encoding "una-smt-1"
name "z3"
version "5.1.0"
logic "QF_UFLIA"
steps 5000000
seed 0module demo
pub one() -> Int = 1