on master help sign in
Document that EmptyAPI is, morally speaking, the unit of :<|>
021bcd9David Turner
servant/src/Servant/API/Empty.hs+3−1
@@ -6,5 +6,7 @@ import Data.Typeable (Typeable)
6import Prelude ()
6import Prelude ()
7import Prelude.Compat
7import Prelude.Compat
8
8
9−-- | An empty API: one which serves nothing.
9+-- | An empty API: one which serves nothing. Morally speaking, this should be
10+-- the unit of ':<|>'. Implementors of interpretations of API types should
11+-- treat 'EmptyAPI' as close to the unit as possible.
10data EmptyAPI = EmptyAPI deriving (Typeable, Eq, Show, Bounded)
12data EmptyAPI = EmptyAPI deriving (Typeable, Eq, Show, Bounded)