git.iko.soy/typeable/http-api-data
on master help sign in
Fix GHC 7 builds
9cb90d5Nickolay Kudasov
src/Web/Internal/FormUrlEncoded.hs+4−6
@@ -21,12 +21,6 @@ import Control.Applicative
21import Data.Traversable
21import Data.Traversable
22#endif
22#endif
23
23
24−#if __GLASGOW_HASKELL__ < 800
25−import GHC.Exts (IsList (..))
26−#else
27−import GHC.Exts (IsList (..), Constraint)
28−import GHC.TypeLits
29−#endif
30
24
31import Control.Arrow ((***))
25import Control.Arrow ((***))
32import Control.Monad ((<=<))
26import Control.Monad ((<=<))
@@ -60,7 +54,9 @@ import Data.Void
60import Numeric.Natural
54import Numeric.Natural
61#endif
55#endif
62
56
57+import GHC.Exts (IsList (..), Constraint)
63import GHC.Generics
58import GHC.Generics
59+import GHC.TypeLits
64import URI.ByteString (urlEncodeQuery, urlDecodeQuery)
60import URI.ByteString (urlEncodeQuery, urlDecodeQuery)
65
61
66import Web.Internal.HttpApiData
62import Web.Internal.HttpApiData
@@ -255,6 +251,8 @@ data Proxy3 a b c = Proxy3
255
251
256type family NotSupported (cls :: k1) (a :: k2) (reason :: Symbol) :: Constraint where
252type family NotSupported (cls :: k1) (a :: k2) (reason :: Symbol) :: Constraint where
257#if __GLASGOW_HASKELL__ < 800
253#if __GLASGOW_HASKELL__ < 800
254+ -- this is just a placeholder case for older GHCs to not freak out on an empty closed type family
255+ NotSupported cls a "this type family is actually empty" = ()
258#else
256#else
259 NotSupported cls a reason = TypeError
257 NotSupported cls a reason = TypeError
260 ( 'Text "Cannot derive a Generic-based " ':<>: 'ShowType cls ':<>: 'Text " instance for " ':<>: 'ShowType a ':<>: 'Text "." ':$$:
258 ( 'Text "Cannot derive a Generic-based " ':<>: 'ShowType cls ':<>: 'Text " instance for " ':<>: 'ShowType a ':<>: 'Text "." ':$$: