I argue that compositionality (in the sense of homomorphic interpretation) is compatible with radical and pervasive contextual effects on interpretation. Apparent problems with this claim lose their force if we are careful in distinguishing the question of how a grammar assigns interpretations from the question of how people figure out which interpretations the grammar assigns. I demonstrate, using a simple example, that this latter task must sometimes be done not by computing a derivation defined directly by the grammar, but through the use of pragmatic background knowledge and extragrammatical reasoning, even when the grammar is designed to be fully compositional. The fact that people must sometimes use global pragmatic mechanisms to identify truth conditions therefore tells us nothing about whether the grammar assigns truth conditions compositionally. Compositional interpretation (or the lack thereof) is identifiable not by the mechanisms necessary to calculating truth conditions, but by the structural relation between the interpretation of a phrase in context and the interpretations of its parts in that same context. Even if this relation varies by context, an invariant grammar is possible if grammars can "invoke" pragmatic concepts; but this does not imply that grammatical theory must explain these concepts or incorporate a theory of pragmatics.