Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more testing of resfile

  • Loading branch information...
commit 3703f284220a1acad1bc9a8596125b14ece25d4d 1 parent 9cd6510
Edwin Brady authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 resfile.idr
View
9 resfile.idr
@@ -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");
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.