implement arbitrary order parsing for header
Separate Type.hs and Parser.hs