scodec/scodec — pull request #32 by mpilquist (2014-11-03 19:26:50+00:00)
Title: Fixes #30

Prefer explicitly defined implicit codecs over derived codecs and
provide a mechanism that allows selection of either.

This PR introduces `scodec.ImplicitCodec`, which gives precedent to
implicit `Codec` instances over derived codecs. Additionally,
`scodec.DerivedCodec` has been extracted from `Codec.Derive`, allowing
derived codecs to be explicitly requested.

When defining a generic combinator that depends on an implicitly
available codec, a decision must be made between requiring an implicit
`Codec`, `DerivedCodec`, and `ImplicitCodec`. The last should generally
be used.

There are some other minor changes including:
- code organization - derivation methods moved to `DerivedCodec`
- code organization - Codec.CoproductAuto moved to
`codecs.CoproductBuilderAuto`
- deprecation of `Codec.product` as it is now synonymous with
`Codec.derive`
- change to implicit parameter order in `DerivedCodec.coproduct` so that
compiler bails out early if there's no `Discriminated[A, D]` in scope