SO: What's the motivation to use a phantom type?

Posted on 2015-01-31 by Oleg Grenrus

#The question

Don Stewart's Haskell in the Large's presentation mentioned Phantom Types:

What's the motivation to use a phantom type?

#The answer

To answer the "what's the motivation to use a phantom type". There is two points:

  • to make invalid states inrepresentable
  • carry some of the information on the type level

Read rest the rest on StackOverflow

Site proudly generated by Hakyll