module W where  
import ParseLib

p s  = do c <- item
          p (c:s)
       +++ return s


test  = papply (p "") "abc"

longTest  = do ans<-applyParserToFile (p "") modify
                                  "c:/f404/t.html" 
               (putStr . show) ans
  where
    -- presently we do not modify
   modify  = id 



{- read a file (using monadic io), modify it, the apply a parser to it
   applyParserToFile :: Parser a -> IO ()
-}
applyParserToFile :: Parser a -> (String -> String) -> String -> IO [(a,String)]
applyParserToFile p modify f = do s <- readFile f
                                  return (papply p (modify s))
