title: Do I need Applicative Pretext for using Traversal with Lens?
body: <p>I have a function that I believe is stricter than lens because of <code>Applicative f</code> context. </p>
  
  <pre><code>Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; :t f
  f :: Control.Applicative.Applicative f =&gt;
       (Element -&gt; f Element) -&gt; Document -&gt; f Document
  </code></pre>
  
  <p>This is because I obtained it from some <code>Traversal</code>.</p>
  
  <pre><code>Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; let f = root ./ ell "parent"
  </code></pre>
  
  <p>I want to pass it to a function that expects a monomorphic <code>ALens</code>:</p>
  
  <pre><code>Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; :t textFrom
  textFrom
    :: Data.Text.Internal.Text
       -&gt; s -&gt; ALens s s Element Element -&gt; Maybe Data.Text.Internal.Text
  Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; textFrom "groupId" pom f
  </code></pre>
  
  <p>But I don't really understand why this <code>Applicative</code> instance is needed. I must be using this API incorrectly. What am I doing wrong?</p>
  
  <pre><code>    No instance for (Control.Applicative.Applicative
                         (Control.Lens.Internal.Context.Pretext (-&gt;) Element Element))
        arising from a use of ‘f’
      In the third argument of ‘textFrom’, namely ‘f’
      In the expression: textFrom "groupId" pom f
      In an equation for ‘it’: it = textFrom "groupId" pom f
  Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; :t f
  f :: Control.Applicative.Applicative f =&gt;
       (Element -&gt; f Element) -&gt; Document -&gt; f Document
  Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; :t textFrom
  textFrom
    :: Data.Text.Internal.Text
       -&gt; s -&gt; ALens s s Element Element -&gt; Maybe Data.Text.Internal.Text
  Prelude Text.XML.Lens Data.Maybe Data.String Text.XML&gt; textFrom "groupId" pom f
  
  &lt;interactive&gt;:68:24:
      No instance for (Control.Applicative.Applicative
                         (Control.Lens.Internal.Context.Pretext (-&gt;) Element Element))
        arising from a use of ‘f’
      In the third argument of ‘textFrom’, namely ‘f’
      In the expression: textFrom "groupId" pom f
      In an equation for ‘it’: it = textFrom "groupId" pom f
  </code></pre>