| Start |
|---|
| Use Case for Phantom Types: Currencies Phantom types are useful for dealing with data, that has identical representations but isn't logically of the same type. A good example is dealing with currencies. If you work with currencies you absolutely never want to e.g. add two amounts of different currencies. What would the result currency of A solution to this could look something like this: The Now if you represent Euro amounts with e.g. More comprehensive documentation can be found in the haskell wiki article (opens new window) |
Read Article
https://develop.horje.com/learn/1434/reference