Can you try it without the drain, just read the first line from the file?
Edit 10 minutes later: here's a few things I would try:
; a relative path with no slashes/backslashes
(read-all "mccf2.txt")
; inline read-all
(w/infile file "mccf2.txt" (drain (readline file)))
; try reading just the first line
(w/infile file "mccf2.txt" (readline file))
So it looks like the inlined version works, but wrapping it in a function doesn't? Very strange. Paste these lines one at a time into a fresh arc session and show me what you get in response to each line.
(w/infile file "Log.txt" (drain (readline file))) ; just to set a baseline
(def foo (filename) (prn "AAA") (w/infile f filename (prn "BBB") (drain (do1 (readline f) (prn "CCC")))))
(foo "Log.txt")
(def foo (filename) (prn "AAA") (w/infile f filename (prn "BBB") (readline f)))
(foo "Log.txt")
I think rocketnia has figured it out. Does rocketnia's comment http://arclanguage.org/item?id=19137 make sense? Basically you shouldn't get an error if you type in this expression character by character, but you should if you paste it into an arc session without a trailing <enter>.