Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update S.env to reference the module's environment #524

Merged
merged 1 commit into from
Apr 8, 2018

Conversation

davidchambers
Copy link
Member

S.env is currently a reference to the default environment for every Sanctuary module S. It would be more useful for S.env to reference the particular environment provided when creating S, enabling:

const S0 = require ('sanctuary');
const S1 = S0.create ({checkTypes: ..., env: S0.env.concat ([...])});
const S2 = S1.create ({checkTypes: ..., env: S1.env.concat ([...])});

One would currently need to keep track of the various environments in some other way:

const S0 = require ('sanctuary');
const env1 = S0.env.concat ([...]);
const S1 = S0.create ({checkTypes: ..., env: env1});
const env2 = env1.concat ([...]);
const S2 = S1.create ({checkTypes: ..., env: env2});

@davidchambers davidchambers merged commit 28d64f1 into master Apr 8, 2018
@davidchambers davidchambers deleted the davidchambers/env branch April 8, 2018 18:22
@Avaq
Copy link
Member

Avaq commented Apr 10, 2018

I believe this makes progress towards (or is completely?) solving #479

@Avaq
Copy link
Member

Avaq commented Apr 10, 2018

It might also be related to sanctuary-js/sanctuary-def#137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants