Type-safe physical computations in Agda.
Check out the two .agda
files in /src/Quantities/Manuals/
on how to use this library:
- Units.agda : with examples on how to use the Units type.
- Physical.agda : with examples on how to use the Physical Quantities (PQ) type.
This library depends on the Agda-stdlib, in particular it was tested with agda-stdlib-1.7.1
.
- Clone the repository to a directory
$REPODIR
git clone https://github.com/SaverioMonaco/Agda-quantities.git $REPODIR
-
Locate your
$AGDA_DIR
, which for unix systems defaults to~/.agda
-
Append to
$AGDA_DIR/libraries
the following content:
$REPODIR/Agda-quantities/Quantities.agda-lib
- Append to
$AGDA_DIR/defaults
the following content:
Quantities
- If everything has been linked correctly, you should be able to use the Quantities library anywhere, to test it load the following line in a
.agda
file:
open import Quantities.Quantities
For more information: package-system
- Some of my personal notes GitHub repo
- Library Management agda.readthedocs.io
- Library for type-safe physical computations and unit conversions in Idris GitHub repo
- Agda-stdlib GitHub repo