brownplt / pyret-lang

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

include should only import values that provide export #740

Closed sorawee closed 6 years ago

sorawee commented 8 years ago

Consider a module named foobar.arr with the following code:

provide { foo: foo } end
provide-types { Foo :: Foo }

data Foo: foo end
data Bar: bar end

Currently, if we call include foobar, Pyret will throw an error that bar is not found. Seems like include will import all values in the module without respecting the provide statement.

jpolitz commented 7 years ago

Making a note that 2a98466e99222ce6833703547f5bb93b733a6ce1 addresses this, along with some other commits on the better-exports branch.

schanzer commented 6 years ago

Now that better-exports has been merged, is this still open?

schanzer commented 6 years ago

@sorawee is this closeable?

sorawee commented 6 years ago

Yup