[Haskell-cafe] Modelling structurally subtyped and cyclic data in type safe Haskell
jo at durchholz.org
Mon Dec 12 07:03:31 UTC 2016
Am 10.12.2016 um 22:02 schrieb Heinrich Apfelmus:
> (The argument
> to the `Key` type is called a "phantom", because the representation of
> the Key does not care about it.)
This kind of type exists in other languages, e.g. in Java it is commonly
referred to as a "marker interface".
(Personally, I have a dislike for terms like "phantom", because they
highlight what the referred-to concept is _not_, which means that a
newcomer needs an additional explanation to understand the concept.
"Marker type" would make instantly clear what the type is intended for.
More information about the Haskell-Cafe