From: André P. <oz...@al...> - 2008-08-18 03:27:04
|
On 11/08/2008, at 3:45 PM, Daniel Rogers wrote: > Can someone explain what the constructors Allocated, Covariant, > CovariantInstance, Inited, and Released mean? I'm managed to figure > out most of it, though I don't understand what the "Covariant" ones > mean. Specifically, I'm trying to understand "doctorCovariant" in > DeclareSelector.hs. See Wikipedia for the definitions of covariant and contravariant; they're to do with return types and parameter types to functions: http://en.wikipedia.org/wiki/Covariance_and_contravariance_%28computer_science%29 I'm not entirely sure what they mean in the context of HOC, though... I'm guessing they have something to do with constructing the phantom types properly so that functions can properly accept covariant types. Wolfgang will know for sure, though. -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> |