swarm-0.3.0.1: 2D resource gathering game with programmable robots
CopyrightBrent Yorgey
LicenseBSD-3-Clause
Maintainerbyorgey@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Language.Elaborate

Description

Term elaboration which happens after type checking.

Synopsis

Documentation

elaborate :: Syntax' Polytype -> Syntax' Polytype Source #

Perform some elaboration / rewriting on a fully type-annotated term. This currently performs such operations as rewriting if expressions and recursive let expressions to use laziness appropriately. In theory it could also perform rewriting for overloaded constants depending on the actual type they are used at, but currently that sort of thing tends to make type inference fall over.