Mon Apr 8 08:14:45 EDT 2019
Ad hoc collections
I've not run into this a whole lot yet. Maybe up to now, everything I
did had a lot of intrinsic structure, where all the arbitraryness was
at the data end, not the type end.
Maybe it is best to keep it like that?
Anwyay, I need a struct with many members, and a simple way to extend
A dictionary seems to be the proper abstraction for this, but there is
also record syntax.
So how to represent a dictionary in Haskell?
EDIT: Just use data or newtype, and use ad-hoc bundling in pairs.
That provides enough type brittleness to organize things.
Pairs, because instantiation is somewhat arbitrary, so it's ok to just
use arbitrary "pass through types" instead of using an environment monad.