<p>Dear all, I wrote the following  types:</p>
<p>&gt; class Transformation t where <br />&gt;  (&lt;+&gt;) :: t -&gt; SPLModel  -&gt; InstanceModel -&gt; InstanceModel</p>
<p>&gt; data Configuration = forall t . Transformation t =&gt; Configuration (FeatureExpression, [t])<br />&gt; type ConfigurationKnowledge = [Configuration]</p>
<p> </p>
<p>I tried to write a function that retrieves the list of transformations of a configuration. Bellow a code snip of such a function.</p>
<p>&gt; transformations ck fc = concat [snd c | (Configuration c) &lt;- ck, eval fc (fst c)]</p>
<p>However, compiling this I got:</p>
<p>--- <br />Inferred type is less polymorphic than expected<br /> Quantified type variable `t' escapes<br /> When checking an existential match that binds<br /> c :: (FeatureModel.Types.FeatureExpression, [t])<br /> The pattern(s) have type(s): Configuration<br /> The body has type: [t]<br /> In a stmt of a list comprehension: (Configuration c) &lt;- ck<br /> In the first argument of `concat', namely<br /> `[snd c | (Configuration c) &lt;- ck, eval fc (fst c)]'</p>
<p>---</p>
<p> </p>
<p>How can I fix this problem?</p>
<p>Thanks,</p>
<p>Rodrigo.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>