I've put together this package to decompose high level business problems into components by type applications and then fill in the blanks with simpler functions. I've managed to simplify some of my own programs with it and so far I quite like the approach.
This allows you to work up a solution to a domain problem backwards, by running
the program you intend to solve directly and using holes to guide the
requirements.
btw, I'm sure you intend to "fix" some of these, but I think it would help for the example to have as little non-library related code in it (e.g. no optics/dhall/etc), and more importantly for the library to not depend on polysemy-zoo (it's heavy!)
I've put together this package to decompose high level business problems into components by type applications and then fill in the blanks with simpler functions. I've managed to simplify some of my own programs with it and so far I quite like the approach.
https://hackage.haskell.org/package/polysemy-methodology
I'd love to get the thoughts of the polysemy devs on any improvements that might make sense here.
I think an example of this
would be nice
very interesting, but some examples are definitely in order :grinning:
how is the function in the readme of type
* -> Constraint
?My README is wrong, sec. I'll fix that and write up an example.
Ok there's more readme now.
you forgot something at
A CollectionsPackage indicates.
btw you don't have to release a new version to update the docs!
Oh, I didn't know that. :)
yeah, I should work with
cabal publishDoc
Thanks
very nice! it has a sort of stream transducer feeling to it.
Thanks I don't know what that is but it's going on my list
something like conduit, streaming, streamly
wonder how this would look with a
Stream
as the final monaddo you mean to have a Stream of interpreters?
though only conduit would be considered to have transducer semantics, right?
no, stream of
Input
/Output
valuesI think this is really cool btw, it takes something that is "a software engineering practice" and reifies it into a language construction!
this is how you sell polysemy to your product owner
Tyvm
btw, I'm sure you intend to "fix" some of these, but I think it would help for the example to have as little non-library related code in it (e.g. no optics/dhall/etc), and more importantly for the library to not depend on
polysemy-zoo
(it's heavy!)probably better to copy the KVStore into the project
Yeah I'll try and think of something neater as an example. Why is KVStore not in the main library? I use it a lot.
good question!
I also use KVStore (Path Rel File) ByteString as a filesystem.
good point, I've reimplemented that, should use KVStore!
if you'd make a PR puling KVStore into polysemy, I'm sure it would be welcome!
cool, I will
ah, also the HList type is from the zoo as well, although that's kind of fine to reimplement I think
Added the ability to intercept the start and end of each submethodology to do bracketed tracing. https://hackage.haskell.org/package/polysemy-methodology