git.iko.soy/typeable/servant
on master help sign in
S.Docs: added instance ToSample ()
69041ccSönke Hahn
src/Servant/Docs.hs+3
@@ -322,6 +322,9 @@ class HasDocs layout where
322class ToJSON a => ToSample a where
322class ToJSON a => ToSample a where
323 toSample :: Proxy a -> Maybe ByteString
323 toSample :: Proxy a -> Maybe ByteString
324
324
325+instance ToSample () where
326+ toSample Proxy = Just $ encode ()
327+
325-- | The class that helps us automatically get documentation
328-- | The class that helps us automatically get documentation
326-- for GET parameters.
329-- for GET parameters.
327--
330--