editor :: Buffer b => Editor b ()
editor = io (hSetBuffering stdout NoBuffering) >> loop
    where loop = do prompt
                    cmd <- getCommand
                    when (cmd /= Quit) (doCommand cmd >> loop)
editor :: Buffer b => Editor b ()
editor = io (hSetBuffering stdout NoBuffering) >> loop
    where loop = do prompt
                    cmd <- getCommand
                    when (cmd /= Quit) (doCommand cmd >> loop)
editor = io (hSetBuffering stdout NoBuffering) >> loop
    where loop = do prompt
                    cmd <- getCommand
                    when (cmd /= Quit) (doCommand cmd >> loop)