<div dir="ltr"><div>Hi, </div><div><br></div><div>I've imported the State monad module and used in the 'pop' function that will pop the head out of the list but am getting error in GHCi. </div><div><br></div><div>-----</div><div><font face="monospace, monospace">import Control.Monad.State</font></div><div><font face="monospace, monospace">let pop = State $ \(x:xs) -> (x,xs)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><interactive>:73:11:</font></div><div><font face="monospace, monospace">    Not in scope: data constructor ‘State’</font></div><div><font face="monospace, monospace">    Perhaps you meant ‘StateT’ (imported from Control.Monad.State)</font></div><div>-----</div><div><br></div><div>Please can anyone point out what the issue is here?</div><div><br></div><div>Thanks,</div><div><div class="gmail_signature"><div dir="ltr"><font color="#0b5394"><font style="background-color:rgb(255,255,255)"><font size="2" face="georgia, serif">Shishir </font></font></font><br></div></div></div>
</div>