
19 Apr
2004
19 Apr
'04
12:21 a.m.
A bit of an irritation I've run into is that one cannot say: valueType <- {# get GConfValue.type #} value You see, GConfValue is a C struct like so: struct GConfValue { GConfValueType type; ... }; where GConfValueType is a C enum. The c2hs tutorial seemed to indicate that you could do this http://www.cse.unsw.edu.au/~chak/haskell/c2hs/docu/c2hs.html#toc3.8 (see the example) however c2hs (version 0.10.17 & 0.12.0) complains: GConfValue.chs:156: (column 36) [ERROR]
Syntax error! The phrase `type' is not allowed here.
Presumably 'type' is a reserved token because 'type' is one of the c2hs directives. Would it be terribly difficult to make the directive names not special in cid contexts? Duncan