[Haskell-cafe] Not in scope: type constructor or class `Map'
michael rice
nowgate at yahoo.com
Thu Dec 30 17:41:14 CET 2010
Thanks, all.
Just tried
type Bindings = Map.Map String Int
and it also seems to work.
Michael
--- On Thu, 12/30/10, Pedro Vasconcelos <pbv at dcc.fc.up.pt> wrote:
From: Pedro Vasconcelos <pbv at dcc.fc.up.pt>
Subject: Re: [Haskell-cafe] Not in scope: type constructor or class `Map'
To: haskell-cafe at haskell.org
Date: Thursday, December 30, 2010, 11:17 AM
On Thu, 30 Dec 2010 08:01:01 -0800 (PST)
michael rice <nowgate at yahoo.com> wrote:
> Not sure what's going on here. Doesn't like line 5, the type
> statement. And what's with the semicolons in that line and in
> function main?
>
> import Control.Monad.Reader
> import qualified Data.Map as Map
> import Data.Maybe
>
> type Bindings = Map String Int;
.
The right hand side should be "Map.Map String Int"; alternatively
add an unqualified import above for just the Map type:
> import Data.Map(Map)
The semicolon is optional---the layout rule will insert it if you leave
it out.
Pedro
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101230/3e4e8206/attachment.htm>
More information about the Haskell-Cafe
mailing list