Template Ord
Outreach2 posts346 views5 likesLast activity Oct 2021
FI
filOP
Oct 2021 1How 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
CO
cocreature
Oct 2021 4Templates 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