@Def("(is File) readLine()")
@Doc("Reads a single line of text from the file. Returns nothing if at\n" +
"the end of the file.")
public static class ReadLine implements Intrinsic {
public Obj invoke(Context context, Obj left, Obj right) {
FileReader reader = (FileReader)left.getValue();
try {
String line = reader.readLine();
if (line == null) return context.nothing();
return context.toObj(line);
} catch (IOException e) {
throw context.error("IOError", "Could not read.");
}