diff --git a/Data/Attoparsec.hs b/Data/Attoparsec.hs
--- a/Data/Attoparsec.hs
+++ b/Data/Attoparsec.hs
@@ -65,7 +65,6 @@
     ) where
 
 import Data.Attoparsec.Combinator
-import Prelude hiding (takeWhile)
 import qualified Data.Attoparsec.Internal as I
 import qualified Data.ByteString as B
 
diff --git a/Data/Attoparsec/Internal.hs b/Data/Attoparsec/Internal.hs
--- a/Data/Attoparsec/Internal.hs
+++ b/Data/Attoparsec/Internal.hs
@@ -183,31 +183,31 @@
     then ks st0 ()
     else runParser (demandInput >> ensure n) st0 kf ks
 
+-- | Ask for input.  If we receive any, pass it to a success
+-- continuation, otherwise to a failure continuation.
+prompt :: S -> (S -> Result r) -> (S -> Result r) -> Result r
+prompt (S s0 a0 _c0) kf ks = Partial $ \s ->
+    if B.null s
+    then kf $! S s0 a0 Complete
+    else ks $! S (s0 +++ s) (a0 +++ s) Incomplete
+
 -- | Immediately demand more input via a 'Partial' continuation
 -- result.
 demandInput :: Parser ()
-demandInput = Parser $ \st0@(S s0 a0 c0) kf ks ->
-    if c0 == Complete
+demandInput = Parser $ \st0 kf ks ->
+    if more st0 == Complete
     then kf st0 ["demandInput"] "not enough bytes"
-    else Partial $ \s ->
-         if B.null s
-         then kf (S s0 a0 Complete) ["demandInput"] "not enough bytes"
-         else let st1 = S (s0 +++ s) (a0 +++ s) Incomplete
-              in  ks st1 ()
+    else prompt st0 (\st -> kf st ["demandInput"] "not enough bytes") (`ks` ())
 
 -- | This parser always succeeds.  It returns 'True' if any input is
 -- available either immediately or on demand, and 'False' if the end
 -- of all input has been reached.
 wantInput :: Parser Bool
-wantInput = Parser $ \st0@(S s0 a0 c0) _kf ks ->
-  case undefined of
+wantInput = Parser $ \st0@(S s0 _a0 c0) _kf ks ->
+  case () of
     _ | not (B.null s0) -> ks st0 True
       | c0 == Complete  -> ks st0 False
-      | otherwise       -> Partial $ \s ->
-                           if B.null s
-                           then ks st0 False
-                           else let st1 = S (s0 +++ s) (a0 +++ s) Incomplete
-                                in  ks st1 True
+      | otherwise       -> prompt st0 (`ks` False) (`ks` True)
 
 get :: Parser B.ByteString
 get  = Parser (\st0 _kf ks -> ks st0 (input st0))
diff --git a/Data/Attoparsec/Lazy.hs b/Data/Attoparsec/Lazy.hs
--- a/Data/Attoparsec/Lazy.hs
+++ b/Data/Attoparsec/Lazy.hs
@@ -88,4 +88,3 @@
 eitherResult :: Result r -> Either String r
 eitherResult (Done _ r)     = Right r
 eitherResult (Fail _ _ msg) = Left msg
-eitherResult _              = Left "Result: incomplete input"
diff --git a/attoparsec.cabal b/attoparsec.cabal
--- a/attoparsec.cabal
+++ b/attoparsec.cabal
@@ -1,5 +1,5 @@
 name:            attoparsec
-version:         0.8.0.0
+version:         0.8.0.1
 license:         BSD3
 license-file:    LICENSE
 category:        Text, Parsing
