Difference between revisions of "GHC/Type system"

From HaskellWiki
< GHC
Jump to navigation Jump to search
(21 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Type system extensions in GHC ==
+
[[Category:GHC|Type system]]
  +
<span style='font-size: x-large; font-weight: bold'>Type system extensions in GHC</span>
   
GHC comes with a rather lare collection of type-system extensions (beyond Haskell 98). They are all documented in the [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html user manual], but this page is a place to record observations, notes, and suggestions on them.
+
GHC comes with a rather large collection of type-system extensions (beyond Haskell 98). They are all documented in the [http://www.haskell.org/ghc/docs/latest/html/users_guide/ghc-language-features.html user manual], but this page is a place to record user-oriented observations, notes, and suggestions on how to use them.
   
  +
* '''[[GHC/Indexed_types|Indexed data types]]'''
=== Overlapping instances ===
 
  +
* '''[[GHC/TypeHoles|Agda-like "holes" in GHC]]'''
 
  +
* '''[[GHC/Stand-alone deriving declarations|"Stand-alone deriving" declarations]]'''
Here an [http://www.haskell.org//pipermail/glasgow-haskell-bugs/2006-July/006808.html interesting message] about the interaction of existential types and overlapping instances.
 
  +
* '''[[GHC/TypeSigsAndAmbiguity|Type signatures and ambiguity]]'''
 
  +
* '''Overlapping instances'''. GHC supports overlapping instances, with carefully specified rules. Make sure you read the [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extensions.html#instance-decls relevant sections of the user manual]. Here is an appliation note about [[GHC/AdvancedOverlap|advanced use of overlapping instances]], combined with functional dependencies.
-----------------------
 
  +
* '''[[GHC/Coercible|Safe coercions using Coercible]]'''

Revision as of 08:57, 20 May 2014

Type system extensions in GHC

GHC comes with a rather large collection of type-system extensions (beyond Haskell 98). They are all documented in the user manual, but this page is a place to record user-oriented observations, notes, and suggestions on how to use them.