Binary instances for GADTs (or: RTTI in Haskell)

Posted on June 15, 2017

In this blog post we consider the problem of defining Binary instances for GADTs such as

data Val :: * -> * where
  VI :: Int    -> Val Int
  VD :: Double -> Val Double

Read more at well-typed.com