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.
You must log in or register to comment.