<!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 />
> But you can deconstruct the enclosed value temporarily:<br />
><br />
> getSomething :: Bar -> Double<br />
> getSomething b =<br />
>      case b of<br />
>          Bar a -> 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&view=markup
</div>
<div>
<br />
</div>
<div>
in line 26 i used this for function "<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;">", but i still get:</span></span>
</div>
<div>
<br />
</div>
<div>
<div>
Chlor/Object.hs:33:36:
</div>
<div>
    Couldn't match expected type `ObjectWrapper'
</div>
<div>
           against inferred type `a'
</div>
<div>
      `a' is a rigid type variable bound by
</div>
<div>
          the constructor `ObjectWrapper' at Chlor/Object.hs:33:12
</div>
<div>
    In the expression: adjustToBox object
</div>
<div>
    In a case alternative: ObjectWrapper object -> adjustToBox object
</div>
<div>
    In the expression:
</div>
<div>
        case wrapper of { ObjectWrapper object -> adjustToBox object }
</div>
<div>
<br />
</div>
<div>
:(
</div>
</div>
</body>
</html>