Skip to content

Commit

Permalink
Fix compilation error on GHC 9.2 (#4263)
Browse files Browse the repository at this point in the history
```
src/Cardano/Wallet/DB/Layer.hs:872:14: error:
    * Couldn't match type: forall a1. SqlPersistT IO a1 -> IO a1
                     with: SqlPersistT IO (Maybe W.WalletId) -> IO (Maybe W.WalletId)
      Expected: SqliteContext
                -> SqlPersistT IO (Maybe W.WalletId) -> IO (Maybe W.WalletId)
        Actual: SqliteContext -> forall a. SqlPersistT IO a -> IO a
    * In the expression: runQuery
      In the fifth argument of `withSqliteContextFile', namely
        `(`runQuery` readWalletId)'
      In the second argument of `(<$>)', namely
        `withSqliteContextFile
           (contramap MsgDB tr) dbFile noManualMigration noMigration
           (`runQuery` readWalletId)'
    |
872 |             (`runQuery` readWalletId)
```
And for some reason this helps.
  • Loading branch information
Anviking authored Nov 24, 2023
2 parents fa821b9 + 6c141c8 commit ec442aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/wallet/src/Cardano/Wallet/DB/Layer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}

{- HLINT ignore "Use section" -}

-- |
-- Copyright: © 2018-2020 IOHK
-- License: Apache-2.0
Expand Down Expand Up @@ -868,7 +870,7 @@ withTestLoadDBLayerFromFile tr ti dbFile action = do
dbFile
noManualMigration
noMigration
(`runQuery` readWalletId)
(flip runQuery readWalletId)
case mwid of
Nothing -> fail "No wallet id found in database"
Just wid -> do
Expand Down

0 comments on commit ec442aa

Please sign in to comment.