Saturday 15 August 2015

haskell - How to use logFunc with openSimpleConn in Persistent Postgresql module? -



haskell - How to use logFunc with openSimpleConn in Persistent Postgresql module? -

i learning yesod , looking postgresql usage examples in ghci when ran this

how perform database queries in ghci in yesod application

pcon <- opensimpleconn con

the bundle has changed since reply given , opensimpleconn requires logfunc in add-on connection string. reading docs opensimpleconn , logfunc not yield examples regarding logfunc or how utilize 1 (i still new haskell)

assuming wants kind of logging function, tried doing

pcon <- opensimpleconn runstdoutloggingt con

but met

<interactive>:22:9: not in scope: ‘runstdoutloggingt’

at point decided needed help.

so, questions are, logfunc , proper way , utilize one?

the simplest implementation can utilize \_ _ _ _ -> homecoming (), i.e., ignore arguments , nothing. more details on what's going on, check out monad-logger package.

postgresql haskell ghci

No comments:

Post a Comment