Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 4.76 KB

1.2.0.markdown

File metadata and controls

67 lines (52 loc) · 4.76 KB

A new release of shapeless. Many thanks to Alois Cochard and Stacy Curl for their contributions.

The main changes include,

  • Major rework of polymorphic function values. Function values for natural transformation vs. more arbitrary morphism are now represented consistently. Typical natural transformations are "self-witnessing". The framework now supports extension to polymorphic values of higher arities: this is exploited in the implementation of the new HList fold operations. Type specific cases are now nested implicits reducing implicit scope pollution significantly.

  • Added an implementation of extensible records in terms of HLists of key/value associations.

  • Added HMap: a heterogenous map implementation where the relationship between key types and value types is witnessed by an arbitrary relation.

  • Added HListIso: a representation of isomorphisms between case classes and HLists with standard instances for tuples. As well as supporting lenses, they can be used to almost automatically derive case class type class instances from the instances of their elements.

  • Added Lens: an implementation of almost boilerplate free lenses for case classes leveraging HListIso.

  • Numerous HList enhancements,

    • Replaced existing only partly polymorphic fold with fully polymorphic foldLeft, foldRight, reduceLeft and reduceRight. The previous form of fold has been carried over as foldMap and is now a right fold.
    • Added filterNot (thanks to @aloiscochard).
    • Added remove and removeAll (thanks to Stacy Curl)
    • Added +:, :+, ++, ++:, filter, length, updatedAt, replace, replaceType, updated and updatedType.
  • Added HList constraints,

    • -> witnessing that all elements share a common outer type constructor, allowing HLists to be constrained to the form of a KList.
    • BasisConstraint witnessing that all element types belong to a given list of types.
    • KeyConstraint and ValueConstraint witnessing that an HList conforms to the schema associated with a record type.
  • Added type classes witnessing Product arity.

  • Added an implementation of an approximation to newtype.

  • Added <= witness for Nat.

  • Nat values are now published implicitly.

  • Id is now covariant.

  • Various new examples and proofs of concept.

  • Improved build configuration,

    • Updated to SBT 0.12.0-M1 and sbteclipse 2.1.0-SNAPSHOT.
    • Added SBT configuration for publishing to Sonatype OSS (thanks to @aloiscochard).
    • Added SBT cross build mechanics (thanks to @aloiscochard).