on master help sign in
Make MINIMAL contentType | contentTypes
commit148bb156355928f041d9d0e13f996fc586e0f3dc authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 11 Oct 2016, 08:11 (10 years ago) parentbf66b2b
1 file changed+3
servant/src/Servant/API/ContentTypes.hs+3
servant/src/Servant/API/ContentTypes.hs+3
@@ -120,10 +120,13 @@ data OctetStream deriving Typeable
120120--
121121class Accept ctype where
122122 contentType :: Proxy ctype -> M.MediaType
123+ contentType = NE.head . contentTypes
123124
124125 contentTypes :: Proxy ctype -> NE.NonEmpty M.MediaType
125126 contentTypes = (NE.:| []) . contentType
126127
128+ {-# MINIMAL contentType | contentTypes #-}
129+
127130-- | @application/json@
128131instance Accept JSON where
129132 contentType _ = "application" M.// "json"