-module(restricted).
-export ([non_local_allowed/3]).
%% Disallow lists:seq(...).
non_local_allowed({lists, seq}, _A, _State) -> {false, _State};
non_local_allowed({_M, _F}, _A, _State) -> {true, _State}.erlc restricted.erlerl -stdlib restricted_shell restrictedErlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] Restricted Eshell V7.0 (abort with ^G) 1> lists:seq(1, 10). ** exception exit: restricted shell does not allow lists:seq(1,10)
The lists:seq fails, as desired.
erl -stdlib restricted_shell restrictedErlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] LFE Shell V7.0 (abort with ^G) > (lists:seq 1 10) (1 2 3 4 5 6 7 8 9 10)
The lists:seq succeeds, undesirably.