On Tue, Dec 1, 2009 at 11:21 AM, David Menendez <[email protected]> wrote:
> On Tue, Dec 1, 2009 at 1:00 PM, rodrigo.bonifacio
> <[email protected]> wrote:
>> Dear all, I wrote the following types:
>>
>>> class Transformation t where
>>> (<+>) :: t -> SPLModel -> InstanceModel -> InstanceModel
>>
>>> data Configuration = forall t . Transformation t => Configuration
>>> (FeatureExpression, [t])
>>> type ConfigurationKnowledge = [Configuration]
I would suggest doing away with the class in a case like this.
data Transformation = Transformation {
(<+>) :: SPLModel -> InstanceModel -> InstanceModel
}
data Configuration = Configuration FeatureExpression [Transformation]
I suspect that it was OO heritage that led you to want a class here?
Forget that! :-)
Luke
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe