I was wondering if this is supported, planned or neither. Suppose I want to import a module Foo:
module {
given_foo,
given_bar,
} -> [
gotten_foo,
gotten_bar,
gotten_baz,
]
gotten_foo = \x -> given_foo x 1
gotten_bar = \x -> given_bar x 1
gotten_baz = \x -> x + 1
However, I only want to use the gotten_foo function. Is there a need to provide the given_bar function?
Or even more extremely, why would I need to provide module params at all if I only want to use gotten_baz?
I don't think that is planned. If you need those split up for more granular use, they should be in different modules
Module params are the contract of the module. Even if you only use a small portion of the functions, you have to fill the full contract.
Also, allowing partial imports would mean that it is a breaking change for the module author to call given_bar in gotten_baz.
That seems like it would make the package ecosystem much more painful. Way more things would become breaking changes.
Of course if you want to do the equivalent of a partial import, you can just make all other functions call crash
Brendan Hansknecht said:
Also, allowing partial imports would mean that it is a breaking change for the module author to call
given_baringotten_baz.
Did not think of this!
Anyway, thanks for the reply. It makes sense after hearing your points
Last updated: Jun 16 2026 at 16:19 UTC