STRC revision 15559 causes a GCC error (e.g., undefined reference to `main_0_0’) when compiling a program with a let like the one below. Older revisions of the compiler (before the nested functions reformations) had no problems with it.

main = let invoke(s) = s
invoke-foo = invoke(foo)
foo = [] <+ foo
in []
end

(this example is a bit odd and based on Dryad’s classpath.str which triggers the same bug)

Submitted on 18 August 2006 at 11:45

On 18 August 2006 at 11:51 Jira commented:

STR-620, martin:
Another example:


module foo
imports list-cons
strategies

main =
toplevel

toplevel =
let local1 =
all(local2)

     local2 =
       all(local2)

  in local1
 end

The self-invocations seems to be important, because this example works:


module foo
imports list-cons
strategies

main =
toplevel

toplevel =
let local1 =
all(local2)

     local2 =
       all(local3)

     local3 =
       ?1 + ?2

  in local1
 end

———————————————

Log in to post comments