From b7d19d84ff1ec0cefd899ae7349fe804820d5eab Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 29 Oct 2021 09:35:16 -0500 Subject: [PATCH] Fix build on GHC 9.0.1 --- src/Database/ODBC/Internal.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Database/ODBC/Internal.hs b/src/Database/ODBC/Internal.hs index 23fd968..8ffc573 100644 --- a/src/Database/ODBC/Internal.hs +++ b/src/Database/ODBC/Internal.hs @@ -407,10 +407,11 @@ withExecDirect dbc string params cont = -- | Run the function with a statement. withStmt :: Ptr EnvAndDbc -> (forall s. SQLHSTMT s -> IO a) -> IO a -withStmt hdbc = +withStmt hdbc cont = bracket (assertNotNull "odbc_SQLAllocStmt" (odbc_SQLAllocStmt hdbc)) odbc_SQLFreeStmt + cont -- | Run an action in a bound thread. This is neccessary due to the -- interaction with signals in ODBC and GHC's runtime.