SPECIALIZE function for type defined elsewhere

Sebastian Fischer sebf at informatik.uni-kiel.de
Wed Jul 28 11:52:15 EDT 2010


On Jul 28, 2010, at 5:40 PM, Max Bolingbroke wrote:

> SPECIALISE pragmas are not supported in any but the defining module
> because the Core for a function to specialise is not guaranteed to be
> available in any other module.

Would it be reasonable (and possible) to reject specialization only if  
the functions used in the body of the specialized version are not in  
scope? This would be similar to the error one gets when specializing a  
function for a type wich is not in scope.

With this behaviour it might be easy to work around the error by  
importing all needed functions.

Cheers,
Sebastian

-- 
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)





More information about the Glasgow-haskell-users mailing list