
30 Sep
2023
30 Sep
'23
12:37 p.m.
How are Haskell folks using indexed types (indexed by types of DataKinds) whilst still being able to take advantage of GHC's deriving? I wrote up my approach into a small library: https://github.com/tomjaguarpaw/ad/blob/589926448865700fa616e8c6f6e4a0113844... Here's an example of using my approach: https://github.com/tomjaguarpaw/ad/blob/master/indexed-types/src/IndexedType... and it shows you can still use deriving for all your instances: https://github.com/tomjaguarpaw/ad/blob/master/indexed-types/src/IndexedType... I'd be interested to know what other approaches people are using in practice. Thanks, Tom