[Haskell-beginners] Import issue
Shishir Srivastava
shishir.srivastava at gmail.com
Fri May 8 18:25:10 UTC 2015
Hi,
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.
-----
import Control.Monad.State
let pop = State $ \(x:xs) -> (x,xs)
<interactive>:73:11:
Not in scope: data constructor ‘State’
Perhaps you meant ‘StateT’ (imported from Control.Monad.State)
-----
Please can anyone point out what the issue is here?
Thanks,
Shishir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150508/2748df8e/attachment.html>
More information about the Beginners
mailing list