> Is it possible to increase the size of the detstack? Yes, set the environment variable MERCURY_OPTIONS to e.g. "-sd4096" to increase it to 4 Mb. The default is 2 Mb. > After 55.5 seconds of CPU time. However, this indicates an infinite loop is likely to be the culprit, in which case no amount of detstack will help. Zoltan.