207527 (1) [Avatar] Offline
Compiling and running the program is listing 2.1 (from a Terminal on OS X 10.11.6, FWIW) and then hitting ^D to end an end-of-file will cause the program to loop endlessly with the following output:

Enter a string: The average word length is: nan

Interrupting with ^C will stop things and return you to the shell, but this still seems like a less-than-ideal way for the repl function from the Prelude to work. If I'm following the code from Idris-dev/libs/prelude/Prelude/Interactive.idr correctly, it appears that the interaction of replWith and getLine works out in such a way that replWith has no way of distinguishing between getting an empty string and trying to read from an ended file.
Edwin Brady (65) [Avatar] Offline
I can reproduce this. I'll try to fix the repl function, thanks!