Other potential solutions (2)

Use the type class system to construct parser from types