Thx, I changed now from query to query_
Now the coding is like that:
------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.FromRow
hello :: (FromRow a) => IO [a]
hello = do
conn <- connect defaultConnectInfo
query_ conn "select 2 + 2"
main = return ()
------------------------------------------------------------------------
I've no errors any more.
But: I don't see any result (for sure, it is not coeded yet)
I need some help to get data from "hello" via "FromRow" into the main
function.
E.g. I want to put the "hello" database result (the number "4") to the
screen.
Could anybody give an advice how I can accomplish this?
Kind regards
Hartmut
On 08/17/2013 07:53 PM, Brandon Allbery wrote:
On Sat, Aug 17, 2013 at 1:35 PM, Hartmut Pfarr
<hartmut0...@googlemail.com <mailto:hartmut0...@googlemail.com>> wrote:
(The example is identical to the first 5-liner-example in the
package documentation)
As I read it, the example has a typo: it should be using `query_`
instead of `query`. See
http://hackage.haskell.org/packages/archive/postgresql-simple/0.3.5.0/doc/html/Database-PostgreSQL-Simple.html#g:9
for detals.
--
brandon s allbery kf8nh sine nomine associates
allber...@gmail.com <mailto:allber...@gmail.com> ballb...@sinenomine.net
<mailto:ballb...@sinenomine.net>
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe