### Derive SafeCopy for parameterized type with Set Source: https://github.com/acid-state/safecopy/wiki/Home Shows a parameterized type and the SafeCopy derivation that triggers a missing Ord instance error for the capability type parameter. The error occurs because Set requires Ord on its elements, but the generated code lacks that constraint. The suggested fix is to replace Set with Map, which does not require Ord on values. ```haskell data UserProfile capability = UserProfile { _groups :: Set (GroupID, capability) ... } ``` ```haskell $(deriveSafeCopy 1 'base ''UserProfile) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.