diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2015-05-23 16:10:16 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2015-05-23 16:10:16 -0400 |
commit | c1fd2daa41aa1b915f74b4c09c6e62c79320e8ec (patch) | |
tree | f0ce08eaa83bd5a47bf4bb7e030a48864cc1cf20 /LICENCE | |
parent | 374045f4a0c4aab339a49c4c4bd3dad7c813bf69 (diff) |
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 'LICENCE')
0 files changed, 0 insertions, 0 deletions