Closed lucasdicioccio closed 5 years ago
@tibbe any comment about this MR?
I'm willing to provide a typeful layer above this one to enforce more type-safety between the construction and consuming sides, though it should probably go in another package where we can allow stricter GHC versions.
Closing in favour of #32.
Thanks @matth-
This change breaks consumers of the API, and maybe some old GHC/Base versions. (Built with
The Glorious Glasgow Haskell Compilation System, version 8.2.2
).I plan to wrap the new module with a type-fancy layer (either in this package or in another package) for a stronger guarantee that the dimensions passed to
lookupOrCreate
are correct (possibly saving a runtime check about dimension lengths).Minimal compatibility patches to demonstrate the feature are provided for
ekg-json
andekg
.The example works and displays individual curves flattening the dimensions as follows.
I'm more interested in providing support into
ekg-core
thanekg
. Though, I don't mind doing a bit more. In particular, one annoying issue of my current design is the lack of "forced ordering" on the key/value pairs for the dimensions: thus preventing theekg
Snap layer to guess the HashMap key for retrieving a particular Sample value (but I'm not aware of users of this Snap route and I would suggest to drop the feature rather than complexifying theekg-core
logic for no users).