[clean-list] Trivial Algebraic Data Types...

Fabien Todescato f.todescato@larisys.fr
Wed, 8 Nov 2000 18:07:26 +0100


Dear Cleaners,

Let us assume I have the following algebraic data type :: STM s x = STM \ s
-> ( s , x ) with a single unary constructor.

Does the compiler optimize away such a constructor so that at run-time the
values of STM s x are not encapsulated within some "STM box", or are the
values encapsulated within a "STM box" ?

Differently said, do we suffer some run-time penalty when using :: STM s x =
STM \ s -> ( s , x ) instead of :: STM s x :== \ s -> ( s , x ), when
possible ?

Thanks a lot for the precision.


Fabien