I think sometimes #Haskell's fights lazy/write maintainable code (an ecosystem problem?).

I just wanted to turn arbitrary data types with record syntax into key/value Text pairs. Otherwise I'd need to tediously maintain (and probably be open to mistakes and inconsistencies) boilerplate for each such type.

I'm doing this because I want to make some type(s) {{accessible}} to a templating system.

Look how complicated it is: gist.github.com/someodd/b717a1

Please tell me I'm wrong/show me a better way.

Follow

@someodd It looks... reasonable? You can shuffle a few calls here and there, but it's just a few lines of code.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.