<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 11 Feb 2010, at 10:05, Vasyl Pasternak wrote:</div><br><blockquote type="cite"><div><br>But fromSql function could convert everything to String, so you never<br>need to use `show`, just simply write<br><br>convrow2 :: [SqlValue] -> String<br>convrow2 (x:xs) = foldl (\i j -> i ++ " | " ++ (fromSql j)) (fromSql x) xs<br></div></blockquote><div><br></div><blockquote type="cite"><div>But, IMO, this is more readable version of your function:<br><br>convrow2' :: [SqlValue] -> String<br>convrow2' = unwords . intersperse "|" . map fromSql<br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div><div>On 11 Feb 2010, at 10:06, Miguel Mitrofanov wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br>What if you just omit the "show" function? fromSql seems to be able to convert almost anything to String.</span></blockquote><div><br></div><div><br></div><div>Ok, thanks, that's a big help. I'm really glad to get rid off all that extra cruft I had there. I'd forgotten about intersperse, too. The new code works fine.</div><div><br></div><div><br></div></div><div>Regards,</div><div>Iain</div></body></html>