  We describe a cooperad structure on the simplicial bar construction on a
reduced operad of based spaces or spectra and, dually, an operad structure on
the cobar construction on a cooperad. We also show that if the homology of the
original operad (respectively, cooperad) is Koszul, then the homology of the
bar (respectively, cobar) construction is the Koszul dual. We use our results
to construct an operad structure on the partition poset models for the
Goodwillie derivatives of the identity functor on based spaces and show that
this induces the `Lie' operad structure on the homology groups of these
derivatives. We also extend the bar construction to modules over operads (and,
dually, to comodules over cooperads) and show that a based space naturally
gives rise to a left module over the operad formed by the derivatives of the
identity.
