git.iko.soy/typeable/http-api-data
on master help sign in
Fix GHC 7 builds
commit9cb90d5b5d8364d81f39441d6fe92fa5f72422a6 authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateWed 31 Aug 2016, 03:18 (10 years ago) parent4bc8d3e
1 file changed+4−6
src/Web/Internal/FormUrlEncoded.hs+4−6
src/Web/Internal/FormUrlEncoded.hs+4−6
@@ -21,12 +21,6 @@ import Control.Applicative
2121import Data.Traversable
2222#endif
2323
24−#if __GLASGOW_HASKELL__ < 800
25−import GHC.Exts (IsList (..))
26−#else
27−import GHC.Exts (IsList (..), Constraint)
28−import GHC.TypeLits
29−#endif
3024
3125import Control.Arrow ((***))
3226import Control.Monad ((<=<))
@@ -60,7 +54,9 @@ import Data.Void
6054import Numeric.Natural
6155#endif
6256
57+import GHC.Exts (IsList (..), Constraint)
6358import GHC.Generics
59+import GHC.TypeLits
6460import URI.ByteString (urlEncodeQuery, urlDecodeQuery)
6561
6662import Web.Internal.HttpApiData
@@ -255,6 +251,8 @@ data Proxy3 a b c = Proxy3
255251
256252type family NotSupported (cls :: k1) (a :: k2) (reason :: Symbol) :: Constraint where
257253#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" = ()
258256#else
259257 NotSupported cls a reason = TypeError
260258 ( 'Text "Cannot derive a Generic-based " ':<>: 'ShowType cls ':<>: 'Text " instance for " ':<>: 'ShowType a ':<>: 'Text "." ':$$: