Module com.darkcollective.relix.function


module com.darkcollective.relix.function
The function SPI: the description of a scalar function or aggregate that the engine reasons about, and the seam through which an implementation is supplied.

A FunctionLibrary is discovered with ServiceLoader and offers ScalarFunctions and AggregateFunctions; FunctionCatalog indexes them by name. The uses declaration lives here, with the discovery it belongs to, so a consumer asks the catalogue rather than repeating the service declaration.

The module requires both halves of what a function definition is written in: the type system a signature is stated in (relix-symbol) and the values an implementation takes and returns (relix-value). That pair is why the SPI is a module of its own — a value reports the scalar type it maps onto, so the value hierarchy already depends on the type system, and hosting the SPI there would need the edge back.