Finish refactoring suitable state into a read-only state.
Finish refactoring suitable state into a read-only state.

This means we don't have to explicitly manage the stack and removes a
few unsafe calls to `head`.

mpickering/ghc-exactprint,alanz/ghc-exactprint