Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
research:software:haskellaop:ghc-extensions [2012/10/02 13:42] – ifiguero | research:software:haskellaop:ghc-extensions [2012/12/06 16:57] (current) – [MultiParamTypeClasses] ifiguero | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== GHC Type Extensions ====== | ====== GHC Type Extensions ====== | ||
- | This is a brief introduction to the GHC Haskell type system extensions used in our implementation, | + | This is a brief introduction to the GHC Haskell type system extensions used in [[http:// |
==== ScopedTypeVariables ==== | ==== ScopedTypeVariables ==== | ||
This extension allows free type variables (in the type signature of the function) to be re-used in the scope of a function. For examples and more documentation, | This extension allows free type variables (in the type signature of the function) to be re-used in the scope of a function. For examples and more documentation, | ||
Line 8: | Line 8: | ||
By default, type classes in Haskell can only have one type parameter. This extension allows a type class to take one or more arguments, thus becoming a relation between types. | By default, type classes in Haskell can only have one type parameter. This extension allows a type class to take one or more arguments, thus becoming a relation between types. | ||
- | The standard monadic libraries depend on this extension. For instance, the MonadState is parameterized by the state type s, and the monad, and implies that in m one can manipulate a state of type s using the get and put operations [[http:// | + | The standard monadic libraries depend on this extension. For instance, the MonadState is parameterized by the state type s, and the monad m, and implies that in m one can manipulate a state of type s using the get and put operations [[http:// |
- | We use this extension to define | + | We use this extension to define |
* OpenApp, for overloaded uses of #. | * OpenApp, for overloaded uses of #. | ||
* MonadDeploy, | * MonadDeploy, | ||
Line 85: | Line 85: | ||
Lifting the MR means that all bindings are polymorphic unless constrained by a type signature. A good discussion on the MR can be found [[http:// | Lifting the MR means that all bindings are polymorphic unless constrained by a type signature. A good discussion on the MR can be found [[http:// | ||
- | We use this extension in some examples to decrease the quantity of type annotations. In general, the influence of the MR during | + | We use this extension in some examples to decrease the quantity of type annotations. In general, the influence of the MR during |