futhark-0.21.12: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Futhark.TypeChecker.Terms.Pat

Description

Type checking of patterns.

Synopsis

Documentation

binding Source #

Arguments

:: Bool

Allow consumption, even if the type is not unique.

-> [Ident] 
-> TermTypeM a 
-> TermTypeM a 

Bind these identifiers locally while running the provided action. Checks that the identifiers are used properly within the scope (e.g. consumption).

bindingParams :: [UncheckedTypeParam] -> [UncheckedPat] -> ([TypeParam] -> [Pat] -> TermTypeM a) -> TermTypeM a Source #

Check and bind type and value parameters.

bindingPat :: [SizeBinder VName] -> PatBase NoInfo Name -> InferredType -> (Pat -> TermTypeM a) -> TermTypeM a Source #

Check and bind a let-pattern.

bindingIdent :: IdentBase NoInfo Name -> PatType -> (Ident -> TermTypeM a) -> TermTypeM a Source #

Bind a single term-level identifier.

bindingSizes :: [SizeBinder Name] -> ([SizeBinder VName] -> TermTypeM a) -> TermTypeM a Source #

Bind let-bound sizes. This is usually followed by bindingPat immediately afterwards.

doNotShadow :: [String] Source #

Names that may not be shadowed.

boundAliases :: Aliasing -> Set VName Source #

The set of in-scope variables that are being aliased.