I think the trick is to add another flag: OverlappingInstances
Cheers,
Axel
On 22.04.2010, at 10:34, Andy Stewart wrote:
> Hi Duncan,
>
> I'm try to convert gconf to Cabal package, below is package:
>
> <gconf.tar.gz>
> When i compile first, i got below error:
> ------------------------------> first error start
> <------------------------------
> System/Gnome/GConf/GConfValue.chs:106:0:
> Illegal instance declaration for `GConfPrimitiveValueClass String'
> (All instance types must be of the form (T t1 ... tn)
> where T is not a synonym.
> Use -XTypeSynonymInstances if you want to disable this.)
> In the instance declaration for `GConfPrimitiveValueClass String'
>
> System/Gnome/GConf/GConfValue.chs:138:0:
> Illegal instance declaration for `GConfValueClass String'
> (All instance types must be of the form (T t1 ... tn)
> where T is not a synonym.
> Use -XTypeSynonymInstances if you want to disable this.)
> In the instance declaration for `GConfValueClass String'
> ------------------------------> first error end
> <------------------------------
>
> So i add `{-# LANGUAGE CPP, TypeSynonymInstances #-}` in
> GConfValue.chs.
> But i got another error:
>
> ------------------------------> error start
> <------------------------------
> System/Gnome/GConf/GConfValue.chs:106:9:
> Overlapping instances for GConfValueClass String
> arising from the superclasses of an instance declaration
> at System/Gnome/GConf/GConfValue.chs:106:9-39
> Matching instances:
> instance GConfValueClass String
> -- Defined at System/Gnome/GConf/GConfValue.chs:138:9-30
> instance (GConfPrimitiveValueClass a) => GConfValueClass [a]
> -- Defined at System/Gnome/GConf/GConfValue.chs:172:9-57
> In the instance declaration for `GConfPrimitiveValueClass String'
>
> System/Gnome/GConf/GConfValue.chs:320:29:
> Overlapping instances for GConfValueClass String
> arising from a use of `marshalToGConfValue'
> at System/Gnome/GConf/GConfValue.chs:320:29-50
> Matching instances:
> instance GConfValueClass String
> -- Defined at System/Gnome/GConf/GConfValue.chs:138:9-30
> instance (GConfPrimitiveValueClass a) => GConfValueClass [a]
> -- Defined at System/Gnome/GConf/GConfValue.chs:172:9-57
> In the expression: marshalToGConfValue v'
> In a case alternative:
> (GConfValueString v') -> marshalToGConfValue v'
> In the expression:
> case v of {
> (GConfValueString v') -> marshalToGConfValue v'
> (GConfValueInt v') -> marshalToGConfValue v'
> (GConfValueFloat v') -> marshalToGConfValue v'
> (GConfValueBool v') -> marshalToGConfValue v'
> (GConfValueSchema)
> -> fail "GConf: setting schema types not supported"
> (GConfValueList v') -> marshalGConfValueDynListToGConfValue
> v'
> (GConfValuePair v') -> marshalGConfValueDynPairToGConfValue
> v' }
> ------------------------------> error end
> <------------------------------
>
> Something looks wrong.
> And i don't know the detail of gconf binding, can you help me fix it?
>
> Thanks,
>
> -- Andy
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gtk2hs-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
------------------------------------------------------------------------------
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel