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

Jikka.Core.Convert.TypeInfer

Description

 
Synopsis

Documentation

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

run does type inference.

  • This assumes that program has no name conflicts.

Before:

let f = fun y -> y
in let x = 1
in f(x + x)

After:

let f: int -> int = fun y: int -> y
in let x: int = 1
in f(x + x)

internal types and functions

newtype Subst Source #

Subst is type substituion. It's a mapping from type variables to their actual types.

Constructors

Subst