Skip to content

Conversation

@sharkdp
Copy link
Owner

@sharkdp sharkdp commented Jan 10, 2026

For now, this adds the necessary infrastructure to give FFI functions access to the inferred return type (Length) for a given call site:

let length: Length = parse("1.5 km")

It turns out the more challenging problem is to do the actual parsing. Quantities can be arbitrarily complex (-1.234e-5 kg m / s²), so we really want to use the actual parser here. But then we also need to run the type checker and a limited form of the interpreter to get the actual value and unit.

see #773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants