Motivation behind Phantom Types?

To answer the “what’s the motivation to use a phantom type”. There is two points: to make invalid states unrepresentable, which is well explained in Aadit’s answer Carry some of the information on the type level For example you could have distances tagged by the length unit: {-# LANGUAGE GeneralizedNewtypeDeriving #-} newtype Distance a = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)