Daniel Díaz Carrete
Daniel Díaz Carrete
A Backpack solution would probably look like this: an abstract internal library which imported a signature for the types that changed between versions. Another internal library for the different implementations...
> Bzzzzt. Elasticsearch versions matter big time. You've got the use-case backwards. This is about code-reuse internally, not hiding the differences in representation or the version used for the user....
@bytemyapp I put up a crude proof-of-concept here: https://github.com/danidiaz/bloodhound/tree/done I used Cabal 2.2 because I'm not sure about the current level of support of Backpack in Stack. The example defines...
Including the laws (so that people who encounter the package can recognize and create their own ideal monads) would be fine.
When promptness and resource management are an issue, I like to have continuation-accepting or `Managed`-returning function variants, like streamWithOptionsAndParser :: (ToRow params, MonadMask m) => FoldOptions -> RowParser row ->...
One small additional comment about this issue: I've just realised that record pattern synonyms can come in handy when constructing sum-of-products representations. For example: ``` {-# language DeriveGeneric #-} {-#...
Come to think of it, "either the first success or the combination of all the errors" is what the proposed `Monoid` instance for `ConcurrentlyE` does, if you flip the error...
[Using `fixRecord` for dependency injection](https://github.com/danidiaz/effectiviwonder/blob/2c20f0f59c951dd7e006cbba813c3cdba24b788c/tests/tests.hs#L115).
Instead of `(->) (Record I t)`, perhaps it would be better to use `ReaderT m (Record I t)` and make it work over any `m` that is an instance of...
A possible implementation for key lookups (should the error go in the precondition instead?): instance KeyHelper GT k E v' right where type Value' GT k E v' right =...