Pins fieldtest finding B1 (docs/specs/2026-05-10-fieldtest-floats.md).
DESIGN.md and JOURNAL Floats.3 promise that pattern-matching on a
Float literal is hard-rejected at typecheck via
CheckError::FloatPatternNotAllowed, but the rejection only fires when
typecheck is reached directly. The full check pipeline runs
ailang_core::desugar::desugar_module first, and build_eq rewrites
Pattern::Lit { Literal::Float } arms into (== scrutinee 1.5_FLOAT)
before typecheck — so the existing iter-3.4 reject arm at lib.rs:2316
is unreachable on input flowing through check / check_module /
check_workspace.
The existing reject_float_pattern_in_match test in builtins.rs calls
synth(...) directly on a hand-built Term::Match, bypassing desugar; it
passes today but does not protect the spec'd property. This new test
exercises check(&m) end-to-end and asserts the FloatPatternNotAllowed
error — currently fails because check returns Ok(CheckedModule).
GREEN side handed off to skills/implement mini-mode.
Three classes of fix from the LLVM-IR audit:
1. != on Float: fcmp une, NOT fcmp one. one is 'ordered and not
equal' (false for nan!=nan, breaks IEEE / user-fixed constraint).
une is 'unordered or not equal' (true for nan!=nan, matches IEEE
and Rust f64::ne).
2. crates/ailang-codegen/src/synth.rs touches the Float primitive at
five sites the original spec missed: llvm_type, builtin_ail_type,
builtin_effect_op_ret, type_descriptor (descriptor 'Fl' to avoid
collision with ADT-name F-prefix), builtin_binop (becomes a
transitional artefact, replaced by type-dispatched helper).
3. Float literals lower as LLVM hex-float syntax (double 0x4014...);
nan/inf/neg_inf as direct SSA double constants at use site (NOT
via the __unreachable__ analogue, which is a terminator
instruction not a value); container slot layout precision
(monomorphisation vs bitcast).
Mainstream-aligns the Float surface: + - * / < <= > >= become
forall-quantified with codegen-dispatch on Int|Float (parallel to
today's == path), instead of the original draft's wort-style
fadd/flt/etc. Adds nan/inf/neg_inf as builtin constants and
is_nan : (Float) -> Bool. % stays Int-only (no fmod yet).
Iteration plan now flags iter 3 and iter 4 as widening passes
that must hold the no-Int-regression line.