<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <title></title>
  </head>

  <body>
    Hi all, 

    <div>
      <br />
    </div>

    <div>
      thanks for the insight.
    </div>

    <div>
      <br />
      &gt; But you can deconstruct the enclosed value temporarily:<br />
      &gt;<br />
      &gt; getSomething :: Bar -&gt; Double<br />
      &gt; getSomething b =<br />
      &gt;&#160; &#160; &#160; case b of<br />
      &gt;&#160; &#160; &#160; &#160; &#160; Bar a -&gt; doSomething a<br />
    </div>

    <div>
      <br />
    </div>

    <div>
      Somehow i fail to apply this.
    </div>

    <div>
      <br />
    </div>

    <div>
      If you look at
    </div>

    <div>
      http://chlor.svn.sourceforge.net/viewvc/chlor/trunk/haskell/Chlor/Object.hs?revision=603&amp;view=markup
    </div>

    <div>
      <br />
    </div>

    <div>
      in line 26 i used this for function &quot;<span style="font-family: Monaco, Arial, Helvetica, sans-serif; font-size: 11px;">adjustToBox<span style="font-family: monospace, Arial, Helvetica, sans-serif; font-size: 12px;">&quot;, but i still get:</span></span>
    </div>

    <div>
      <br />
    </div>

    <div>
      <div>
        Chlor/Object.hs:33:36:
      </div>

      <div>
        &#160;&#160; &#160;Couldn&#39;t match expected type `ObjectWrapper&#39;
      </div>

      <div>
        &#160;&#160; &#160; &#160; &#160; &#160; against inferred type `a&#39;
      </div>

      <div>
        &#160;&#160; &#160; &#160;`a&#39; is a rigid type variable bound by
      </div>

      <div>
        &#160;&#160; &#160; &#160; &#160; &#160;the constructor `ObjectWrapper&#39; at Chlor/Object.hs:33:12
      </div>

      <div>
        &#160;&#160; &#160;In the expression: adjustToBox object
      </div>

      <div>
        &#160;&#160; &#160;In a case alternative: ObjectWrapper object -&gt; adjustToBox object
      </div>

      <div>
        &#160;&#160; &#160;In the expression:
      </div>

      <div>
        &#160;&#160; &#160; &#160; &#160;case wrapper of { ObjectWrapper object -&gt; adjustToBox object }
      </div>

      <div>
        <br />
      </div>

      <div>
        :(
      </div>
    </div>
  </body>
</html>