@@ -120,10 +120,13 @@ data OctetStream deriving Typeable
121class Accept ctype where
121class Accept ctype where
122 contentType :: Proxy ctype -> M.MediaType
122 contentType :: Proxy ctype -> M.MediaType
123+ contentType = NE.head . contentTypes
124 contentTypes :: Proxy ctype -> NE.NonEmpty M.MediaType
125 contentTypes :: Proxy ctype -> NE.NonEmpty M.MediaType
125 contentTypes = (NE.:| []) . contentType
126 contentTypes = (NE.:| []) . contentType
128+ {-# MINIMAL contentType | contentTypes #-}
127-- | @application/json@
130-- | @application/json@
128instance Accept JSON where
131instance Accept JSON where
129 contentType _ = "application" M.// "json"
132 contentType _ = "application" M.// "json"