Type and effect systems provide a safe and effective means of programming high-performance parallel computers with a high-level language that integrates both functional and imperative paradigms. Just as types describe what expressions compute, effects describe how expressions compute. Types and effects are associated with regions that describe where dynamically-allocated data structures reside in memory. We show how types, regions and effects can be used to discover when global operations on vectors are amenable to data parallelism in the presence of both side effects and higher-order functions. To substantiate our claims that effects are an effective medium for addressing the issues of code generation for full-fledged languages on massively parallel computers, we describe the design and implementation of a CM-2 compiler prototype for the polymorphically typed FX language.