Sean Leather (Sep 06 2018 at 11:26):
On #316, there are the following comments:
The first is that this may encourage us to overuse
subtypes at the expense of bespoke structures.
But somehow a bare
sigmafeels so low-level. Would it make any sense to replace it with a generic bundled structure? I guess it's basically the same thing...
I bring this up here because it is off-topic for that particular issue but is still an issue that I've wondered about myself.
In my finmap work, I've been using
sigma as a singleton mapping between a key and value used in association lists and
finmap itself. This is partly because it's already done in
hash_map and partly because it's just the right type for the job. As far as the library goes, it works perfectly.
But in usage, it means that whatever I insert, I must use
sigma instead of a custom
structure. I then end up defining a type that is defeq
sigma. I'd rather use a custom
structure that then provides the appropriate interface used by the library. But I'm not sure if this is desirable or how best to do it. I can think of possibly using a type class or an equivalence.
Last updated: May 18 2021 at 16:25 UTC