Hi Agobin --
Chapel's support for first-class functions (passing functions to other
functions)
is not so good right now and I suspect that you may be running into the limits
of its capabilities. Compiling the code in --devel mode (which de-sugars the
internal error message a bit), it seems to be specific to the fact that
testArg()
is a function with a no-op body. If I make it into:
proc testArg(a) {
writeln("hi");
}
I get a bit further (basically, I run into problems with not having replicated
your setup in my environment and not having all the routines available to
me.
Since you're using first-class-functions, though, I did want to note that,
within
Chapel, some users have gotten around some of their limitations by using
objects with well-defined interfaces and passing those around instead. And
I'll note that passing a Chapel function pointer out to an extern C routine is
a frequently requested feature that is not yet supported (in case that's
something
you're going to want to do). :( If you are going to need to do that, it may
be
worth asking on chapel-users whether anyone has found a workaround for doing
so -- I'm not aware of one offhand...
-Brad
________________________________
From: Agobin Fobella [[email protected]]
Sent: Friday, March 18, 2016 7:48 AM
To: [email protected]
Subject: [Chapel-bugs] Compiler found a bug
Hello Chapel developers,
I was compiling this project<https://github.com/Agobin/Chapel_GUI_testing> of
mine with chpl after modification of this
file.<https://github.com/Agobin/Chapel_GUI_testing/blob/master/Test.chpl>
Chapel's compiler reported this error
message<https://github.com/Agobin/Chapel_GUI_testing/blob/master/compilerMessage.txt>
to me, indicating it had
found a bug.
The error originated from this file this
file<https://github.com/Agobin/Chapel_GUI_testing/blob/master/Test.chpl> on
line 15.
The idea I was trying to implement is exploiting generic functions to pass
a function as an argument to another function.
Please for your feedback as it would enhance this project's development
or give me an alternative approach of working around the error message.
Additional information
chpl version: 1.12.0
gcc version: 5.3.1
Output of $CHPL_HOME/util/printchplenv
script<https://github.com/Agobin/Chapel_GUI_testing/blob/master/ScriptOutput>
Thanks,
Agobin.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs