<p>Hi, a java-programmer running into trouble while trying to learn Haskell.<br></p><p>I try to make a hash containing hashes but can not getting a value out of the innermost hash - I keep running into type-trouble where IO and Maybe monad is getting mixed?</p>
<p>My attempt:</p><p></p><p>removeMaybeHash x =<br>        case x of<br>          Just ref -&gt; ref<br>          Nothing -&gt; HashTable.new (==) (\key -&gt; key)<br><br></p><p>test = do<br>        h &lt;- HashTable.new (==) (\key -&gt; key)<br>
        h1 &lt;- HashTable.new (==) (\key -&gt; key)<br>        HashTable.insert h 3 h1<br>        HashTable.insert h1 1 1000<br>        maybeOuterHash &lt;- HashTable.lookup h 3 <br>        res &lt;- removeMaybe (removeMaybeHash maybeOuterHash) 1000<br>
        return res      <br><br>Any clues?<br></p><p>In java this would be as simple as (pseudocode): h.lookup(3).lookup(1000)</p><p>Cheers,</p><p>Pedro</p>