The original Doodle model was that you start by fixing the Algebra operations you want to use , and then write everything to that fixed Algebra. In practice this doesn't work so well when combining different systems and we can be much more flexible. This will avoid a lot of type inference issues, particularly when writing cross-backend code, at the cost of more work for implementors of algebras (i.e. me). This is a reasonable trade-off.
The essential thing is that operations should accept some Alg and return Alg with TheStuffINeed.
The original Doodle model was that you start by fixing the
Algebra
operations you want to use , and then write everything to that fixedAlgebra
. In practice this doesn't work so well when combining different systems and we can be much more flexible. This will avoid a lot of type inference issues, particularly when writing cross-backend code, at the cost of more work for implementors of algebras (i.e. me). This is a reasonable trade-off.The essential thing is that operations should accept some
Alg
and returnAlg with TheStuffINeed
.