Skip to content
  • ttuegel's avatar
    D.Compat.Binary: backport binary generics to binary-0.5 · c650e347
    ttuegel authored
    GHC generics are used to derive binary instances for types appearing
    in the persistent build config, which requires GHC >= 7.2 and
    binary >= 0.7. Unfortunately, GHC < 7.8 ships with binary == 0.5.*.
    The missing module is Data.Binary.Generics, which we have copied from
    binary-0.7.2.3 to Distribution.Compat.Binary.Generics. To provide
    generic implementations for the Binary class, we also have to provide
    our own implementation, which is copied from binary-0.7.2.3 to
    Distribution.Compat.Binary.Class. The interface required by Cabal is
    exported from Distribution.Compat.Binary. This is only done if
    bootstrapping Cabal with GHC < 7.8 or if binary >= 0.7 is not available,
    otherwise Distribution.Compat.Binary simply re-exports Data.Binary.
    c650e347