the above is fine.
<interactive>:52:7:
Couldn't match type ‘IO String’ with ‘[Char]’
Expected type: String
Actual type: IO String
In the first argument of ‘lines’, namely ‘f’
In the expression: lines f
In my simplistic beginners way I think this is because when I run main = do …
everything is or is within an ‘impure’ area but at ghci command line it is not and I’m mixing pure/impure functions.
So my questions are
1. Is this simplistic view any where near correct?
2. How can I progress at the command line in ghci?
Many thanks
Mike