[Haskell-cafe] custom SQL-to-Haskell type conversion in HDBC

Henry House hajhouse at hajhouse.org
Sat Aug 20 16:37:04 CEST 2011

On Friday, 19 August 2011, Erik Hesselink wrote:
> Perhaps a solution would be to not treat the database precision as
> your primary source of information, but represent that in Haskell
> using some data type that correctly propagates precision information,
> and marshall your database data to and from that. This means some
> duplication of information (precision in both database and Haskell)
> but you do the same with NULL and Maybe, etc. I guess that's inherent
> to (the way HDBC does) database access.

That's exactly what I'm after: getting the data out of the db as a
Haskell data type that preserves the precision information (which the
use of Rational does not).

Henry House
+1 530 848-1238

More information about the Haskell-Cafe mailing list