feat(users/Profpatsch/my-prelude): add builder & divisible helpers

I’ve had enough of `show & stringToText` bullshit, let’s finally
create a trivial builder contravariant module that wraps
`Text.Builder` and `ByteString.Builder` and has a naming scheme that
does not collide with anything and that I can remember in my sleep.

Plus some experiments in making `Divisible` useful with `HasField`.

Change-Id: Ie25f78226d24eadf4c35353fe9db40b7683d82c3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12955
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2025-01-05 02:50:30 +01:00
parent a14a7e6ec9
commit 444b67b010
5 changed files with 146 additions and 0 deletions

View file

@ -7,8 +7,10 @@ pkgs.haskellPackages.mkDerivation {
src = depot.users.Profpatsch.exactSource ./. [
./my-prelude.cabal
./src/Aeson.hs
./src/Builder.hs
./src/Comparison.hs
./src/Debug.hs
./src/Divisive.hs
./src/Json.hs
./src/Json/Enc.hs
./src/Arg.hs
@ -34,6 +36,7 @@ pkgs.haskellPackages.mkDerivation {
pkgs.haskellPackages.pa-pretty
pkgs.haskellPackages.pa-field-parser
pkgs.haskellPackages.aeson-better-errors
pkgs.haskellPackages.contravariant
pkgs.haskellPackages.foldl
pkgs.haskellPackages.resource-pool
pkgs.haskellPackages.error