Taking the nasty IO stuff out of Terminal/Figure.hs