Hello John,

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
Resolving dependencies...
'HDBC-2.0.0' is cached.
Configuring HDBC-2.0.0...
Preprocessing library HDBC-2.0.0...
Preprocessing executables for HDBC-2.0.0...
Building HDBC-2.0.0...
[1 of 7] Compiling Database.HDBC.SqlValue ( Database/HDBC/SqlValue.hs, dist/build/Database/HDBC/SqlValue.o ) [2 of 7] Compiling Database.HDBC.ColTypes ( Database/HDBC/ColTypes.hs, dist/build/Database/HDBC/ColTypes.o ) [3 of 7] Compiling Database.HDBC.Statement ( Database/HDBC/ Statement.hs, dist/build/Database/HDBC/Statement.o )

Database/HDBC/Statement.hs:113:9:
    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

any suggestions?

Thanks you,

  Valentyn.

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
software.complete.org.

A guide to new features and migration can be found at:

 http://software.complete.org/software/wiki/hdbc/NewIn20

A partial summary of it follows:

New Features:

* Pervasive Unicode support now part of the HDBC API and implemented
      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
      maintained.

* 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. toSql and fromSql/safeFromSql now support conversions between Data.Time.*
      types and SqlValue. Conversions between System.Time.* types were
present from the beginning and will remain. Automatic conversions are, of course, contingent on support in database engines and HDBC
      database backend drivers and may not be possible with all
      databases.

    * 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 future. toSql no longer converts anything to them. The System.Time.* types are converted to the new Data.Time-based SqlValues. It
           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 impossible
      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 conversions
           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
      later).

Richer Date and Time Support

HDBC 1.x had only two ways of getting dates and times between Haskell and a database: an epoch (an Integer representing the number of seconds since midnight Jan 1 1970 UTC) and an Integer representing a TimeDiff
  (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 measured
  within. HDBC can now convert all of these things with much greater
  precision.

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
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to