[Haskell-beginners] global variables
Gaius Hammond
gaius at gaius.org.uk
Wed Aug 11 17:24:47 EDT 2010
On 11 Aug 2010, at 20:54, prad wrote:
> i'm curious about the best way to deal with conn to make db
> connections.
>
> i define it in main like this, then when i want to use it in a
> function
> i have to pass it as a parameter:
>
> main = do
> conn <- connectPostgreSQL ...
> fn conn something
>
>
> fn conn x = ...
I too am interested in this.... Right now the best way to me seems to
be to use StateT (I am mainly using SQLite).
G
More information about the Beginners
mailing list