Personal tools

GHC/Type system

From HaskellWiki

< GHC(Difference between revisions)
Jump to: navigation, search
(+cat)
 
(12 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
<span style='font-size: x-large; font-weight: bold'>Type system extensions in GHC</span>
 
<span style='font-size: x-large; font-weight: bold'>Type system extensions in GHC</span>
   
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/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.
   
== Overlapping instances ==
+
* '''[[GHC/Indexed_types|Indexed data types]]'''
+
* '''[[GHC/TypeHoles|Agda-like "holes" in GHC]]'''
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/Stand-alone deriving declarations|"Stand-alone deriving" declarations]]'''
+
* '''[[GHC/TypeSigsAndAmbiguity|Type signatures and ambiguity]]'''
== Indexed data types and indexed newtypes ==
+
* '''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/Indexed_types|Indexed data types]] (including associated data types) are a very recent addition to GHC's type system extensions that is not yet included in the user manual. To use the extension, you need to obtain a version of GHC from [http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources its source repository].
 
 
== Stand-alone deriving clauses ==
 
 
Bjorn Bringert has recently implemented [[GHC/Stand-alone deriving declarations|"stand-alone deriving" declarations]].
 
-----------------------
 

Latest revision as of 16:43, 31 October 2012

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.