This means that it cannot link a function with the signature
boost::math::tools::promote_args<stan::math::var, stan::math::var, stan::math::var, double, float, float>::type model533674b696f9_continuous_power_law_diff_namespace::diff_function_lconstant<stan::math::var, stan::math::var, stan::math::var, double>(stan::math::var const&, stan::math::var const&, stan::math::var const&, double const&, std::basic_ostream<char, std::char_traits<char> >*)
because you have only implemented the diff_function_lconstant when everything is a double. You need a template specialization when some or all of the arguments besides pstream__ is a var, in which case the returned value is also a var and you have to deal with the derivatives. The easiest way to do that is to be calling integrate_1d in the Stan Math library.