mirror of
https://github.com/postgres-haskell/postgres-wire.git
synced 2024-11-22 05:53:12 +03:00
Removed safe library from dependencies
This commit is contained in:
parent
c06fe27ac9
commit
630d90090b
@ -43,7 +43,6 @@ library
|
||||
, socket
|
||||
, socket-unix
|
||||
, vector
|
||||
, safe
|
||||
, time
|
||||
, hashable
|
||||
, hashtables
|
||||
|
@ -6,7 +6,6 @@ module Database.PostgreSQL.Driver.RawConnection
|
||||
|
||||
import Control.Monad (void, when)
|
||||
import Control.Exception (bracketOnError, try)
|
||||
import Safe (headMay)
|
||||
import Data.Monoid ((<>))
|
||||
import Foreign (castPtr, plusPtr)
|
||||
import System.Socket (socket, AddressInfo(..), getAddressInfo, socketAddress,
|
||||
@ -75,6 +74,9 @@ createRawConnection settings
|
||||
let dir = B.reverse . B.dropWhile (== 47) $ B.reverse dirPath
|
||||
in dir <> "/" <> unixPathFilename <> portStr
|
||||
|
||||
headMay [] = Nothing
|
||||
headMay (x:_) = Just x
|
||||
|
||||
constructRawConnection :: Socket f Stream p -> RawConnection
|
||||
constructRawConnection s = RawConnection
|
||||
{ rFlush = pure ()
|
||||
|
Loading…
Reference in New Issue
Block a user