connection-pool-0.1.2.1: Connection pool built on top of resource-pool and streaming-commons.

Copyright(c) 2014 Peter Trsko
LicenseBSD3
Maintainerpeter.trsko@gmail.com
Stabilityunstable (internal module)
Portabilitynon-portable (CPP, DeriveDataTypeable, StandaloneDeriving, NoImplicitPrelude, TypeFamilies)
Safe HaskellNone
LanguageHaskell2010

Data.ConnectionPool.Internal.ConnectionPoolFamily

Contents

Description

Module defines type family of connection pools that is later specialised using type tags (phantom types) to specialize implementation of underlying ConnectionPool for various protocols.

Internal packages are here to provide access to internal definitions for library writers, but they should not be used in application code.

Preferably use qualified import, e.g.:

import qualified Data.ConnectionPool.Internal.ConnectionPoolFamily
  as Internal

This module doesn't depend on streaming-commons and other non-HaskellPlatform packages directly and it is only allowed to import Data.ConnectionPool.Internal.ConnectionPool internal module and nothing else from this module. This package uses CPP to get OS specific things right. Most importantly Windows doesn't support UNIX Sockets.

Please, bear above in mind when doing modifications.

Synopsis

Connection Pool Family

data family ConnectionPool :: * -> * Source

Family of connection pools parametrised by transport protocol.

Instances

Typeable (* -> *) ConnectionPool 
data ConnectionPool UnixClient = UnixConnectionPool (ConnectionPool ())

Connection pool for UNIX Socket clients.

data ConnectionPool TcpClient = TcpConnectionPool (ConnectionPool SockAddr)

Connection pool for TCP clients.

Tags For Specialised Connection Pools

data TcpClient Source

Type tag used to specialize connection pool for TCP clients.

Instances

data UnixClient Source

Type tag used to specialize connection pool for UNIX Socket clients.

Instances

Typeable * UnixClient 
data ConnectionPool UnixClient = UnixConnectionPool (ConnectionPool ())

Connection pool for UNIX Socket clients.