this post was submitted on 04 Sep 2023
6 points (100.0% liked)

Haskell

65 readers
3 users here now

**The Haskell programming language community.** Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more... ### Links - Get Started with Haskell

founded 1 year ago
 

This post demonstrates how to outlaw specific return types from servant APIs. Perhaps we have types that are intended for backend use only, or maybe the types are legal in one API but illegal in another yet the backend code is a monolith. Whatever the reason, we can encode a type-level assertion over a servant API that produces a compile-time error if we ever accidentally add a sensitive type to the API.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here