Jikka-5.0.11.1: A transpiler from Python to C++ for competitive programming
Copyright(c) Kimiyuki Onaka 2020
LicenseApache License 2.0
Maintainerkimiyuki95@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Jikka.Core.Convert.Alpha

Description

 
Synopsis

Documentation

run :: (MonadAlpha m, MonadError Error m) => Program -> m Program Source #

run renames variables in exprs to avoid name conflictions, even if the scopes of two variables are distinct.

Examples

Before:

let x = 0
in y = x + x
in x = x + y
x + y

After:

let x0 = 0
in y1 = x0 + x0
in x2 = x0 + y1
x2 + y1