We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 244a951 commit 5a39f20Copy full SHA for 5a39f20
tutorials/1ch.md
@@ -168,7 +168,19 @@ instance (Binary a, Typeable a) => Serializable a
168
169
That is, any type that is `Binary` and `Typeable` is `Serializable`. This is
170
the case for most of Cloud Haskell's primitive types as well as many standard
171
-data types.
+data types. For custom data types, the `Typeable` instance is always
172
+given by the compiler, and the `Binary` instance can be auto-generated
173
+too in most cases, e.g.:
174
+
175
+{% highlight haskell %}
176
+{-# LANGUAGE DeriveDataTypeable #-}
177
+{-# LANGUAGE DeriveGeneric #-}
178
179
+data T = T Int Char deriving (Generic, Typeable)
180
181
+instance Binary T
182
+{% endhighlight %}
183
184
185
### Spawning Remote Processes
186
0 commit comments