You are encountering a known limitation of derived Atomable instances in
that they cannot support subrelations. We struggled with how Atomable
would function with an optional subrelation type variable, but
ultimately gave up on trying to make it work. I'm open to suggestions on
how to improve it though- perhaps a separate Atomable instance for
nested relations or type family could resolve this?
To resolve your immediate issue without changes to Project:M36, you'll
need to implement your own Tupleable instance for MkReturn and Atomable
instance for NaiveReturn. I can help with that if you like, but an LLM
could probably generate it easily.
Keep in mind that Atomable and Tupleable are just utilities to save on
code. You could just as easily write:
executeDatabaseExpr session dbconn (Insert "rv" (MakeRelationFromExprs
Nothing [TupleExprs () [TupleExpr (M.fromList [("description",TextAtom
(description ret)), ("example", TextAtom (example ret)),...
Cheers,
M