Polykinded NFData

Posted on 2016-06-15 by Oleg Grenrus

Example how is possible to write polykinded type-classes in GHC-8.0. It's not that bad or messy, but I'm not sure it's practical either. But at the end you have

class NFData (a :: k) where
    rnfPoly :: NFDataSig k a  -- magic happens in NFDataSig type family

Gist source


Site proudly generated by Hakyll