MIT class Advanced Data Structures. Design/TypeNaming - GHC - Trac. Haskell currently allows you to use the same name for a type and a data constructor, thus data Age = Age Int In any context, it is clear which is meant, thus foo :: Age -> Int -- Type constructor Age foo (Age i) = i -- Data constructor Age However, as we extend Haskell's type system (or at least GHC's), there are occasions in which the distinction is less clear.
This page summarises the issues, and proposes solutions. Internet Archive: ArsDigita Computer Science University.