@@ -1,4 +1,7 @@
11{-# LANGUAGE CPP, DeriveGeneric, OverloadedStrings, ScopedTypeVariables, TemplateHaskell #-}
2+#if __GLASGOW_HASKELL__ >= 708
3+{-# LANGUAGE DataKinds #-}
4+#endif
25
36{-# OPTIONS_GHC -fno-warn-deprecations #-}
47
@@ -233,6 +236,10 @@ jsonEncoding = [
233236 , assertEqual "Just Nothing" "null" $ encode (Just Nothing :: Maybe (Maybe Int))
234237 , assertEqual "Proxy Int" "null" $ encode (Proxy :: Proxy Int)
235238 , assertEqual "Tagged Char Int" "1" $ encode (Tagged 1 :: Tagged Char Int)
239+#if __GLASGOW_HASKELL__ >= 708
240+ -- Test Tagged instance is polykinded
241+ , assertEqual "Tagged 123 Int" "1" $ encode (Tagged 1 :: Tagged 123 Int)
242+#endif
236243 , assertEqual "Const Char Int" "\"c\"" $ encode (Const 'c' :: Const Char Int)
237244 , assertEqual "Tuple" "[1,2]" $ encode ((1, 2) :: (Int, Int))
238245 , assertEqual "NonEmpty" "[1,2,3]" $ encode (1 :| [2, 3] :: NonEmpty Int)