]> git.immae.eu Git - github/fretlink/text-pipes.git/blobdiff - examples/attoparser.hs
encoding documentation
[github/fretlink/text-pipes.git] / examples / attoparser.hs
index 6328991a815bbe1eb5d946614b267eca5d5ae237..b7d8c11093327b3aa163a06c137309829825288c 100644 (file)
@@ -18,10 +18,10 @@ testParser = do
   return $ Test a b
   
 main = IO.withFile "./testfile" IO.ReadMode $ \handle -> runEffect $
-    for  (parsed testParser (fromHandle handle)) 
-         (lift . print)
-
-
+   do leftover <- for (parsed testParser (fromHandle handle)) 
+                   (lift . print)
+      return () -- ignore unparsed material
+      
 -- >>> :! cat testfile
 -- 1 1
 -- 2 2