Difference between revisions of "Roles"

From HaskellWiki
Jump to navigation Jump to search
(Created page with "Roles are a feature introduced with GHC 7.8 to discern the difference between compile-time type equality (introduced by type synonyms and type families) and runtime type equal...")
 
 
Line 1: Line 1:
 
Roles are a feature introduced with GHC 7.8 to discern the difference between compile-time type equality (introduced by type synonyms and type families) and runtime type equality (introduced by newtypes).
 
Roles are a feature introduced with GHC 7.8 to discern the difference between compile-time type equality (introduced by type synonyms and type families) and runtime type equality (introduced by newtypes).
   
See the [https://ghc.haskell.org/trac/ghc/wiki/Roles|developer wiki page] on roles and the [http://www.cis.upenn.edu/~eir/papers/2014/coercible/coercible.pdf|draft paper] for useful information.
+
See the [https://ghc.haskell.org/trac/ghc/wiki/Roles developer wiki page] on roles and the [http://www.cis.upenn.edu/~eir/papers/2014/coercible/coercible.pdf draft paper] for useful information.
   
 
If you need to put role annotations (described in the linked pages above) in your code, you may want to check out the no-role-annots package, which allows you to write role annotations without using the new -XRoleAnnotations extension.
 
If you need to put role annotations (described in the linked pages above) in your code, you may want to check out the no-role-annots package, which allows you to write role annotations without using the new -XRoleAnnotations extension.

Latest revision as of 19:03, 8 April 2014

Roles are a feature introduced with GHC 7.8 to discern the difference between compile-time type equality (introduced by type synonyms and type families) and runtime type equality (introduced by newtypes).

See the developer wiki page on roles and the draft paper for useful information.

If you need to put role annotations (described in the linked pages above) in your code, you may want to check out the no-role-annots package, which allows you to write role annotations without using the new -XRoleAnnotations extension.