Merge pull request #671 from reactormonk/typeerror

TypeError annotations for AllCTRender
This commit is contained in:
Oleg Grenrus 2017-05-14 19:38:46 +03:00 committed by GitHub
commit 57696dcd6f

View File

@ -98,6 +98,10 @@ import Web.FormUrlEncoded (FromForm, ToForm,
import Prelude ()
import Prelude.Compat
#if MIN_VERSION_base(4,9,0)
import qualified GHC.TypeLits as TL
#endif
-- * Provided content types
data JSON deriving Typeable
data PlainText deriving Typeable
@ -182,6 +186,12 @@ instance OVERLAPPABLE_
amrs = allMimeRender pctyps val
lkup = fmap (\(a,b) -> (a, (fromStrict $ M.renderHeader a, b))) amrs
#if MIN_VERSION_base(4,9,0)
instance TL.TypeError ('TL.Text "No instance for (), use NoContent instead.")
=> AllCTRender '[] () where
handleAcceptH _ _ _ = error "unreachable"
#endif
--------------------------------------------------------------------------
-- * Unrender