TypeError annotations for AllCTRender
This commit is contained in:
parent
555b60ea06
commit
b3be590dad
2 changed files with 11 additions and 1 deletions
|
@ -98,6 +98,10 @@ import Web.FormUrlEncoded (FromForm, ToForm,
|
||||||
import Prelude ()
|
import Prelude ()
|
||||||
import Prelude.Compat
|
import Prelude.Compat
|
||||||
|
|
||||||
|
#if MIN_VERSION_base(4,9,0)
|
||||||
|
import qualified GHC.TypeLits as TL
|
||||||
|
#endif
|
||||||
|
|
||||||
-- * Provided content types
|
-- * Provided content types
|
||||||
data JSON deriving Typeable
|
data JSON deriving Typeable
|
||||||
data PlainText deriving Typeable
|
data PlainText deriving Typeable
|
||||||
|
@ -180,6 +184,12 @@ instance OVERLAPPABLE_
|
||||||
amrs = allMimeRender pctyps val
|
amrs = allMimeRender pctyps val
|
||||||
lkup = fmap (\(a,b) -> (a, (fromStrict $ M.renderHeader a, b))) amrs
|
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
|
-- * Unrender
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,4 @@ extra-deps:
|
||||||
- hspec-core-2.3.2
|
- hspec-core-2.3.2
|
||||||
- hspec-wai-0.8.0
|
- hspec-wai-0.8.0
|
||||||
- hspec-expectations-0.8.2
|
- hspec-expectations-0.8.2
|
||||||
resolver: lts-6.27
|
resolver: lts-7.15
|
||||||
|
|
Loading…
Add table
Reference in a new issue