[Haskell-cafe] problems with derive/TH

Thomas Hartman tphyahoo at gmail.com
Fri May 23 15:29:44 EDT 2008


adding OPTIONS -XStandaloneDeriving made no difference

The following patch fixed the problem. (Well, at least the mud program
compiles. I haven't actually tried using it yet.)

thartman at thartman-laptop:~/mud>darcs whatsnew
{
hunk ./World.hs 50
-    deriving Eq
+    -- deriving Eq
+
+instance Eq (World TVar) where
+  World a1 a2 a3 a4 a5 a6 a7 a8 == World b1 b2 b3 b4 b5 b6 b7 b8 =
+      a1 == b1 && a2 == b2 && a3 == b3 && a4 == b4 && a5 == b5 && a6
== b6 && a7 == b7 && a8 == b8
hunk ./World.hs 202
+
+
hunk ./mud.cabal 9
-                    network, unix, template-haskell
+                    network, unix, template-haskell, containers, bytestring
}
thartman at thartman-laptop:~/mud>darcs commit

I'm posting a patch here because when I darcs pushed I got

darcs: Pushing to http URLs is not supported.
You may be able to hack this to work using DARCS_APPLY_HTTP

still very new to darcs. is there something else I should have done?

Thanks to the cafe, as always!

thomas.

2008/5/23 Alfonso Acosta <alfonso.acosta at gmail.com>:
> On Fri, May 23, 2008 at 5:11 PM, Thomas Hartman <tphyahoo at gmail.com> wrote:
>>  I am assuming this used to work, but something changed, either in TH
>> itself or switching from ghc6.6 to ghc6.8.
>
> The "deriving" rules of 6.8 are more restrictive in some cases.
> However,  the same result can be obtained in 6.8 byt using stand-alone
> deriving declarations:
>
>  http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-alone-deriving
>
> I guess this can be the problem.
>


More information about the Haskell-Cafe mailing list