Typed splices and type checking