<div>Hello everybody,</div><div>When I compile a file containing ... </div><div><br></div><div>plotAsString::(Integral a)=&gt;[(a,a)]-&gt;a-&gt;String</div><div>plotAsString locs ans = let xs = map fst locs</div><div>                            ys = map snd locs</div>


<div>                            locsmap = M.fromList (zip locs [0..])</div><div>                            bufsize=10</div><div>                            min&#39; = ((\x -&gt; x-bufsize) . minimum)</div><div>                            max&#39; = ((\x -&gt; x+bufsize) . maximum)</div>


<div>                            (bmin@(x0,y0),bmax@(x1,y1)) = ((min&#39; xs,min&#39; ys),(max&#39; xs,max&#39; ys))</div><div>                            plotString = foldl (\curStr newRowId -&gt; (foldl (\ccStr newColId -&gt; (ccStr++(case (M.member (newRowId,newColId) locsmap) of</div>


<div>                                                                                                         (Just v) -&gt; (&quot;.&quot; ++ (show v) ++ &quot;.&quot;)</div><div>                                                                                                         (Nothing) -&gt; &quot;   &quot;)))</div>


<div>                                                                           curStr [y0..y1])) &quot;&quot; [x0..x1]</div><div>                        in plotString</div><div><br></div><div>I get the following error..</div>


<div><br></div><div><div>main.hs:34:107:</div><div>    Couldn&#39;t match expected type `Bool&#39; with actual type `Maybe t0&#39;</div><div>    In the pattern: Just v</div><div>    In a case alternative: (Just v) -&gt; (&quot;.&quot; ++ (show v) ++ &quot;.&quot;)</div>


<div>    In the second argument of `(++)&#39;, namely</div><div>      `(case (M.member (newRowId, newColId) locsmap) of {</div><div>          (Just v) -&gt; (&quot;.&quot; ++ (show v) ++ &quot;.&quot;)</div><div>          (Nothing) -&gt; &quot;   &quot; })&#39;</div>


</div><div><br></div><div>can somebody help?<br><br>Thanks,<br>Sunil.</div>