Split Main.hs into interface, parser and program