The code below reports a syntax error message:

type 'a edge = |Empty |End of 'a * 'a vertex * 'a vertex and type 'a vertex = |Empty |Vertex of 'a * 'a edge list;;

How do you define two types that refer to each other?

The second is type not syntactically correct:

type

type 'a edge = |Empty |End of 'a * 'a vertex * 'a vertex and 'a vertex = |Empty |Vertex of 'a * 'a edge list;;