Friday, 15 January 2010

mongodb - Haskell ExtendedDefaultRules. Changing defaults? -



mongodb - Haskell ExtendedDefaultRules. Changing defaults? -

i work mongodb , build lot of bson types this.

[ "group" =: "default" , "views" =: 0 ]

specifying exact types gets annoying. have build unless can deducted.

[ "group" =: ("default" :: text) , "views" =: (1 :: int) ]

so giving {-# language extendeddefaultrules #-} pragma fixes not desirable types. defaults integer not performance reasons , string not consistency reasons.

is possible alter defaults , create default int , text without qualifying types manually time?

thanks.

with overloadedstrings, can utilize default (int, text)

mongodb haskell

No comments:

Post a Comment