12 Feb
2012
12 Feb
'12
11:58 p.m.
Thank you for the explanation. I now understand the problem. I have rewritten the code using some parenthesis. Thanks, Roel 2012/2/10 Simon Peyton-Jones <simonpj@microsoft.com>:
It should not have worked before. Consider
I# $ 3#
($) is a polymorphic function and takes two *pointer* arguments. If we actually called it with I# and 3# as arguments we might seg-fault when we call the GC when allocating the box.
Polymorphic type variables (in this case in the type of ($)) can only be instantiated with boxed types.
Simon