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 27
27
timeout-minutes :
28
28
60
29
29
container :
30
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:jammy
31
31
services :
32
32
postgres :
33
33
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
+
1
5
# hpqtypes-1.12.0.0 (2024-03-18)
2
6
* Drop support for GHC 8.8.
3
7
* Attach ` CallStack ` and ` BackendPid ` to ` DBException ` .
Original file line number Diff line number Diff line change
1
+ distribution: jammy
1
2
branches: master
2
3
doctest: False
3
4
tests: True
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import Control.Arrow (second)
4
4
import Control.Monad
5
5
import Control.Monad.Base
6
6
import Control.Monad.Catch
7
- import Data.Function
7
+ import Control.Monad.IO.Class ( liftIO )
8
8
import Data.Int
9
9
import Data.Monoid.Utils
10
10
import Data.Pool
11
11
import Data.Text qualified as T
12
12
import Database.PostgreSQL.PQTypes
13
13
import Database.PostgreSQL.PQTypes.Internal.Utils (mread )
14
- import System.Console.Readline
14
+ import System.Console.Haskeline
15
15
import System.Environment
16
16
17
17
-- | Generic 'putStrLn'.
@@ -144,13 +144,14 @@ catalog = do
144
144
cs <- getConnSettings
145
145
withCatalog cs $ do
146
146
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 " > "
149
151
>>= maybe
150
- (printLn " " )
152
+ (outputStrLn " " )
151
153
( \ cmd -> do
152
154
when (cmd /= " quit" ) $ do
153
- processCommand pool cmd
154
- addHistory cmd
155
- next
155
+ liftIO $ processCommand pool cmd
156
+ loop pool
156
157
)
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ test-suite hpqtypes-tests
197
197
, monad-control >= 1.0.3
198
198
, mtl >= 2.1
199
199
, random >= 1.0
200
- , readline >= 1.0.3.0
200
+ , haskeline >= 0.8.2.1
201
201
, resource-pool >= 0.4
202
202
, scientific
203
203
, test-framework >= 0.8
You can’t perform that action at this time.
0 commit comments