Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Implementation of the Futhark module system (at least most of it; some is scattered elsewhere in the type checker).
Synopsis
- matchMTys :: MTy -> MTy -> SrcLoc -> Either TypeError (Map VName VName)
- newNamesForMTy :: MTy -> TypeM (MTy, Map VName VName)
- refineEnv :: SrcLoc -> TySet -> Env -> QualName Name -> [TypeParam] -> StructType -> TypeM (QualName VName, TySet, Env)
- applyFunctor :: SrcLoc -> FunSig -> MTy -> TypeM (MTy, Map VName VName, Map VName VName)
Documentation
matchMTys :: MTy -> MTy -> SrcLoc -> Either TypeError (Map VName VName) Source #
Return new renamed/abstracted env, as well as a mapping from names in the signature to names in the new env. This is used for functor application. The first env is the module env, and the second the env it must match.
newNamesForMTy :: MTy -> TypeM (MTy, Map VName VName) Source #
Create unique renames for the module type. This is used for e.g. generative functor application.