Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
research:software:haskellaop:ghc-extensions [2012/10/02 10:42] ifigueroresearch:software:haskellaop:ghc-extensions [2012/12/06 12: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, with pointers to the relevant documentation.+This is a brief introduction to the GHC Haskell type system extensions used in [[http://pleiad.dcc.uchile.cl/research/software/haskellaop|our implementation of pointcut-advice AOP in Haskell]], with pointers to the relevant documentation.
 ==== 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, see [[http://www.haskell.org/haskellwiki/Scoped_type_variables|here]]. 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, see [[http://www.haskell.org/haskellwiki/Scoped_type_variables|here]].
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://hackage.haskell.org/packages/archive/mtl/latest/doc/html/Control-Monad-State-Class.html|See Reference.]]+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://hackage.haskell.org/packages/archive/mtl/latest/doc/html/Control-Monad-State-Class.html|See Reference.]]
  
-We use this extension to define three multi-parameter type classes:+We use this extension to define the following multi-parameter type classes:
   * OpenApp, for overloaded uses of #.   * OpenApp, for overloaded uses of #.
   * MonadDeploy, to specify the semantics of aspect deployment.   * MonadDeploy, to specify the semantics of aspect deployment.
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://www.haskell.org/haskellwiki/Monomorphism_restriction|here]]. 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://www.haskell.org/haskellwiki/Monomorphism_restriction|here]].
  
-We use this extension in some examples to decrease the quantity of type annotations. In general, the influence of the MR during typechecker can be avoided by using explicit type signatures.+We use this extension in some examples to decrease the quantity of type annotations. In general, the influence of the MR during typechecking can be avoided by using explicit type signatures.