pufuwozu/roy — pull request #136 by taku0 (2012-05-01 07:25:07+00:00)
Title: Adopted strongly connected component decomposition of functions defined within where clauses to assign more generic types

The old implementation restricted the types of functions defined within where clauses to be monomorphic while inferring the types of function bodies; however, if function f depends on g but g does not depends on f, we can assign a polymorphic type to g while inferring the type of f.

- implemented Tarjan's strongly connected components algorithm.
- implemented a function returning free variables in expressions.
- modified run-tests.roy to run tests written in JavaScript.
- changed analyseWhereFunctions to use strongly connected component decomposition.

Minor bug fixes:
- added an unification in the analyseFunction to check consistency of recursive functions.
- declared the return types of recursive functions monomorphic while inferring the types of their bodies.