Copyright | (c) 2016 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Before type checking, the compiler checks for every instance declaration that all necessary super class instances exist. Furthermore, the compiler infers the contexts of the implicit instance declarations introduced by deriving clauses in data and newtype declarations. The instances declared explicitly and automatically derived by the compiler are added to the instance environment . It is also checked that there are no duplicate instances and that all types specified in a default declaration are instances of the Num class.
Documentation
instanceCheck :: ModuleIdent -> TCEnv -> ClassEnv -> InstEnv -> [Decl a] -> (InstEnv, [Message]) Source #