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

Language.Futhark.TypeChecker.Terms.Loop

Description

Type inference of loop. This is complicated because of the uniqueness and size inference, so the implementation is separate from the main type checker.

Synopsis

Documentation

type CheckedLoop = ([VName], Pat ParamType, Exp, LoopFormBase Info VName, Exp) Source #

A loop that has been type-checked.

checkLoop :: (ExpBase NoInfo VName -> TermTypeM Exp) -> UncheckedLoop -> SrcLoc -> TermTypeM (CheckedLoop, AppRes) Source #

Type-check a loop expression, passing in a function for type-checking subexpressions.