External Publication
Visit Post

Using RGB types to gain intuition about Type Level Programming and Generics

Haskell Community [Unofficial] February 4, 2026
Source

Nice job. More type-level bit/bytewise libraries!

Do note that many of the language extensions you use are enabled by the GHC2021 language edition, which is a modern agreed-upon set of language extensions. These shouldn’t be scary to use universally e.g. FlexibleInstances, DataKinds (though it’s nice to know what they do).

In particular, UndecidableInstances gets (or used to get?) a lot of flak. It’s not really problematic safety-wise. Requiring it usually indicates that you’re doing some complex type-level work, where GHC is unable to guarantee that typechecking will terminate. So it permits you writing code that would hang the compiler. It’s not good to keep on by default, but it’s rarely much more than an “oh, I am writing interesting type families now” indicator. (Please someone correct me if I’m wrong.)

Discussion in the ATmosphere

Loading comments...