Modularity is a key issue in the construction of large multiparadigm declarative programs involving complex features like higher-order, polymorphism or constraints. The modular framework defined in this paper for higher-order declarative constraint programming builds complex software systems by combining and composing existing components or modules from a number of composition operations expressive enough to model typical modularization issues like export/import relationships and inheritance. The effectiveness of our approach relies on a higher-order constraint rewriting logic over a parametrically given constraint domain as the basis of a model-theoretic and fixpoint semantics for program modules, and a modular semantics given by a suitable immediate consequence operator which is compositional and fully abstract, offering the possibility of reasoning on the composition process itself. The availability of this well-founded semantics characterization for structuring and modularizing higher-order declarative constraint programs provides the ground to perform sound semantics-based transformation, analysis, debugging and verification of declarative software.