If I understand the paper correctly, reflection in 8.2 involves some crafty use of GADTs and compiler primitives to create a type descriptor of sorts that allows you to decompose values at runtime in a typesafe manner, while still allowing for erasure.
Paper: https://www.microsoft.com/en-us/research/wp-content/uploads/...
Package: https://downloads.haskell.org/~ghc/latest/docs/html/librarie...