[Haskell-cafe] Latest Template Haskell Breaks Package

Dominic Steinitz dominic at steinitz.org
Tue Dec 23 13:14:26 UTC 2014


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/ccd7891c536b29b8bea96eb92520f46e21390e39 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 at steinitz.org
http://idontgetoutmuch.wordpress.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141223/a18f4d5e/attachment.html>


More information about the Haskell-Cafe mailing list