From: Marc W. <mar...@gm...> - 2006-08-06 13:16:05
|
eg mysqlConnect is of type: mysqlConnect :: MonadIO m => MySQLOptions -> (Database -> m a) -> m a Typical usage looks like this, doesn't it? doSomething :: MonadIO m => (Database -> m a) -> m a -> IO () -- << main=do con <- mysqlConnect Options doSomething con .. Wouln't it be mucht clearer to use another typedef to write something like this ? newtype CConnection :: MonadIO m => (Database -> m a) -> m a doSomething :: CConnection -> IO () -- << much shorter and clearer main=do con <- mysqlConnect Options doSomething con .. The first C migt indicate that it's a "connected" connection (parameters have already been applied).. Or does this already exist? I'd like to provide a patch if you consider it useful Greetings Marc Weber |