A library for type-safe physical computations and unit conversions in Idris, ensuring dimensional correctness.
Quantities is a library for type-safe physical computations and unit conversions in the Idris programming language. It allows developers to define physical quantities, units, and measurements as types, ensuring that all operations respect dimensional correctness at compile time. This prevents common errors like adding incompatible units and enables reliable scientific and engineering calculations.
Idris developers working on scientific computing, engineering simulations, or any application requiring rigorous physical unit handling. It is particularly useful for those who need compile-time guarantees against unit errors.
Developers choose Quantities because it leverages Idris's dependent type system to provide compile-time safety for physical computations, eliminating runtime unit errors. Its comprehensive support for SI units, custom units, and conversions makes it a robust alternative to manual unit handling or less type-safe libraries.
Type-safe physical computations and unit conversions in Idris ⚖ 🌡 ⏲ 🔋 📐
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Idris's dependent types to enforce unit correctness at compile time, preventing errors like adding meters to seconds, as demonstrated in the README with type-indexed units.
Includes predefined SI base and derived units, imperial units, and non-SI units, covering a wide range of physical quantities without manual redefinition.
Allows defining custom elementary and derived units with conversion rates, shown with examples like 'Puppy' for happiness and 'Kitten' as 1.5 Puppy.
Integrates standard SI prefixes (e.g., nano, mega) for unit scaling, enabling concise representations like 'nano Metre' for values such as 180 nanometers.
Tied exclusively to Idris, a language with limited adoption and ecosystem, reducing available community support, libraries, and tooling compared to mainstream options.
Requires copying the package and installing via command line with 'idris --install', lacking integration with modern package managers or automated dependency handling.
README states compatibility only with Idris 1.3.1, which may not support newer versions like Idris 2, risking obsolescence and limiting access to language improvements.