Copyright | (c) 2014 Peter Trsko |
---|---|
License | BSD3 |
Maintainer | peter.trsko@gmail.com |
Stability | unstable (internal module) |
Portability | non-portable (CPP, DeriveDataTypeable, StandaloneDeriving, NoImplicitPrelude, TypeFamilies) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data family ConnectionPool :: * -> *
- data TcpClient
- data UnixClient
Connection Pool Family
data family ConnectionPool :: * -> * Source
Family of connection pools parametrised by transport protocol.
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
Type tag used to specialize connection pool for TCP clients.
Typeable * TcpClient | |
data ConnectionPool TcpClient = TcpConnectionPool (ConnectionPool SockAddr) | Connection pool for TCP clients. |
data UnixClient Source
Type tag used to specialize connection pool for UNIX Socket clients.
Typeable * UnixClient | |
data ConnectionPool UnixClient = UnixConnectionPool (ConnectionPool ()) | Connection pool for UNIX Socket clients. |