From: Axel S. <Axe...@in...> - 2010-04-22 10:17:38
|
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 > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel |
From: Andy S. <laz...@gm...> - 2010-04-22 10:23:20
|
Axel Simon <Axe...@in...> writes: > I think the trick is to add another flag: OverlappingInstances Looks can't work, new error after add `OverlappingInstances`: ------------------------------> error start <------------------------------ System/Gnome/GConf/GConfValue.chs:63:33: Ambiguous type variable `value' in the constraint: `GConfValueClass value' arising from a use of `typeofGConfValue' at System/Gnome/GConf/GConfValue.chs:63:33-67 Probable fix: add a type signature that fixes these type variable(s) System/Gnome/GConf/GConfValue.chs:92:23: Ambiguous type variable `value1' in the constraint: `GConfValueClass value1' arising from a use of `typeofGConfValue' at System/Gnome/GConf/GConfValue.chs:92:23-59 Probable fix: add a type signature that fixes these type variable(s) System/Gnome/GConf/GConfValue.chs:184:22: Ambiguous type variable `a' in the constraint: `GConfValueClass a' arising from a use of `typeofGConfValue' at System/Gnome/GConf/GConfValue.chs:184:22-54 Probable fix: add a type signature that fixes these type variable(s) System/Gnome/GConf/GConfValue.chs:194:33: Ambiguous type variable `a1' in the constraint: `GConfValueClass a1' arising from a use of `typeofGConfValue' at System/Gnome/GConf/GConfValue.chs:194:33-63 Probable fix: add a type signature that fixes these type variable(s) ------------------------------> error end <------------------------------ Can you help me test gconf package? Thanks I'm converting other packages..... -- Andy > > 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 >> Gtk...@li... >> https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel |