Database interface

Tim Docker timd@macquarie.com.au
Wed, 13 Aug 2003 20:03:14 +1000


Tom Pledger writes:

 > This is a pretty good way to stop those nasty vague SQL row types at
 > the Haskell border and turn them into something respectable.  Perhaps
 > it would even be worth constraining the extracted type to be in
 > DeepSeq
 >
 >    doquery :: (DeepSeq v) =>
 >               Process -> String -> IO v -> IO [v]

Can you explain what the constraint does here?

Although I haven't touched the db interface in the meantime, when/if I
do,
I'll probably generalise the query function to do a fold, rathen than
always
accumulate a list:

	doquery :: Process -> String -> (a -> b  -> IO b) -> b -> IO b

Tim