[Haskell-cafe] ANN: HDBC v2.0 now available
kamysh at kamysh.org
Fri Jan 30 18:07:39 EST 2009
I'm trying to install the new version of HDBC on my Mac (ghc version
is 6.10.1), and get the following error:
# cabal upgrade --global
'HDBC-2.0.0' is cached.
Preprocessing library HDBC-2.0.0...
Preprocessing executables for HDBC-2.0.0...
[1 of 7] Compiling Database.HDBC.SqlValue ( Database/HDBC/SqlValue.hs,
[2 of 7] Compiling Database.HDBC.ColTypes ( Database/HDBC/ColTypes.hs,
[3 of 7] Compiling Database.HDBC.Statement ( Database/HDBC/
Statement.hs, dist/build/Database/HDBC/Statement.o )
Type constructor `Exception' used as a class
In the instance declaration for `Exception SqlError'
cabal: Error: some packages failed to install:
HDBC-2.0.0 failed during the building phase. The exception was:
exit: ExitFailure 1
On Jan 30, 2009, at 1:28 PM, John Goerzen wrote:
> Hi everyone,
> I'm pleased to announce that HDBC v2.0 is now available.
> Simultaneously, HDBC-sqlite3, HDBC-postgresql, and HDBC-odbc v2.0 have
> also been uploaded. All may be found from Hackage, or at
> A guide to new features and migration can be found at:
> A partial summary of it follows:
> New Features:
> * Pervasive Unicode support now part of the HDBC API and
> by all backend drivers. Based on utf8-string and conversions
> between UTF-8 ByteStrings and Haskell Strings.
> * Full support for GHC 6.10 is new. Full support for GHC 6.8 is
> * Native support for the new exception handling in GHC 6.10,
> with CPP
> conditional compilation to continue supporting the old-style
> exceptions for users of GHC 6.8 or Hugs.
> * HDBC now has direct support for marshalling virtually all of the
> Data.Time.* types to and from SQL database date/time types.
> and fromSql/safeFromSql now support conversions between
> types and SqlValue. Conversions between System.Time.* types were
> present from the beginning and will remain. Automatic
> are, of course, contingent on support in database engines and
> database backend drivers and may not be possible with all
> * Major expansion of SqlValue to be able to carry date/time data
> to/from databases in terms of Data.Time.* types.
> + The old SqlTimeDiff and SqlEpochTime types continue to be
> present, but are deprecated and will be removed in a
> toSql no longer converts anything to them. The
> types are converted to the new Data.Time-based SqlValues.
> should be exceptionally rare that any user code would use
> these types directly, but they are being retained in this
> version out of an abundance of caution.
> * Replace fromSql with safeFromSql, which returns Left on
> conversions instead of raising an exception.
> + Wrote a new fromSql that behaves just like the old one,
> but is
> implemented in terms of safeFromSql. It converts the
> safeFromSql errors to exceptions.
> + The new structure made it possible to greatly enhance many
> error messages throughout the conversion process instances.
> + Removed SqlType typeclass. Re-implemented SqlValue
> in terms of the generic infrastructure in the convertible
> package. Simplified code significantly due to this.
> * Lots of additional docs.
> * New skeleton test suite for HDBC itself (to be expanded upon
> Richer Date and Time Support
> HDBC 1.x had only two ways of getting dates and times between
> and a database: an epoch (an Integer representing the number of
> since midnight Jan 1 1970 UTC) and an Integer representing a
> (a count of elapsed time). While this approach could represent a
> precise instant in time, it was not always the most helpful. Most
> notably, you might sometimes want to load date information without
> time, time without date, or record what timezone the time was
> within. HDBC can now convert all of these things with much greater
> Thanks to Phil Wise for adding the first Unicode support (to
> HDBC-postgresql originally) and to Alson Kemp for adding the first
> advanced date/time marshalling support (also to HDBC-postgresql
> originally). The experience of adding these features to a single
> backend driver first made clear a good way to add them to HDBC API
> as a whole.
> -- John
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe