Home / Docs / Diagnostics

U7008: Invalid ita.una or itaty.una

Release v0.4.0

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:

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.unadiff
  ita demo
-   version 0.1
+   version 0.1.0
    edition 0.4

Failing example

ita.unauna
ita demo
  version 0.1
  edition 0.4
ita.lockuna
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0
src/demo.unauna
module demo

pub one() -> Int = 1

Fixed example

ita.unauna
ita demo
  version 0.1.0
  edition 0.4
ita.lockuna
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0
src/demo.unauna
module demo

pub one() -> Int = 1