[Haskell-cafe] Confused about missing data constructor

Anthony Cowley acowley at seas.upenn.edu
Wed Nov 24 09:18:02 EST 2010

On Tue, Nov 23, 2010 at 7:58 PM, Adam Miezianko <adam at theorylounge.org> wrote:
> I'm working through Learn You a Haskell for Great Good [1] and getting
> a compiler error while playing around with some of the code.  I have
> this:
> Now, I'm not exactly sure how to read the documentation for
> Control.Monad.State [2] but it seems that newtype State s a = State
> {...} defines a constructor, or am I wrong on that point too?  So,
> what am I missing here?  In case it matters, I am using mtl-
> and ghci 6.12.3.
> [1] http://learnyouahaskell.com/for-a-few-monads-more
> [2] http://cvs.haskell.org/Hugs/pages/libraries/mtl/Control-Monad-State.html

Wrong documentation page, the one you want is


More information about the Haskell-Cafe mailing list