`type` synonym with phantom allowed no warnings?

52 views Asked by At
data D a b = MkD a

b is called a 'phantom type', because it doesn't appear on RHS of =. That's useful for type-level tagging of the data.

type T a b = Maybe a

(GHC doesn't complain, even with :set -Wall.) b is a what? And what could it be useful for?

I feel GHC should warn me b is not used on RHS.

0

There are 0 answers