Implement cast for basic myrial types

int(x) => LONG_TYPE
float(x) => DOUBLE_TYPE
string(x) => STRING_TYPE
boolean(x) => BOOLEAN_TYPE

Builds on #217.
Should we replace the `"LONG_TYPE"` etc. peppered throughout the code with `types.LONG_TYPE`?