Paul Moore wrote: > db.hs:10:64: > Couldn't match expected type `forall mark. DBM mark Session a' > against inferred type `a1 b' > In the second argument of `($)', namely > `do r <- doQuery > (sql "select username from all_users") query1Iteratee [] > liftIO $ (putStrLn $ (show r))' > In the expression: > (withSession (connect "USER" "PASSWORD" "DB")) > $ (do r <- doQuery > (sql "select username from all_users") > query1Iteratee [] > liftIO $ (putStrLn $ (show r))) > In the expression: > do (withSession (connect "USER" "PASSWORD" "DB")) > $ (do r <- doQuery > (sql "select username from all_users") > query1Iteratee [] > liftIO $ (putStrLn $ (show r)))
I had the same problem... ($) doesn't have the expected semantics with existential types (like "forall mark. DBM mark Session a"). Some day I will be able to explain why this is so, but in the meantime, if you replace "liftIO $ putStrLn $ show r" with "liftIO (putStrLn (show r))", it should work. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe