Hi Dominic, It looks like just a representation change: a TySynEqn is a data type containing a [Type] and a Type, and those were the original two arguments. So it looks like with a little bit of CPP, you could support both versions. Something like #if MIN_VERSION_template_haskell(2,9,0) ... #else ... #endif In general, I think each major release of template haskell has quite some breaking changes, but I don't know of any place where they're enumerated. The GHC changelog only has a couple of high level bullet points. Regards, Erik On Tue, Dec 23, 2014 at 2:20 PM, Dominic Steinitz <dominic@steinitz.org> wrote:
I realise I should have sent this to the libraries list.
Dominic Steinitz dominic@steinitz.org http://idontgetoutmuch.wordpress.com
Begin forwarded message:
From: Dominic Steinitz <dominic@steinitz.org> Subject: Latest Template Haskell Breaks Package Date: 23 December 2014 13:14:26 GMT To: Haskell-Cafe <haskell-cafe@haskell.org>
Hello Fellow Haskellers,
I have become a maintainer for yarr (https://hackage.haskell.org/package/yarr). This no longer compiles with ghc-7.8.3 because it specifies base == 4.6. Relaxing this to base >=4.6 && <4.8 tells me I need a newer version of Template Haskell
rejecting: template-haskell-2.7.0.0, 2.6.0.0, 2.5.0.0, 2.4.0.1, 2.4.0.0, 2.3.0.1, 2.3.0.0, 2.2.0.0 (conflict: yarr => template-haskell>=2.8 && <2.9)
If I now relax the constraint for Template Haskell I get a compiler error as there has been a breaking change from Template Haskell 2.9 to 2.10.
Data/Yarr/Utils/FixedVector/VecTuple.hs:45:16: Couldn't match expected type ‘TypeQ -> Q Dec’ with actual type ‘Q Dec’ The function ‘tySynInstD’ is applied to three arguments, but its type ‘Name -> TySynEqnQ -> DecQ’ has only two
And indeed looking at the changes in http://git.haskell.org/packages/template-haskell.git/commitdiff/ccd7891c536b... I can see that the function in question has changed.
-tySynInstD :: Name -> [TypeQ] -> TypeQ -> DecQ -tySynInstD tc tys rhs = +tySynInstD :: Name -> [TySynEqnQ] -> DecQ +tySynInstD tc eqns =
Did I miss some announcement of this breaking change and the advice on what to do about it?
If I did can someone please point me at the relevant document. If not then I feel sad and would be very grateful if someone could help me as I know very little about Template Haskell.
Many thanks
Dominic Steinitz dominic@steinitz.org http://idontgetoutmuch.wordpress.com
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries