brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 110 forks source link

Some functions in modules are imported implicitly, some not #592

Open k4rtik opened 9 years ago

k4rtik commented 9 years ago

Example lists: http://www.pyret.org/docs/latest/lists.html

> fold
<function>
> fold-while
The name fold-while is used but not defined at
interactions2: line 1, column 0
> lists.fold-while
<function>
> lists.fold
<function>

Tested on horizon too.

This is inconsistent -- either all functions in a module like lists should import implicitly or all should require qualification like lists.fold.

Is there an explanation for why some functions are special and are implicitly imported?

k4rtik commented 9 years ago

Related: #376 #397