For the sake of Spark integration, certain generated classes may need be marked as Serializable. Hydra generates two kinds of top-level Java classes: type definition classes, and module interfaces. The former are the ones which would implement Serializable.
Not all type definitions can implement Serializable. For instance, any type expression with a function type as a subexpression cannot. The types which can implement Serializable should be identical to the ones which can be decoded to terms (see #47), and we face a similar choice: generate all eligible type definitions as Serializable, or selectively mark some type definitions with an annotation and generate only those (along with all of their dependencies) as Serializable.
For the sake of Spark integration, certain generated classes may need be marked as Serializable. Hydra generates two kinds of top-level Java classes: type definition classes, and module interfaces. The former are the ones which would implement Serializable.
Not all type definitions can implement Serializable. For instance, any type expression with a function type as a subexpression cannot. The types which can implement Serializable should be identical to the ones which can be decoded to terms (see #47), and we face a similar choice: generate all eligible type definitions as Serializable, or selectively mark some type definitions with an annotation and generate only those (along with all of their dependencies) as Serializable.