How do I make the data-type created by a template (not the template itself) implement Ord?
eg.:
let a: [A] = ...
let x = L.sort a
How do I make the data-type created by a template (not the template itself) implement Ord?
eg.:
let a: [A] = ...
let x = L.sort a
Templates derive Eq and Show by default. The template syntax does not allow you to use the regular deriving clauses but you can use a feature called “standalone deriving” to derive an Ord instance for your template A:
deriving instance Ord a