File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -797,14 +797,14 @@ Specifically, suppose you have a custom index type `MyIndexType` and you want
797
797
to be able to de/serialise a `VarName` containing this index type. You should
798
798
then implement the following two methods:
799
799
800
- 1. `AbstractPPL.index_to_dict(i::MyIndexType)` should return a dictionary
801
- representation of the index `i`. This dictionary must contain the key
802
- `"type"`, and the corresponding value must be a string that uniquely
800
+ 1. `AbstractPPL.index_to_dict(i::MyModule. MyIndexType)` should return a
801
+ dictionary representation of the index `i`. This dictionary must contain the
802
+ key `"type"`, and the corresponding value must be a string that uniquely
803
803
identifies the index type. Generally, it makes sense to use the name of the
804
804
type (perhaps prefixed with module qualifiers) as this value to avoid
805
805
clashes. The remainder of the dictionary can have any structure you like.
806
806
807
- 2. Suppose the value of `index_to_dict(i)["type"]` is "MyModule.MyIndexType".
807
+ 2. Suppose the value of `index_to_dict(i)["type"]` is ` "MyModule.MyIndexType"` .
808
808
You should then implement the corresponding method
809
809
`AbstractPPL.dict_to_index(::Val{Symbol("MyModule.MyIndexType")}, dict)`,
810
810
which should take the dictionary representation as the second argument and
You can’t perform that action at this time.
0 commit comments