From 021bcd9e237d5a489bb953ea9724414f6c65a200 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 16 May 2017 16:03:25 +0000 Subject: [PATCH] Document that EmptyAPI is, morally speaking, the unit of :<|> --- servant/src/Servant/API/Empty.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servant/src/Servant/API/Empty.hs b/servant/src/Servant/API/Empty.hs index 5aa5c0ab..d9b80787 100644 --- a/servant/src/Servant/API/Empty.hs +++ b/servant/src/Servant/API/Empty.hs @@ -6,5 +6,7 @@ import Data.Typeable (Typeable) import Prelude () import Prelude.Compat --- | An empty API: one which serves nothing. +-- | An empty API: one which serves nothing. Morally speaking, this should be +-- the unit of ':<|>'. Implementors of interpretations of API types should +-- treat 'EmptyAPI' as close to the unit as possible. data EmptyAPI = EmptyAPI deriving (Typeable, Eq, Show, Bounded)