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

Futhark.Internalise.FullNormalise

Description

This full normalisation module converts a well-typed, polymorphic, module-free Futhark program into an equivalent with only simple expresssions. Notably, all non-trivial expression are converted into a list of let-bindings to make them simpler, with no nested apply, nested lets... This module only performs synthatic operations.

Also, it performs desugaring that is: * Turn operator section into lambda * turn BinOp into application (&& and || are converted to if structure) * turn `let x [i] = e1` into `let x = x with [i] = e1` * binds all implicit sizes

This is currently not done for expressions inside sizes, this processing still needed in monomorphisation for now.

Documentation