Thomas,
I fixed the other errors, plugged back the guardian and, you are right. The problem re-appeared. Im now able to reproduce the problem using the attached code.
The problem is with this declaration:-
Code: Select all
/*
A relation is both a secondary expression and a key*/
interface relation supports secondary{key, key}, key
end interface
My original intention was to declare:-
Code: Select all
/*
interface relation supports secondary{relation, key}, key
end interface
But the compiler wont let me, throwing the conflict error
Conflicting support instances 'expression{@Type}{relation}' and 'expression{@Type}{::key}
I tried to fix this by replacing the
relation with
key; that's when the error occurred.
Code: Select all
/*
A guardian is a relation associated with a key*/
interface guardian supports relation
properties
key:key.
end interface
class guardian:guardian
constructors
new:(relation).
end class
implement guardian
facts
relation:relation:=erroneous.
key:key:=erroneous.
/*
Implement the relation interface by delegation*/
delegate interface relation to relation
clauses
new(Relation):- relation:=Relation.
end implement
/*
A relation is both a secondary expression and a key*/
interface relation supports secondary{key, key}, key
end interface
/*
A key is a child of a relation; it is also an expression*/
interface key supports expression{key}
end interface
/*
A secondary is an expression with children*/
interface secondary{@Parent, @Child} supports expression{@Parent}
properties
children:expression{@Child}*.
end interface
/*
An expression can be broken down into test contestants*/
interface expression{@Type}
properties
type:@Type.
end interface
implement main
clauses
run() :-
succeed(). % place your own code here
end implement main
goal
main::run().