diff --git a/friday.cabal b/friday.cabal
--- a/friday.cabal
+++ b/friday.cabal
@@ -1,5 +1,5 @@
 name:                   friday
-version:                0.1.3
+version:                0.1.4
 synopsis:               A functionnal image processing library for Haskell.
 homepage:               https://github.com/RaphaelJ/friday
 license:                LGPL-3
@@ -80,7 +80,7 @@
                       , primitive               >= 0.5.2.1      && < 0.6
                       , ratio-int               >= 0.1.2        && < 0.2
                       , vector                  >= 0.10.0.1     && < 1.0
-                      , transformers            >= 0.3          && < 0.4
+                      , transformers            >= 0.3          && < 0.5
 
     Build-tools:        hsc2hs
 
diff --git a/src/Vision/Histogram.hs b/src/Vision/Histogram.hs
--- a/src/Vision/Histogram.hs
+++ b/src/Vision/Histogram.hs
@@ -147,8 +147,10 @@
 
 -- | Given the number of bins of an histogram and a given pixel, returns the
 -- corresponding bin.
+pixToBin :: (HistogramShape (PixelValueSpace p), ToHistogram p)
+         => PixelValueSpace p -> p -> PixelValueSpace p
 pixToBin size p =
-    let domain = domainSize p
+    let !domain = domainSize p
     in toBin size domain $! pixToIndex p
 {-# INLINE pixToBin #-}
 
