<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">How do I get the x out of Just x?<br><br>Michael<br><br>=============<br><br>safeDivision :: Float -&gt; Float -&gt; Maybe Float <br>safeDivision x y = if y == 0 then Nothing else Just (x/y)<br><br>*Main Data.List&gt; safeDivision 10 5<br>Just 2.0<br>*Main Data.List&gt; 3 + (safeDivision 10 5)<br><br>&lt;interactive&gt;:1:0:<br>&nbsp;&nbsp;&nbsp; No instance for (Num (Maybe Float))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arising from a use of `+' at &lt;interactive&gt;:1:0-22<br>&nbsp;&nbsp;&nbsp; Possible fix: add an instance declaration for (Num (Maybe Float))<br>&nbsp;&nbsp;&nbsp; In the expression: 3 + (safeDivision 10 5)<br>&nbsp;&nbsp;&nbsp; In the definition of `it': it = 3 + (safeDivision 10 5)<br>*Main Data.List&gt; <br><br></td></tr></table><br>