Hacker News new | ask | show | jobs
by MHordecki 3251 days ago
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...

1 comments

Oh wow this is going to be a joy to read, thanks! Only a couple pages in and it already looks well-written and thorough.

Also there's this: "This paper is literate Haskell and our examples compile under GHC 8.0." A 26 page, typeset paper is certainly the longest example of a literate Haskell program I've come across! Wow.