aboutsummaryrefslogtreecommitdiff
path: root/B.agda
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@mit.edu>2015-05-23 16:10:16 -0400
committerBenjamin Barenblat <bbaren@mit.edu>2015-05-23 16:10:16 -0400
commitc1fd2daa41aa1b915f74b4c09c6e62c79320e8ec (patch)
treef0ce08eaa83bd5a47bf4bb7e030a48864cc1cf20 /B.agda
parent374045f4a0c4aab339a49c4c4bd3dad7c813bf69 (diff)
Start implementing a Number moduleHEADmaster
The nascent Number module also serves as a proof of concept for dealing with records in the Agda standard library that are parameterized by levels instead of sets, like those in the Algebra hierarchy. These records are difficult to use as type classes, because Agda’s normal mechanism for generating type classes ('open SomeRecord ⦃...⦄') will make the levels the instance arguments, rather than the actual set the record’s functions operate on. To work around this, I defined wrapper records (effectively just named dependent pairs) parameterized in the way I desire. Each contains an underlying algebraic structure and a proof of type equality (usually just 'refl') between the parameter and the structure’s carrier. Then, I define functions over my wrapper record to rewrite with the type equality and use the underlying structure’s code. This work is related to standard library bug #35 <https://github.com/agda/agda-stdlib/issues/35>;; fixing this bug would obviate the need for my workaround.
Diffstat (limited to 'B.agda')
-rw-r--r--B.agda1
1 files changed, 1 insertions, 0 deletions
diff --git a/B.agda b/B.agda
index d6087d8..3e28f35 100644
--- a/B.agda
+++ b/B.agda
@@ -20,6 +20,7 @@ open import B.Prelude.Eq public
open import B.Prelude.Functor public
open import B.Prelude.List public
open import B.Prelude.Maybe public
+open import B.Prelude.Number public
open import B.Prelude.Product public
open import B.Prelude.String public
open import B.Prelude.Sum public