Added functor instance for Primitive.
Added primitives functions and RefGenerator Type Class.