diff --git a/data-accessor.cabal b/data-accessor.cabal
--- a/data-accessor.cabal
+++ b/data-accessor.cabal
@@ -1,5 +1,5 @@
 Name:             data-accessor
-Version:          0.2.2.8
+Version:          0.2.3
 License:          BSD3
 License-File:     LICENSE
 Author:           Henning Thielemann <haskell@henning-thielemann.de>, Luke Palmer <lrpalmer@gmail.com>
@@ -75,9 +75,11 @@
   RegExp
   src-3/Data/Accessor/Private.hs
   src-4/Data/Accessor/Private.hs
+  src-fail/before-4.13/Data/Accessor/ByteSource.hs
+  src-fail/from-4.13/Data/Accessor/ByteSource.hs
 
 Source-Repository this
-  Tag:         0.2.2.8
+  Tag:         0.2.3
   Type:        darcs
   Location:    http://code.haskell.org/data-accessor/core/
 
@@ -85,6 +87,9 @@
   Type:        darcs
   Location:    http://code.haskell.org/data-accessor/core/
 
+Flag monadFail
+  description: Check whether Monad class is split into Monad and MonadFail.
+
 Flag category
   description: Check whether Arrow class is split into Arrow and Category.
 
@@ -100,10 +105,15 @@
       containers >=0.1 && <0.7
     If flag(category)
       Hs-Source-Dirs: src-4
-      Build-Depends: base >= 4 && <5
+      If flag(monadFail)
+        Hs-Source-Dirs: src-fail/from-4.13
+        Build-Depends: base >=4.13 && <5
+      Else
+        Hs-Source-Dirs: src-fail/before-4.13
+        Build-Depends: base >=4 && <4.13
     Else
       Hs-Source-Dirs: src-3
-      Build-Depends: base >= 2 && <4
+      Build-Depends: base >=2 && <4
   Else
     Hs-Source-Dirs: src-3
     Build-Depends:
@@ -123,6 +133,7 @@
     Data.Accessor.BinaryRead
     Data.Accessor.MonadState
   Other-Modules:
+    Data.Accessor.ByteSource
     Data.Accessor.Example
     Data.Accessor.Private
     Data.Accessor.MonadStatePrivate
diff --git a/src-fail/before-4.13/Data/Accessor/ByteSource.hs b/src-fail/before-4.13/Data/Accessor/ByteSource.hs
new file mode 100644
--- /dev/null
+++ b/src-fail/before-4.13/Data/Accessor/ByteSource.hs
@@ -0,0 +1,35 @@
+module Data.Accessor.ByteSource where
+
+import qualified Control.Monad.Trans.State as State
+import Control.Monad.Trans.State (StateT, )
+import Control.Monad.Trans.Class (lift, )
+
+import Data.Word (Word8, )
+
+
+class ByteCompatible byte where
+   toByte :: byte -> Word8
+
+instance ByteCompatible Word8 where
+   toByte = id
+
+
+class ByteStream s where
+   getWord8 :: Monad m => s -> m (Word8, s)
+
+instance ByteCompatible byte => ByteStream [byte] where
+   getWord8 xs =
+      case xs of
+         (c:cs) -> return (toByte c, cs)
+         _ -> fail "ByteStream: no more byte available"
+
+
+class Monad source => ByteSource source where
+   readWord8 :: source Word8
+
+instance (ByteStream s, Monad m) => ByteSource (StateT s m) where
+   readWord8 =
+      do xs <- State.get
+         (c,cs) <- lift (getWord8 xs)
+         State.put cs
+         return c
diff --git a/src-fail/from-4.13/Data/Accessor/ByteSource.hs b/src-fail/from-4.13/Data/Accessor/ByteSource.hs
new file mode 100644
--- /dev/null
+++ b/src-fail/from-4.13/Data/Accessor/ByteSource.hs
@@ -0,0 +1,34 @@
+module Data.Accessor.ByteSource where
+
+import qualified Control.Monad.Trans.State as State
+import Control.Monad.Trans.State (StateT, )
+import Control.Monad.Trans.Class (lift, )
+import Data.Word (Word8, )
+
+
+class ByteCompatible byte where
+   toByte :: byte -> Word8
+
+instance ByteCompatible Word8 where
+   toByte = id
+
+
+class ByteStream s where
+   getWord8 :: MonadFail m => s -> m (Word8, s)
+
+instance ByteCompatible byte => ByteStream [byte] where
+   getWord8 xs =
+      case xs of
+         (c:cs) -> return (toByte c, cs)
+         _ -> fail "ByteStream: no more byte available"
+
+
+class Monad source => ByteSource source where
+   readWord8 :: source Word8
+
+instance (ByteStream s, MonadFail m) => ByteSource (StateT s m) where
+   readWord8 =
+      do xs <- State.get
+         (c,cs) <- lift (getWord8 xs)
+         State.put cs
+         return c
diff --git a/src/Data/Accessor/Basic.hs b/src/Data/Accessor/Basic.hs
--- a/src/Data/Accessor/Basic.hs
+++ b/src/Data/Accessor/Basic.hs
@@ -165,7 +165,7 @@
 {- |
 Flipped version of '($)'.
 -}
--- could be re-exported from utility-ht
+-- ToDo: could be re-exported from utility-ht
 ($%) :: a -> (a -> b) -> b
 ($%) = flip ($)
 
diff --git a/src/Data/Accessor/BinaryRead.hs b/src/Data/Accessor/BinaryRead.hs
--- a/src/Data/Accessor/BinaryRead.hs
+++ b/src/Data/Accessor/BinaryRead.hs
@@ -4,13 +4,22 @@
 This is still only for demonstration and might be of not much use
 and you should not rely on the interface.
 -}
-module Data.Accessor.BinaryRead where
+module Data.Accessor.BinaryRead (
+   Stream,
+   C(any),
+   ByteSource(readWord8),
+   ByteStream(getWord8),
+   ByteCompatible(toByte),
+   Parser(Parser, runParser),
+   field,
+   record,
+   ) where
 
 import qualified Data.Accessor.Basic as Accessor
+import Data.Accessor.ByteSource
+         (ByteSource(..), ByteStream(..), ByteCompatible(..))
 
 import qualified Control.Monad.Trans.State as State
-import Control.Monad.Trans.State (StateT, )
-import Control.Monad.Trans.Class (lift, )
 import Control.Monad (liftM, )
 import Data.Word (Word8, )
 import Data.Char (chr, )
@@ -22,31 +31,6 @@
 
 class C a where
    any :: ByteSource source => source a
-
-class Monad source => ByteSource source where
-   readWord8 :: source Word8
-
-class ByteStream s where
-   getWord8 :: Monad m => s -> m (Word8, s)
-
-instance ByteCompatible byte => ByteStream [byte] where
-   getWord8 xs =
-      case xs of
-         (c:cs) -> return (toByte c, cs)
-         _ -> fail "ByteStream: no more byte available"
-
-class ByteCompatible byte where
-   toByte :: byte -> Word8
-
-instance ByteCompatible Word8 where
-   toByte = id
-
-instance (ByteStream s, Monad m) => ByteSource (StateT s m) where
-   readWord8 =
-      do xs <- State.get
-         (c,cs) <- lift (getWord8 xs)
-         State.put cs
-         return c
 
 instance C Word8 where
    any = readWord8
