Permalink
Browse files

more testing of resfile

  • Loading branch information...
1 parent 9cd6510 commit 3703f284220a1acad1bc9a8596125b14ece25d4d Edwin Brady committed Jul 7, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 resfile.idr
View
@@ -27,10 +27,13 @@ testprog : String -> RES ();
testprog filename
= res do { let h = open filename Reading;
Check h
- (Lift (lazy (putStrLn "File open error")))
- (do { str <- Use readLine h;
- Lift (putStrLn str);
+ (Lift (putStrLn "File open error"))
+ (do { While (do { end <- Use eof h;
+ return (not end); })
+ (do { str <- Use readLine h;
+ Lift (putStrLn str); });
Update close h;
+ Lift (putStrLn "DONE");
});
};

0 comments on commit 3703f28

Please sign in to comment.