th-desugar v1.4.0 Release Notes

    • All Decs can now be desugared, to the new DDec type.

    • Sweetening Decs that do not exist in GHC 7.6.3- works on a "best effort" basis: closed type families are sweetened to open ones, and role annotations are dropped.

    • Infos can now be desugared. Desugaring takes into account GHC bug #8884, which meant that reifying poly-kinded type families in GHC 7.6.3- was subtly wrong.

    • There is a new function flattenDValD which takes a binding like let (a,b) = foo and breaks it apart into separate assignments for a and b.

    • ๐Ÿ‘€ There is a new Desugar class with methods desugar and sweeten. See ๐Ÿ“š the documentation in Language.Haskell.TH.Desugar.

    • Variable names that are distinct in desugared code are now guaranteed to have distinct answers to nameBase.

    • โž• Added a new function getRecordSelectors that extracts types and definitions of record selectors from a datatype definition.