Skip to content

Commit 630d900

Browse files
Removed safe library from dependencies
1 parent c06fe27 commit 630d900

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

postgres-wire.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ library
4343
, socket
4444
, socket-unix
4545
, vector
46-
, safe
4746
, time
4847
, hashable
4948
, hashtables

src/Database/PostgreSQL/Driver/RawConnection.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module Database.PostgreSQL.Driver.RawConnection
66

77
import Control.Monad (void, when)
88
import Control.Exception (bracketOnError, try)
9-
import Safe (headMay)
109
import Data.Monoid ((<>))
1110
import Foreign (castPtr, plusPtr)
1211
import System.Socket (socket, AddressInfo(..), getAddressInfo, socketAddress,
@@ -75,6 +74,9 @@ createRawConnection settings
7574
let dir = B.reverse . B.dropWhile (== 47) $ B.reverse dirPath
7675
in dir <> "/" <> unixPathFilename <> portStr
7776

77+
headMay [] = Nothing
78+
headMay (x:_) = Just x
79+
7880
constructRawConnection :: Socket f Stream p -> RawConnection
7981
constructRawConnection s = RawConnection
8082
{ rFlush = pure ()

0 commit comments

Comments
 (0)