[Haskell-cafe] Bad interface problem.

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Wed Jul 11 11:28:09 CEST 2012


I am using ghc 7.4.2 which includes template-haskell-2.7.0.0.
When I installed QuickCheck-2.5, it requires template-haskell-2.6.0.0.
Even I removed all user space packages, the error was still. I think
it is a ghc pkg problem, that every package register itself as
package:function while ghc (or cabal?) required
package-version:function.
But --constraint='template-haskell-2.7.0.0' did make it compiled.

On Wed, Jul 11, 2012 at 1:34 PM, Claude Heiland-Allen
<claude at mathr.co.uk> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> On 11/07/12 05:51, Magicloud Magiclouds wrote:
>> I cleaned out everything, no luck....
>>
>> On Fri, Jul 6, 2012 at 2:14 AM, Albert Y. C. Lai <trebla at vex.net>
>> wrote:
>>> On 12-07-03 04:19 AM, Magicloud Magiclouds wrote:
>>>> template-haskell-2.6.0.0:Language.Haskell.TH differs from name
>>>> found in the interface file
>>>> template-haskell:Language.Haskell.TH
>
> You installed a bad template-haskell version.  You can only use a
> version corresponding to your ghc version.
>
> I had a similar problem recently.  My solution process was as follows:
>
> 1. check which template-haskell version came with my ghc:
>
> $ ghc -V
> The Glorious Glasgow Haskell Compilation System, version 7.4.2
> $ ghc-pkg list template-haskell
> /home/claude/opt/lib/ghc-7.4.2/package.conf.d
>    template-haskell-2.7.0.0
> /home/claude/.ghc/x86_64-linux-7.4.2/package.conf.d
> $
>
> 2. make sure to forbid every other version of template-haskell
> (because it will break horribly, as you found):
>
> $ cabal install --constraint='template-haskell==2.7.0.0' foo
>
> 3. if foo fails to install because it thinks it needs a different
> version of template-haskell, try adjusting dependencies in foo.cabal
>
> 4. if foo installs and works with the adjusted dependencies, let the
> maintainer know
>
>>> I think things are so messed up that it is time to clean out
>>> everything. See my
>>> http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
>>>
>>> In fact, time to read the whole article and avoid unsafe
>>> re-installs and "upgrades".
>
> It's a good read for sure!  Perhaps it could be updated to add a
> problem I ran into recently:
>
> "cabal install --solver=modular --avoid-reinstalls" sounds perfect, if
> sicp.xhtml scared you properly.   But excessively avoiding reinstalls
> is bad, as cabal-install seems to install a different allowable
> version instead.  The result for me was horrible diamond dependency
> problems - half my packages were built with one version of
> mtl/transformers, and the other half with a different version of
> mtl/transformers.
>
> When I then tried to ghci using some modules from both halves of my
> installed packages, I got very very confusing type errors complaining
> about almost-identical-looking types not being identical.
>
>
> Claude
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iQEcBAEBAgAGBQJP/RBbAAoJEHZDo4jueIiW164IALlHcaauJX2AjBZTDExU0mKC
> wlH+dIbaKkl8H1IMIXQnWSX0GxFGMsbPTdBXf/BC2CMXTcSJr8YMiyKewMAs734g
> DijNU/x/nQlcVruOk1c8EAijIKs938vT3dF0j863+afMAA+cRWlyLWfV50Y7AIG6
> 4hF0Fr5Q73GwonFzTXuX+iWLxBL1i2jXgPjKJvNTJZr+iGn5txCj+6ZpJyfIXaaw
> PZtQrnX/37vQ/ctbKsnDqRQI27/ENJyW3zm76Gax47EIpMvL8fHzEg8IpyR9/eR8
> 8ZfGKYNA1EsARHT3KS6pBPsVQdhn/qYInVZ5NYQ1r/kd9D6nqoy5pETdz3z/23Y=
> =Rzob
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.



More information about the Haskell-Cafe mailing list