On Tue, Dec 1, 2009 at 11:21 AM, David Menendez <dave@zednenem.com> wrote:
On Tue, Dec 1, 2009 at 1:00 PM, rodrigo.bonifacio <rodrigo.bonifacio@uol.com.br> 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