UCSD-PL/RefScript — pull request #44 by panagosg7 (2014-09-24 05:01:54+00:00)
Title: Poly

Addressing issue #32.

Re-implemented features:

* **Conditional Expressions**:
`e ? e1 : e2`
They are transformed to a call to a function with signature: `forall C . (c: C, _t: T, x: T, y: T) => T`, with arguments:
- The condition expression
- A phony expression with:
- The contextual type `t` if there exists one
- Top, otherwise
- The first conditional expression
- The second conditional expression

Examples: `tests/pos/misc/poly-0x.ts`, `tests/pos/operators/choice.ts`

* **User defined casts**: ` e`
They are transformed to a call to a function with signature: `forall T. (c: T, x: T) => T`, with arguments:
- A phony expression with the cast type
- The casted expression

Examples: `tests/pos/misc/poly-03.ts`