Closed diogob closed 10 months ago
I'm merging this one since it is backwards compatible and it seems that we are quite comfortable now with the direction it is taking. I'll hold the merge on the primitives type-safety for now. We also don't need to make any releases for now so we have some change to let ideas percolate with the current main branch code.
The goal here is to have primitives that don't need parsers and yet compose and handle errors in a similar way as domain functions do.
Unfortunately this won't provide true type safety on compositions, since these composable primitives will work with any
Composable
function types.However there are a few good use cases:
toComposable
with a fixed type on an already existing DF.fromComposable
and giving the parsers.without any sort of type-safety butwithout having to juggle awaits and exceptions.Inspired by the atmp library.
This PR is aiming at a "soft launch" where we can release a new version of the lib without breaking changes or any change in documentation.
TODO
traceFn
errors gracefullyComposable
compositions are type-safe (at least when all generics have been passed)