File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed
Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 2727 timeout-minutes :
2828 60
2929 container :
30- image : buildpack-deps:bionic
30+ image : buildpack-deps:jammy
3131 services :
3232 postgres :
3333 image : postgres:14
Original file line number Diff line number Diff line change 1+ # hpqtypes-1.12.1.0 (????-??-??)
2+ * Switch from ` readline ` to ` haskeline ` , to make example compile with newer
3+ Cabal versions.
4+
15# hpqtypes-1.12.0.0 (2024-03-18)
26* Drop support for GHC 8.8.
37* Attach ` CallStack ` and ` BackendPid ` to ` DBException ` .
Original file line number Diff line number Diff line change 1+ distribution: jammy
12branches: master
23doctest: False
34tests: True
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import Control.Arrow (second)
44import Control.Monad
55import Control.Monad.Base
66import Control.Monad.Catch
7- import Data.Function
7+ import Control.Monad.IO.Class ( liftIO )
88import Data.Int
99import Data.Monoid.Utils
1010import Data.Pool
1111import Data.Text qualified as T
1212import Database.PostgreSQL.PQTypes
1313import Database.PostgreSQL.PQTypes.Internal.Utils (mread )
14- import System.Console.Readline
14+ import System.Console.Haskeline
1515import System.Environment
1616
1717-- | Generic 'putStrLn'.
@@ -144,13 +144,14 @@ catalog = do
144144 cs <- getConnSettings
145145 withCatalog cs $ do
146146 ConnectionSource pool <- poolSource (cs {csComposites = [" book_" ]}) (\ connect disconnect -> defaultPoolConfig connect disconnect 1 10 )
147- fix $ \ next ->
148- readline " > "
147+ runInputT defaultSettings (loop pool)
148+ where
149+ loop pool = do
150+ getInputLine " > "
149151 >>= maybe
150- (printLn " " )
152+ (outputStrLn " " )
151153 ( \ cmd -> do
152154 when (cmd /= " quit" ) $ do
153- processCommand pool cmd
154- addHistory cmd
155- next
155+ liftIO $ processCommand pool cmd
156+ loop pool
156157 )
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ test-suite hpqtypes-tests
197197 , monad-control >= 1.0.3
198198 , mtl >= 2.1
199199 , random >= 1.0
200- , readline >= 1.0.3.0
200+ , haskeline
201201 , resource-pool >= 0.4
202202 , scientific
203203 , test-framework >= 0.8
You can’t perform that action at this time.
0 commit comments