diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+= lgtk-0.8.0.4 =
+
+Depend on lensref-0.2
+
 = lgtk-0.8.0.3 =
 
 Relax dependencies
diff --git a/lgtk.cabal b/lgtk.cabal
--- a/lgtk.cabal
+++ b/lgtk.cabal
@@ -1,5 +1,5 @@
 name:               lgtk
-version:            0.8.0.3
+version:            0.8.0.4
 category:           GUI
 synopsis:           Lens GUI Toolkit
 description:
@@ -43,6 +43,11 @@
   Description:      Build the Gtk backend
   Default:          False
 
+Flag pure
+  Description:      Use the pure but slow implementation of lens references
+  Default:          False
+
+
 library
 
   hs-source-dirs:
@@ -52,7 +57,7 @@
 
                   , groups < 0.5
                   , semigroups < 0.15
-                  , transformers < 0.5
+                  , transformers >= 0.3 && < 0.5
                   , mtl < 2.3
                   , monad-control < 0.4
                   , operational < 0.3
@@ -75,12 +80,14 @@
                   , GLFW-b < 1.5
 --                  , threepenny-gui == 0.4.1.*
 
-                  , lensref == 0.1.*
+                  , lensref == 0.2.*
 
   exposed-modules:
                     -- lgtk
                     LGtk
   other-modules:
+                    Data.LensRef.Default
+
                     -- lgtk
                     LGtk.Effects
                     LGtk.Key
@@ -96,9 +103,11 @@
                     LGtk.Backend.Gtk
     cpp-options:
                     -D__GTK__
+  if flag(pure)
+    cpp-options:
+                    -D__PURE__
 
   ghc-options: 
-                    -threaded
                     -Wall 
                     -fno-warn-incomplete-patterns 
                     -fno-warn-name-shadowing 
diff --git a/src/Data/LensRef/Default.hs b/src/Data/LensRef/Default.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/LensRef/Default.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE RankNTypes #-}
+-- | Default implementation. Points to either to the pure or the fast implementation depending on the cabal flag @PURE@.
+module Data.LensRef.Default
+    ( Register
+    , runRegister
+    ) where
+
+#ifdef __PURE__
+import Data.LensRef.Pure
+#else
+import Data.LensRef.Fast
+#endif
+
