erlang:is_pure(M,F,Arity)

Richard Carlsson richardc@REDACTED
Mon Dec 17 18:38:56 CET 2001


On Mon, 17 Dec 2001, Ulf Wiger wrote:

> It struck me that most pure functions could probably be allowed -
> and it also struck me that the compiler could probably figure out
> if a function's purity can be guaranteed (= it does not call
> functions in other modules, or use any built-in functions that
> have side-effects).

It could, and it would not be very difficult. The corresponding
information about BIFs can be found in the (undocumented) file
lib/compiler/src/erl_bifs.erl.

	/Richard

Richard Carlsson (richardc@REDACTED)   (This space intentionally left blank.)
E-mail: Richard.Carlsson@REDACTED	WWW: http://www.csd.uu.se/~richardc/




More information about the erlang-questions mailing list