Yet another fascinating concept to explore - type interference.
Algorithm W was implemented in PHP, and is based on Martin Grabmüller work [1].
Project uses the php-functional library [2] to simplify implementation, and make it closer to Haskell.
Next step is to use gathered experience it the typed-config project [3],
with is aiming to make configuration type safe, self-documenting, easy to extend and dead-simple to use.
Sneak peek of one of many test cases can be interpreted
'let id = (x -> let y = x in y) in id id ' => [
'expression' => newELet(
'id',
newEAbs(
'x',
newELet(
'y',
newEVar('x'),
newEVar('y')
)
),
newEApp(
newEVar('id'),
newEVar('id')
)
),
'expected' => '(a5 -> a5)',
],