A strict (WHNF), thread local, mutable, extensible record indexed by types of kind Effect.
Warning: the environment is a mutable data structure and cannot be simultaneously used from multiple threads under any circumstances.
In order to pass it to a different thread, you need to perform a deep copy with the cloneEnv funtion.
Offers very good performance characteristics for most often performed operations:
Extending:
O(n), wherenis the size of the effect stack.Shrinking:
O(1).Indexing via
(:>):O(1)Modification of a specific element:
O(1).Getting a tail:
O(1).Cloning:
O(N), whereNis the size of the Storage.