Evaluate NoContent before rendering it, so it shows up as covered in coverage reports

This commit is contained in:
Tom Sydney Kerckhove 2022-05-02 13:10:05 +02:00
parent 5e1569e9e2
commit 4d7803bf19

View File

@ -295,7 +295,7 @@ instance {-# OVERLAPPABLE #-}
-- then this would be taken care of. However there is no more specific instance
-- between that and 'MimeRender JSON a', so we do this instead
instance {-# OVERLAPPING #-} ( Accept ctyp ) => AllMimeRender '[ctyp] NoContent where
allMimeRender _ _ = map (, "") $ NE.toList $ contentTypes pctyp
allMimeRender _ NoContent = map (, "") $ NE.toList $ contentTypes pctyp
where
pctyp = Proxy :: Proxy ctyp