diff --git a/binary-generic.cabal b/binary-generic.cabal
--- a/binary-generic.cabal
+++ b/binary-generic.cabal
@@ -1,5 +1,5 @@
 name:            binary-generic
-version:         0.2
+version:         0.2.1
 license:         BSD3
 license-file:    LICENSE
 author:          Lars Petersen <info@lars-petersen.net>
@@ -16,7 +16,7 @@
 stability:       experimental
 build-type:      Simple
 cabal-version:   >= 1.2
-tested-with:     GHC == 6.12.1
+tested-with:     GHC == 7.0.3
 extra-source-files: README 
 
 library
diff --git a/src/Data/Binary/Generic.hs b/src/Data/Binary/Generic.hs
--- a/src/Data/Binary/Generic.hs
+++ b/src/Data/Binary/Generic.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS -XNoMonomorphismRestriction -XRankNTypes #-}
+{-# OPTIONS -XRankNTypes #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -84,7 +84,8 @@
                                else error $ "getGeneric: `" ++ typeName ++ "' is not algebraic."
 
 putGenericByCallback    :: Data a => (forall d. Data d => d -> Put) -> a -> Put 
-putGenericByCallback c t = let i        = fromIntegral $ constrIndex (toConstr t) - 1 
+putGenericByCallback c t = let i :: Num b => b
+                               i        = fromIntegral $ constrIndex (toConstr t) - 1
                                imax     = maxConstrIndex (dataTypeOf t) 
                                typeName = showsTypeRep (typeOf t) ""
                                putIndex | imax == 0     = error "putGeneric: constructor count is 0."
