STR-666: strc no longer warns about passing overloaded strategies as arguments
—————————————————
module foo
imports libstratego-lib
strategiesmain =
foo(bar)foo(s) =
sbar(|x) =
!“bar(1,0)”bar =
!“bar(0.0)”
—————————————————Prints bar(0,0)
module foo
imports libstratego-lib
strategiesmain =
foo(bar)foo(s : a * b -> c) =
s(|1)bar(|x) =
!“bar(1,0)”bar =
!“bar(0.0)”
—————————————————Prints bar(0,0)
The current approach seems to be to always prefer the 0,0 variant over the other alternatives. In the past, this used to raise an error. PHP-front actually uses this kind of overloading.
This is related to at least the following issues:
STR-17
STR-97
STR-496
STR-497
STR-498The alternative would be to finally implement a real type checker and use this type information to reduce the number of ambiguity errors. The current situation is rather embarrassing.
Submitted on 20 November 2006 at 11:48
Issue Log
Log in to post comments