Haskell/Phantom types

Phantom types are a way to embed a language with a stronger type system than Haskell's.

Phantom types
An ordinary type

its phantom type version

Nothing's changed - just a new argument  that we don't touch. But magic!

Now we can enforce a little bit more!

This is useful if you want to increase the type-safety of your code, but not impose additional runtime overhead: