futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

Language.Futhark.TypeChecker.Names

Description

Resolve names.

This also performs a small amount of rewriting; specifically turning `Var`s with qualified names into `Project`s, based on whether they are referencing a module or not.

Also checks for other name-related problems, such as duplicate names.

Synopsis

- resolveValBind :: ValBindBase NoInfo Name -> TypeM (ValBindBase NoInfo VName)
- resolveTypeParams :: [TypeParamBase Name] -> ([TypeParamBase VName] -> TypeM a) -> TypeM a
- resolveTypeExp :: TypeExp (ExpBase NoInfo Name) Name -> TypeM (TypeExp (ExpBase NoInfo VName) VName)
- resolveExp :: ExpBase NoInfo Name -> TypeM (ExpBase NoInfo VName)

# Documentation

resolveValBind :: ValBindBase NoInfo Name -> TypeM (ValBindBase NoInfo VName) Source #

Resolve names in a value binding. If this succeeds, then it is guaranteed that all names references things that are in scope.

resolveTypeParams :: [TypeParamBase Name] -> ([TypeParamBase VName] -> TypeM a) -> TypeM a Source #

`resolveTypeParams ps m` resolves the type parameters `ps`, then invokes the continuation `m` with the resolveed parameters, while extending the monadic name map with `ps`.

resolveTypeExp :: TypeExp (ExpBase NoInfo Name) Name -> TypeM (TypeExp (ExpBase NoInfo VName) VName) Source #

Resolve names in a single type expression.

resolveExp :: ExpBase NoInfo Name -> TypeM (ExpBase NoInfo VName) Source #

Resolve names in a single expression.