Outlawing return types in Servant APIs

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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • tacticalgear
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • khanakhh
  • Youngstown
  • ngwrru68w68
  • slotface
  • everett
  • rosin
  • thenastyranch
  • kavyap
  • GTA5RPClips
  • cisconetworking
  • JUstTest
  • normalnudes
  • osvaldo12
  • ethstaker
  • mdbf
  • modclub
  • Durango
  • tester
  • provamag3
  • cubers
  • Leos
  • anitta
  • megavids
  • lostlight
  • All magazines