GADT - real-world use cases - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Sridhar Ratnakumar

GADTs are used in reflex apps to model request / response types, and pass them in the wire (websockets, etc.) as JSON. This library just released to tie it all together: https://github.com/reflex-frp/reflex-gadt-api

Interact with a JSON-serialized API defined by a GADT in your reflex-dom application - reflex-frp/reflex-gadt-api
Rizary

finally, do you think this library will replace the need on Servant in reflex world?

Sridhar Ratnakumar

This existed in rhyolite for a long while anyway. I never needed servant.

Rizary

nice... I wanted to remove Servant from my head nowadays

codygman

I find servant really nice, why do you want to remove it besides being able to have an "isomorphic app"?

Rizary

I find it nice too.. I just don't want it for my next reflex project because it feels too cumbersome for me when develop the project with it. Also, I have another project using another frontend beside haskell (GHCJS), and I feel I don't need servant in my backend. It's a matter of preference though.