git.iko.soy/rowtype-yoga/purescript-yoga-fetch-om
on main help sign in
Type-safe client derivation with open Om rows

Thread ctx and extraErr through DeriveClient/DeriveClientRL/DeriveClientFn so derived clients have open Om rows without unsafeCoerce on the record. Arguments (path params, headers, body) are properly constrained. Om context and error rows are open — no # expand needed at call sites. Only the Om value inside impl is coerced (Record () ctx, closed open err), which is safe because clients never read context and Variant widening is a no-op at runtime. Add 5 compile-fail tests proving wrong args are rejected: - wrong field name, wrong field type, extra field, missing field, bogus sig

commit059b4f585d3bbccc30ccf7dd68d893cf20111ef0 authorMark <mark.eibes@gmail.com> dateSat 18 Apr 2026, 13:46 (5 months ago) parent0bb3fac
1 file changed+12
test-compile-fail/cases/ClientNoArgsPassedArg.purs+12
test-compile-fail/cases/ClientNoArgsPassedArg.pursnew file+12
@@ -0,0 +1,12 @@
1+module Test.CompileFail.ClientNoArgsPassedArg where
2+
3+import Yoga.Fetch.Om (GET, Route, client)
4+import Yoga.Om (Om)
5+
6+type HealthRoute = Route GET "health" {} (ok :: { body :: String })
7+type TestAPI = { health :: HealthRoute }
8+
9+api = client @TestAPI "http://localhost:3000"
10+
11+wrong :: forall ctx err. Om ctx err String
12+wrong = api.health "should not accept this"