pub fn check_program(surface: &SProgram) -> Result<Program>
Checks a surface program into the portable core.
On name, type and exhaustiveness errors, and on constructs outside the portable core.