
5 Jan
2011
5 Jan
'11
8:41 a.m.
You have two choices (other people have enumerated the first while I was typing): First choice: Wrap your Stringlist with a newtype: newtype StringList = StringList [String] The downside of this your code gets "polluted" with the newtype. Second choice: Write special putStringList and getStringList functions. Hand-code the binary instances where you are wanting [String] to be special and call putStringList and getStringList rather than put and get. Downside - cannot automatically derive Binary. That's if Binary can be automatically derived anyway?, the times when I need Binary I write the instances myself anyway.