Replace UnmarshalAs
UnmarshalAs is used to ensure that functions have a concrete return type, as opposed to the arguments which are more flexible.
This really was quick hack to make it easy to compile & test the early stages of the code.
But it has become particularly a problem for Text vs String vs ByteString.
This probably needs to go, and instead make the functions polymorphic in the return type also.
Making it polymorphic though but mean additional syntax, type applications and/or signatures to get some scenarios to compile which isn't ideal either.