Type Functions in GHC

The main development repo of GHC now includes an extended version of the typed intermediate language, Core, that includes a notion of type equality coercions with the aim to support a whole range of source language features that make essential use of non-syntactic equality, such as GADTs, associated types, functional dependencies, and even general type functions.

Type functions

We previously introduced an extension of type classes with type-indexed data types, called associated data types, and type functions, called associated type synonyms. FC enables us to generalise associated types to a general form of open type functions.


Documentation is available from the GHC Developer Wiki:

  • Type Functions: The precise source language extension adding type functions as well as the gory details of its implementation and the current implementation status.
  • Intermediate Types: Details on the realisation of System FC in the form of GHC's new Core language.

Getting the implementation

To grab the current implementations, do the following:

% darcs get --partial http://darcs.haskell.org/ghc/
% cd ghc
% chmod +x ./darcs-all
% ./darcs-all get

Then, follow the HACKING instructions.

People (alphabetically)

• Copyright 2005 Manuel M T Chakravarty • Last modified: Sun Oct 1 18:05:32 EDT 2006