TonyGen / mongoDB-haskell

MongoDB driver for Haskell
http://hackage.haskell.org/package/mongoDB
Apache License 2.0
57 stars 14 forks source link

MongoDB module broken on GHC 7.2.1. #5

Closed mkscrg closed 12 years ago

mkscrg commented 13 years ago

Running GHC 7.2.1, mongoDB-1.10, mongo 2.0.0, Mac OS X 10.7.1.

This test code fails ...

{-# LANGUAGE OverloadedStrings #-}
import Database.MongoDB

main :: IO ()
main = do
    pipe <- runIOE $ connect (host "127.0.0.1")
    access pipe master "test" allDatabases >>= putStrLn . show

... with this exception:

Persist: Database/MongoDB/Query.hs:411:32-42: Missing field in record construction Database.MongoDB.Internal.Protocol.qOptions

I've tested against earlier versions of both the module and the database, with the same results. Removing ghc 7.2.1 and installing the platform (7.0.3) fixed the problem.

Best, Mike

mkscrg commented 13 years ago

I fixed it and submitted a pull request: https://github.com/TonyGen/mongoDB-haskell/pull/6

I'm not closing the issue because there's some undiagnosed reason why the code broke on 7.2.1. As far as I can tell, there are no known issues with the RecordWildCards extension in 7.2.1.