diff --git a/mssql-simple.cabal b/mssql-simple.cabal
--- a/mssql-simple.cabal
+++ b/mssql-simple.cabal
@@ -1,13 +1,13 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.31.1.
+-- This file has been generated from package.yaml by hpack version 0.33.0.
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: c3913c68161411cf5ad4ae9ffcd5fa5e963bb712ac24926d73e96499a6f44b94
+-- hash: 5b1dbc750ccae76bdbfbc855bb9838d50c4bae7e9c66c2033f3ff4430dd31cd8
 
 name:           mssql-simple
-version:        0.6.0.0
+version:        0.6.0.1
 synopsis:       SQL Server client library implemented in Haskell
 description:    Please see the README on GitHub at <https://github.com/mitsuji/mssql-simple#readme>
 category:       Database
diff --git a/src/Database/MSSQLServer/Query/Template.hs b/src/Database/MSSQLServer/Query/Template.hs
--- a/src/Database/MSSQLServer/Query/Template.hs
+++ b/src/Database/MSSQLServer/Query/Template.hs
@@ -40,7 +40,11 @@
       [ ListP (map (\i ->VarP (mkName $ "m" <> show i)) [1..n])
       , ListP (map (\i ->VarP (mkName $ "b" <> show i)) [1..n])
       ]
+#if MIN_VERSION_template_haskell(2,16,0)
+      (NormalB (TupE (map (\i ->Just $ VarE (mkName $ "d" <> show i)) [1..n]) ))
+#else
       (NormalB (TupE (map (\i ->VarE (mkName $ "d" <> show i)) [1..n]) ))
+#endif
       (map d [1..n])
     , Clause [WildP,WildP] (NormalB (AppE
                                       (VarE 'error)
@@ -98,7 +102,11 @@
                      )
                  )
                  <>
+#if MIN_VERSION_template_haskell(2,16,0)
+                 [(NoBindS (AppE (VarE 'return) (TupE (map (\i->Just $ VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#else
                  [(NoBindS (AppE (VarE 'return) (TupE (map (\i->VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#endif
                )
              )
     ) []
@@ -136,7 +144,11 @@
                      (AppE (VarE (mkName "rpcResponseParser")) (if i==n then (ConE 'True) else (ConE 'False)))
                  )
                  <>
+#if MIN_VERSION_template_haskell(2,16,0)
+                 [(NoBindS (AppE (VarE 'return) (TupE (map (\i->Just $ VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#else
                  [(NoBindS (AppE (VarE 'return) (TupE (map (\i->VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#endif
                )
              )
     ) []
@@ -166,7 +178,11 @@
   [FunD (mkName "fromReturnValues")
    [Clause
      [ListP (map (\i ->VarP (mkName $ "r" <> show i)) [1..n])]
+#if MIN_VERSION_template_haskell(2,16,0)
+     (NormalB (TupE (map (\i ->Just $ VarE (mkName $ "d" <> show i)) [1..n])))
+#else
      (NormalB (TupE (map (\i ->VarE (mkName $ "d" <> show i)) [1..n])))
+#endif
 
      (map (\i->ValD (BangP (VarP (mkName $ "d" <> show i)))
                (NormalB (AppE
@@ -219,7 +235,11 @@
                      )
                  )
                  <>
+#if MIN_VERSION_template_haskell(2,16,0)
+                 [(NoBindS (AppE (VarE 'return) (TupE (map (\i->Just $ VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#else
                  [(NoBindS (AppE (VarE 'return) (TupE (map (\i->VarE (mkName $ "r" <> show i)) [1..n]) )) )]
+#endif
                )
              )
     ) []
