morloc-project / morloc

A typed, polyglot, functional language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type checker dies on certain containers

arendsee opened this issue · comments

This works:

import pybase (fold, add)
export foo
foo x = fold add 0 [1, 2, 3, add x 0];

But this does not:

import pybase (fold, add)
export foo
foo x = fold add 0 [1, 2, 3, x];

The above case raises an error during type inference in the chainInfer function. Containers with no language-identifying terms are not being correctly handled. I plan to address this and other issues in the type checker in the next dev cycle (v0.23.0).